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

4
5
# gms_preprocessing, spatial and spectral homogenization of satellite remote sensing data
#
6
# Copyright (C) 2020  Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
7
8
9
10
11
12
#
# 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
13
# the terms of the GNU General Public License as published by the Free Software
14
15
# Foundation, either version 3 of the License, or (at your option) any later version.
# Please note the following exception: `gms_preprocessing` depends on tqdm, which
16
17
18
# is distributed under the Mozilla Public Licence (MPL) v2.0 except for the files
# "tqdm/_tqdm.py", "setup.py", "README.rst", "MANIFEST.in" and ".gitignore".
# Details can be found here: https://github.com/tqdm/tqdm/blob/master/LICENCE.
19
20
21
22
23
24
25
26
27
#
# 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/>.

28
from setuptools import setup, find_packages
29
import warnings
30
from importlib import util
31
32
33
34
35
36
37

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

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

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

42
requirements = [
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
    'arosics>=1.0.0',
    'cerberus',
    'dill',
    'ephem',
    'gdal',
    'geoalchemy2',
    'geoarray>=0.9.0',
    'geopandas',
    'iso8601',
    'jsmin',
    'matplotlib',
    'natsort',
    'nested_dict',
    'numpy',
    'pandas',
    'psutil',
    'psycopg2',
    'pyinstrument',
    'pyorbital',
    'pyproj',
    'pyrsr>=0.3.1',
    'py_tools_ds>=0.12.4',
    'pytz',
    'redis',
    'redis-semaphore',
    'retools',
    'scikit-learn',
    'scipy',
    'shapely',
    'sicor',
    'spechomo',
    'spectral>=0.16',  # spectral<0.16  has some problems with writing signed integer 8bit data
    'sqlalchemy',
    'timeout_decorator',
    'tqdm',
78
    # fmask # conda install -c conda-forge python-fmask
79
    # 'pyhdf', # conda install --yes -c conda-forge pyhdf
80
]
81
setup_requirements = []  # TODO(danschef): put setup requirements (distutils extensions, etc.) here
82
test_requirements = requirements + ['coverage', 'nose', 'nose2', 'nose-htmloutput', 'rednose']
83
84

setup(
85
    name='gms_preprocessing',
86
    version=version['__version__'],
87
88
89
90
    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',
91
    url='https://gitext.gfz-potsdam.de/geomultisens/gms_preprocessing',
92
93
    packages=find_packages(),  # searches for packages with an __init__.py and returns them as properly formatted list
    package_dir={'gms_preprocessing': 'gms_preprocessing'},
94
    package_data={"database": ["gms_preprocessing/database/*"]},
95
96
    include_package_data=True,
    install_requires=requirements,
Daniel Scheffler's avatar
Daniel Scheffler committed
97
    scripts=["bin/run_gms.py", "bin/run_gms.sh"],
98
99
    license="GNU General Public License v3",
    zip_safe=False,
100
    keywords='gms_preprocessing',
101
    classifiers=[
Daniel Scheffler's avatar
Daniel Scheffler committed
102
        'Development Status :: 4 - Beta',
103
104
105
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Natural Language :: English',
106
107
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
108
109
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
110
        'Programming Language :: Python :: 3.9',
111
112
113
114
    ],
    test_suite='tests',
    tests_require=test_requirements
)
115
116
117


# check for pyhdf
118
if not util.find_spec('pyhdf'):
119
120
    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.'
121
                  'It is not automatically installed.')
122
123

# check for fmask
124
if not util.find_spec('fmask'):
125
126
    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').")