Skip to content
Snippets Groups Projects
Select Git revision
  • 3d2ff7532a231b239b24cad4c8d3d691a6191a03
  • main default protected
  • jonathan-mem-exploration
  • mahir-intern-branch
  • night
  • clean-thr-arrays
  • work_for_AMS
  • 0.3.14
  • 0.3.13
  • 0.3.12
  • 0.3.11
  • 0.3.10
  • 0.3.9
  • 0.3.7
  • 0.3.6
  • 0.3.5
  • 0.3.4
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.18
  • 0.2.17
  • 0.2.16
  • 0.2.15
  • 0.2.14
  • 0.2.13
27 results

setup.py

Blame
  • setup.py 1.72 KiB
    """Setup sources for cython."""
    # from distutils.core import setup
    # from distutils.extension import Extension
    import numpy
    from Cython.Build import cythonize
    from setuptools import Extension, find_packages, setup
    
    sourcefiles = [
        "mvcm/ancillary.pyx",
        "mvcm/c_tools/get_Reynolds_SST.c",  # SST
        "mvcm/c_tools/bilinearInterpSST.c",  # _|
        "mvcm/c_tools/swap_bytes.c",  # _|
        "mvcm/c_tools/get_NDVI_background.c",  # NDVI
        "mvcm/c_tools/get_Olson_eco.c",  # Olson eco type
        "mvcm/c_tools/getcoord.c",  # _|
        "mvcm/c_tools/get_GEOS.c",  # GEOS
        "mvcm/c_tools/get_geos_times.c",  # _|
        "mvcm/c_tools/get_granule_times.c",  # _|
        "mvcm/c_tools/get_ti_vars.c",  # _|
        "mvcm/c_tools/get_ti_weights.c",  # _|
        "mvcm/c_tools/read_GEOS.c",  # _|
        "mvcm/c_tools/read_GEOS_constants.c",  # _|
        "mvcm/c_tools/read_GEOS_lndocn.c",  # _|
        "mvcm/c_tools/assign_geos_vals.c",  # _|
        "mvcm/c_tools/cithr.c",  # Not sure
        "mvcm/c_tools/check_reg_uniformity.c",  # reg. uniformity for restoral
        "mvcm/c_tools/get_b1_thresholds.c",
        "mvcm/c_tools/conf_test.c",
    ]
    
    include_dirs = [
        "mvcm/c_tools/include",
        "/opt/hdf4/4.2.14-gcc-8.3/include",
        "/opt/hdfeos2/2.20-gcc-8.3/include",
        "/opt/netcdf4/4.7.0-gcc-8.3/include",
        numpy.get_include(),
    ]
    
    library_dirs = [
        "/opt/hdf4/4.2.14-gcc-8.3/lib",
        "/opt/hdfeos2/2.20-gcc-8.3/lib",
        "/opt/netcdf4/4.7.0-gcc-8.3/lib",
    ]
    
    extensions = [
        Extension(
            "ancillary_data",
            sourcefiles,
            include_dirs=include_dirs,
            library_dirs=library_dirs,
            libraries=["netcdf"],
        ),
    ]
    
    setup(
        packages=find_packages(),
        ext_modules=cythonize(
            extensions,
            compiler_directives={"language_level": "3"},
        ),
    )