setup.py 3.46 KB
Newer Older
1
2
3
#!/usr/bin/env python
# -*- coding: utf-8 -*-

4
from setuptools import setup, find_packages
5
import warnings
6
from importlib import util
7
8
9
10
11
12
13

with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read()

14
version = {}
Daniel Scheffler's avatar
Fix.  
Daniel Scheffler committed
15
with open("gms_preprocessing/version.py") as version_file:
16
17
    exec(version_file.read(), version)

18
requirements = [
19
20
    'matplotlib', 'numpy', 'scikit-learn', 'scipy', 'gdal', 'pyproj', 'shapely', 'ephem', 'pyorbital', 'dill', 'pytz',
    'pandas', 'numba', 'spectral>=0.16', 'geopandas', 'iso8601', 'pyinstrument', 'geoalchemy2', 'sqlalchemy',
21
    'psycopg2', 'py_tools_ds>=0.12.4', 'geoarray>=0.8.0', 'arosics>=0.8.7', 'six', 'tqdm', 'jsmin', 'cerberus',
22
    'nested_dict', 'openpyxl', 'timeout_decorator', 'redis', 'retools', 'redis-semaphore', 'psutil',
23
    'spechomo @ git+https://gitext.gfz-potsdam.de/geomultisens/spechomo#egg=spechomo'
Daniel Scheffler's avatar
Daniel Scheffler committed
24
    # spectral<0.16  has some problems with writing signed integer 8bit data
25
    # fmask # conda install -c conda-forge python-fmask
26
    # 'pyhdf', # conda install --yes -c conda-forge pyhdf
27
    # 'sicor', # pip install git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git
28
]
29
setup_requirements = []  # TODO(danschef): put setup requirements (distutils extensions, etc.) here
30
test_requirements = requirements + ['coverage', 'nose', 'nose2', 'nose-htmloutput', 'rednose']
31
32

setup(
33
    name='gms_preprocessing',
34
    version=version['__version__'],
35
36
37
38
    description="GeoMultiSens - Scalable Multi-Sensor Analysis of Remote Sensing Data",
    long_description=readme + '\n\n' + history,
    author="Daniel Scheffler",
    author_email='daniel.scheffler@gfz-potsdam.de',
39
    url='https://gitext.gfz-potsdam.de/geomultisens/gms_preprocessing',
40
41
    packages=find_packages(),  # searches for packages with an __init__.py and returns them as properly formatted list
    package_dir={'gms_preprocessing': 'gms_preprocessing'},
42
    package_data={"database": ["gms_preprocessing/database/*"]},
43
44
    include_package_data=True,
    install_requires=requirements,
Daniel Scheffler's avatar
Daniel Scheffler committed
45
    scripts=["bin/run_gms.py", "bin/run_gms.sh"],
46
47
    license="GNU General Public License v3",
    zip_safe=False,
48
    keywords='gms_preprocessing',
49
    classifiers=[
Daniel Scheffler's avatar
Daniel Scheffler committed
50
        'Development Status :: 4 - Beta',
51
52
53
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Natural Language :: English',
54
        "Programming Language :: Python :: 2",
55
        'Programming Language :: Python :: 2.7',
56
57
58
59
60
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
61
62
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
63
64
65
66
    ],
    test_suite='tests',
    tests_require=test_requirements
)
67
68
69


# check for pyhdf
70
if not util.find_spec('pyhdf'):
71
72
    warnings.warn('If you have not compiled GDAL with HDF4 support you need to install pyhdf manually '
                  '(see http://pysclint.sourceforge.net/pyhdf/install.html) for processing Terra ASTER data.'
73
                  'It is not automatically installed.')
74
75

# check for fmask
76
if not util.find_spec('fmask'):
77
78
    warnings.warn("FMask library is missing. If you want to compute cloud masks via FMask, you have to install it "
                  "manually (e.g., by running 'conda install -c conda-forge python-fmask').")