/
setup.py
executable file
·97 lines (70 loc) · 2.52 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import setuptools
from distutils.core import setup
import platform
from Cython.Build import cythonize
try:
from Cython.Distutils import build_ext
except:
from distutils.command import build_ext
import numpy as np
__version__ = '0.2.15'
mappy_name = 'MpGlue'
maintainer = 'Jordan Graesser'
maintainer_email = ''
description = 'Python raster and vector I/O'
git_url = 'http://github.com/jgrss/mpglue.git'
with open('README.md') as f:
long_description = f.read()
with open('LICENSE.txt') as f:
license_file = f.read()
with open('AUTHORS.txt') as f:
author_file = f.read()
required_packages = ['future',
'deprecation',
'retrying',
'GDAL',
'numpy',
'scipy',
'matplotlib',
'scikit-learn',
'scikit-image',
'pandas',
'beautifulsoup4',
'opencv-python',
'rtree',
'fiona',
'numexpr']
def get_pyx_list():
return ['mpglue/classification/*.pyx',
'mpglue/stats/*.pyx']
def get_packages():
return setuptools.find_packages()
def get_package_data():
return {'': ['*.md', '*.txt'],
'mpglue': ['classification/*.pyx',
'data/*.tif',
'data/*.vrt',
'stats/*.pyx']}
def get_console_dict():
return {'console_scripts': ['raster-calc=mpglue.raster_calc:main']}
def setup_package():
include_dirs = [np.get_include()]
metadata = dict(name=mappy_name,
maintainer=maintainer,
maintainer_email=maintainer_email,
description=description,
license=license_file,
version=__version__,
long_description=long_description,
author=author_file,
packages=get_packages(),
package_data=get_package_data(),
ext_modules=cythonize(get_pyx_list()),
cmdclass=dict(build_ext=build_ext),
download_url=git_url,
install_requires=required_packages,
include_dirs=include_dirs,
entry_points=get_console_dict())
setup(**metadata)
if __name__ == '__main__':
setup_package()