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

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# gms_preprocessing, spatial and spectral homogenization of satellite remote sensing data
#
# Copyright (C) 2019  Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
# (project grant code: 01 IS 14 010 A-C).
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.

25
from setuptools import setup, find_packages
26
import warnings
27
from importlib import util
28
29
30
31
32
33
34

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

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

35
version = {}
Daniel Scheffler's avatar
Fix.  
Daniel Scheffler committed
36
with open("gms_preprocessing/version.py") as version_file:
37
38
    exec(version_file.read(), version)

39
requirements = [
40
41
    'matplotlib', 'numpy', 'scikit-learn', 'scipy', 'gdal', 'pyproj', 'shapely', 'ephem', 'pyorbital', 'dill', 'pytz',
    'pandas', 'numba', 'spectral>=0.16', 'geopandas', 'iso8601', 'pyinstrument', 'geoalchemy2', 'sqlalchemy',
42
    'psycopg2', 'py_tools_ds>=0.12.4', 'geoarray>=0.8.0', 'arosics>=0.8.7', 'six', 'tqdm', 'jsmin', 'cerberus',
43
    'nested_dict', 'openpyxl', 'timeout_decorator', 'redis', 'retools', 'redis-semaphore', 'psutil',
Daniel Scheffler's avatar
Daniel Scheffler committed
44
    # spectral<0.16  has some problems with writing signed integer 8bit data
45
    # fmask # conda install -c conda-forge python-fmask
46
    # 'pyhdf', # conda install --yes -c conda-forge pyhdf
47
    # 'sicor', # pip install git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git
48
]
49
setup_requirements = []  # TODO(danschef): put setup requirements (distutils extensions, etc.) here
50
test_requirements = requirements + ['coverage', 'nose', 'nose2', 'nose-htmloutput', 'rednose']
51
52

setup(
53
    name='gms_preprocessing',
54
    version=version['__version__'],
55
56
57
58
    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',
59
    url='https://gitext.gfz-potsdam.de/geomultisens/gms_preprocessing',
60
61
    packages=find_packages(),  # searches for packages with an __init__.py and returns them as properly formatted list
    package_dir={'gms_preprocessing': 'gms_preprocessing'},
62
    package_data={"database": ["gms_preprocessing/database/*"]},
63
64
    include_package_data=True,
    install_requires=requirements,
Daniel Scheffler's avatar
Daniel Scheffler committed
65
    scripts=["bin/run_gms.py", "bin/run_gms.sh"],
66
67
    license="GNU General Public License v3",
    zip_safe=False,
68
    keywords='gms_preprocessing',
69
    classifiers=[
Daniel Scheffler's avatar
Daniel Scheffler committed
70
        'Development Status :: 4 - Beta',
71
72
73
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Natural Language :: English',
74
        "Programming Language :: Python :: 2",
75
        'Programming Language :: Python :: 2.7',
76
77
78
79
80
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
81
82
83
84
    ],
    test_suite='tests',
    tests_require=test_requirements
)
85
86
87


# check for pyhdf
88
if not util.find_spec('pyhdf'):
89
90
    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.'
91
                  'It is not automatically installed.')
92
93

# check for fmask
94
if not util.find_spec('fmask'):
95
96
    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').")