This repository was archived by the owner on Jun 5, 2025. It is now read-only.
forked from centreborelli/s2p
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (67 loc) · 2.1 KB
/
setup.py
File metadata and controls
80 lines (67 loc) · 2.1 KB
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
import subprocess
from setuptools import setup
from setuptools.command import build_py, develop
def readme():
with open("README.md", "r", encoding="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)
try:
from wheel.bdist_wheel import bdist_wheel
class BdistWheel(bdist_wheel):
"""
Class needed to build platform dependent binary wheels
"""
def finalize_options(self):
bdist_wheel.finalize_options(self)
self.root_is_pure = False
except ImportError:
BdistWheel = None
requirements = ['numpy',
'scipy',
'rasterio[s3]>=1.3.8',
'utm',
'pyproj>=3.0.0',
'beautifulsoup4[lxml]',
'plyfile',
'plyflatten>=0.2.0',
'ransac',
'rpcm @ git+https://github.com/20treeAI/rpcm.git@v1.4.11',
'srtm4',
'requests',
'opencv-python',
'geopandas',
'geopy']
extras_require = {
"test": ["pytest", "pytest-cov", "psutil"],
}
setup(name="s2p",
version="1.6.10",
description="Satellite Stereo Pipeline.",
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/cmla/s2p',
packages=['s2p'],
install_requires=requirements,
extras_require=extras_require,
cmdclass={'develop': CustomDevelop,
'build_py': CustomBuildPy,
'bdist_wheel': BdistWheel},
python_requires=">=3",
entry_points="""
[console_scripts]
s2p=s2p.cli:main
""")