setup.py 3.15 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 14

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

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

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

setup(
28
    name='gms_preprocessing',
29
    version='0.13.10',
30 31 32 33
    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',
34
    url='https://gitext.gfz-potsdam.de/geomultisens/gms_preprocessing',
35 36
    packages=find_packages(),  # searches for packages with an __init__.py and returns them as properly formatted list
    package_dir={'gms_preprocessing': 'gms_preprocessing'},
37
    package_data={"database": ["gms_preprocessing/database/*"]},
38 39
    include_package_data=True,
    install_requires=requirements,
Daniel Scheffler's avatar
Daniel Scheffler committed
40
    scripts=["bin/run_gms.py", "bin/run_gms.sh"],
41 42
    license="GNU General Public License v3",
    zip_safe=False,
43
    keywords='gms_preprocessing',
44
    classifiers=[
Daniel Scheffler's avatar
Daniel Scheffler committed
45
        'Development Status :: 4 - Beta',
46 47 48
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Natural Language :: English',
49
        "Programming Language :: Python :: 2",
50
        'Programming Language :: Python :: 2.7',
51 52 53 54 55
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
56 57 58 59
    ],
    test_suite='tests',
    tests_require=test_requirements
)
60 61 62


# check for pyhdf
63
if not util.find_spec('pyhdf'):
64 65
    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.'
66
                  'It is not automatically installed.')
67 68

# check for fmask
69
if not util.find_spec('fmask'):
70 71
    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').")