-
Notifications
You must be signed in to change notification settings - Fork 77
/
setup.py
52 lines (43 loc) · 1.35 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
import subprocess
from codecs import open
from setuptools import setup, find_packages
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 s2p"
"""
def run(self):
super(CustomBuildPy, self).run()
subprocess.check_call("make", shell=True)
subprocess.check_call("cp -r bin lib build/lib/", shell=True)
requirements = ['numpy',
'scipy',
'rasterio[s3,test]',
'utm',
'pyproj',
'beautifulsoup4[lxml]',
'requests']
setup(name="s2p",
version="1.0b6",
description="Satellite Stereo Pipeline.",
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/miss3d/s2p',
packages=['s2p'],
install_requires=requirements,
cmdclass={'develop': CustomDevelop,
'build_py': CustomBuildPy},
entry_points="""
[console_scripts]
s2p=s2p.cli:main
""")