From 1d5d51ee2a32d4fbe5903b3052c4748bc1968901 Mon Sep 17 00:00:00 2001 From: Paolo Veglio <paolo.veglio@ssec.wisc.edu> Date: Mon, 20 Jun 2022 20:15:51 +0000 Subject: [PATCH] didn't commit setup until now --- setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a61413c --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +from distutils.core import setup +from distutils.extension import Extension + +from Cython.Build import cythonize + +import numpy + +sourcefiles = ['src/get_Reynolds_SST.c', # SST + 'src/bilinearInterpSST.c', # _| + 'src/swap_bytes.c', # _| + 'src/get_NDVI_background.c', # NDVI + 'src/get_Olson_eco.c', # Olson eco type + 'src/getcoord.c', # _| + 'src/get_GEOS.c', # GEOS + 'src/get_geos_times.c', # _| + 'src/get_granule_times.c', # _| + 'src/get_ti_vars.c', # _| + 'src/get_ti_weights.c', # _| + 'src/read_GEOS.c', # _| + 'src/read_GEOS_constants.c', # _| + 'src/read_GEOS_lndocn.c', # _| + 'src/assign_geos_vals.c', # _| + 'ancillary.pyx', + ] + +include_dirs = ['include', + '/opt/hdfeos2/2.20-gcc-8.3/include', + '/opt/netcdf4/4.7.0-gcc-8.3/include', + numpy.get_include(), ] + +library_dirs = ['/opt/hdfeos2/2.20-gcc-8.3/lib', + '/opt/netcdf4/4.7.0fcc-8.3/lib'] + +extensions = [Extension('ancillary_data', sourcefiles, + include_dirs=include_dirs, + library_dirs=library_dirs, + libraries=['netcdf']), ] + +setup(ext_modules=cythonize(extensions, + compiler_directives={'language_level': '3'}, ), ) -- GitLab