setup.py 3.82 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
# geoarray, A fast Python interface for image geodata - either on disk or in memory.
#
# 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 28
from pkgutil import find_loader

29

Daniel Scheffler's avatar
Daniel Scheffler committed
30
with open('README.rst') as readme_file:
31 32 33 34 35
    readme = readme_file.read()

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

36
version = {}
37
with open("geoarray/version.py") as version_file:
38 39
    exec(version_file.read(), version)

40
requirements = [
41
    'py_tools_ds>=0.10.0', 'numpy', 'matplotlib', 'six', 'gdal', 'shapely', 'geopandas', 'pandas', 'dill', 'mpld3',
Daniel Scheffler's avatar
Daniel Scheffler committed
42 43 44 45
    'geojson', 'folium', 'scikit-image', 'dask>=0.15.0'
    # dask is only indirectly needed but updating to >=0.15.0 resolves https://stackoverflow.com/questions/43833081/
    #   attributeerror-module-object-has-no-attribute-computation
    # 'holoviews', #  conda install --yes -c ioam bokeh holoviews ; \
46
    # git+https://github.com/matplotlib/basemap.git  # conda install --yes -c conda-forge basemap
47
    ]
48
setup_requirements = ['dask>=0.15.0']
Daniel Scheffler's avatar
Daniel Scheffler committed
49
test_requirements = requirements + ["coverage", "nose", "nose2", "nose-htmloutput", "rednose"]
50 51 52

setup(
    name='geoarray',
53
    version=version['__version__'],
54 55 56 57
    description="Fast Python interface for geodata - either on disk or in memory.",
    long_description=readme + '\n\n' + history,
    author="Daniel Scheffler",
    author_email='danschef@gfz-potsdam.de',
58
    url='https://gitext.gfz-potsdam.de/danschef/geoarray',
59 60
    packages=find_packages(),  # searches for packages with an __init__.py and returns them as properly formatted list
    package_dir={'geoarray': 'geoarray'},
61 62 63 64
    include_package_data=True,
    install_requires=requirements,
    license="GNU General Public License v3",
    zip_safe=False,
65
    keywords=['geoarray', 'geoprocessing', 'gdal', 'numpy'],
66
    classifiers=[
67
        'Development Status :: 4 - Beta',
68 69 70
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Natural Language :: English',
71
        "Programming Language :: Python :: 2",
72
        'Programming Language :: Python :: 2.7',
73 74 75 76 77
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
78 79
    ],
    test_suite='tests',
80 81
    tests_require=test_requirements,
    setup_requires=setup_requirements
82
)
83 84 85


# check for holoviews
86
if not find_loader('holoviews'):
87
    warnings.warn('You need to install holoviews manually (see www.holoviews.org) if you want to use interactive '
88
                  'plotting. It is not automatically installed.')
89 90

# check for basemap
91
if not find_loader('mpl_toolkits.basemap'):
92
    warnings.warn('You need to install basemap manually (see www./matplotlib.org/basemap) if you want to plot maps. '
93
                  'It is not automatically installed.')