setup.py 3.28 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.7.13', 'arosics>=0.6.6', 'six', 'tqdm', 'jsmin', 'cerberus',
22
    'nested_dict', 'openpyxl', 'timeout_decorator', 'redis', 'retools', 'redis-semaphore', 'psutil'
Daniel Scheffler's avatar
Daniel Scheffler committed
23
    # spectral<0.16  has some problems with writing signed integer 8bit data
24
    # fmask # conda install -c conda-forge python-fmask
25
    # 'pyhdf', # conda install --yes -c conda-forge pyhdf
26
    # 'sicor', # pip install git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git
27
]
28
setup_requirements = []  # TODO(danschef): put setup requirements (distutils extensions, etc.) here
29
test_requirements = requirements + ['coverage', 'nose', 'nose2', 'nose-htmloutput', 'rednose']
30 31

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


# check for pyhdf
67
if not util.find_spec('pyhdf'):
68 69
    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.'
70
                  'It is not automatically installed.')
71 72

# check for fmask
73
if not util.find_spec('fmask'):
74 75
    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').")