forked from WFP-VAM/modape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
82 lines (73 loc) · 2.53 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env python
# pylint: disable=invalid-name,E0401
"""setup.py for MODAPE"""
from setuptools import setup, Extension, find_packages
import numpy
# import _version
USE_CYTHON = "auto"
if USE_CYTHON:
try:
from Cython.Distutils import build_ext
if USE_CYTHON == "auto":
USE_CYTHON = True
except ImportError:
if USE_CYTHON == "auto":
USE_CYTHON = False
else:
raise
cmdclass = {}
ext_modules = []
if USE_CYTHON:
ext_modules += [
Extension("modape.whittaker",
["modape/_whittaker.pyx"], extra_compile_args=["-O3", "-ffast-math"])]
cmdclass.update({"build_ext": build_ext})
else:
ext_modules += [
Extension("modape.whittaker",
["modape/_whittaker.c"], extra_compile_args=["-O3", "-ffast-math"])]
# set py 3:
for ext in ext_modules:
ext.cython_directives = {"language_level": "3"}
setup(
name="modape",
description="MODIS Assimilation and Processing Engine",
version="1.0.3",
author="Valentin Pesendorfer",
author_email="[email protected]",
url="http://wfp-vam.github.io/modape",
long_description="""HDF5 based processing chain optimized for MODIS data combined with a State-of-the art whittaker smoother, implemented as fast C-extension through Cython and including a V-curve optimization of the smoothing parameter.\n\nFor more information, please visit: http://github.com/WFP-VAM/modape""",
include_dirs=[numpy.get_include()],
entry_points={
"console_scripts":[
"modis_download=modape.scripts.modis_download:cli_wrap",
"modis_collect=modape.scripts.modis_collect:cli_wrap",
"modis_smooth=modape.scripts.modis_smooth:cli_wrap",
"modis_window=modape.scripts.modis_window:cli_wrap",
"csv_smooth=modape.scripts.csv_smooth:cli_wrap",
"modis_info=modape.scripts.modis_info:cli_wrap",
"modape_version=_version.version_info:main",
]
},
packages=find_packages(),
cmdclass=cmdclass,
ext_modules=ext_modules,
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
],
setup_requires=["pytest-runner"],
tests_require=["pytest", "click"],
install_requires=[
"click>=8",
"numpy>=1.16.1",
"gdal>=2",
"h5py>=2.9",
"python-cmr>=0.4",
"requests>=2",
"pandas>=0.24",
"pycksum>=0.4.3",
],
python_requires=">=3, <4",
)