-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup.py
58 lines (47 loc) · 1.57 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
import os
import subprocess
from codecs import open
from setuptools import setup
from setuptools.command import develop, build_py
def readme():
with open('README.md', 'r', 'utf-8') as f:
return f.read()
class CustomDevelop(develop.develop, object):
"""
Class needed for "pip install -e ."
"""
def run(self):
subprocess.check_call("make", shell=True)
super(CustomDevelop, self).run()
class CustomBuildPy(build_py.build_py, object):
"""
Class needed for "pip install srtm4"
"""
def run(self):
super(CustomBuildPy, self).run()
subprocess.check_call("make", shell=True)
subprocess.check_call("mkdir -p build/lib/", shell=True)
subprocess.check_call("cp -r bin data build/lib/", shell=True)
requirements = ['filelock',
'numpy',
'requests']
extras_require = {
'test': ['pytest', 'pytest-cov'],
'crop': ['rasterio', 'pyproj>=3.0', 'affine'],
}
setup(name="srtm4",
version="1.2.4",
description='SRTM4 elevation data reader',
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/cmla/srtm4',
author='Carlo de Franchis, Enric Meinhardt, Gabriele Facciolo',
author_email='[email protected]',
packages=['srtm4'],
install_requires=requirements,
extras_require=extras_require,
cmdclass={'develop': CustomDevelop,
'build_py': CustomBuildPy},
include_package_data=True,
python_requires='>=2.7',
zip_safe=False)