Newer
Older
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
from setuptools import setup, find_packages
# Import the library to make sure there is no side effect
import diapotb
def request_gdal_version():
try:
r = subprocess.run(['gdal-config', '--version'], stdout=subprocess.PIPE )
version = r.stdout.decode('utf-8').strip('\n')
print("GDAL %s detected on the system, using 'gdal=%s'" % (version, version))
return version
except Exception as ex: # pylint: disable=broad-except
return '3.2.2'
BASEDIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
metadata = {}
with open(os.path.join(BASEDIR, "diapotb", "__meta__.py"), "r") as f:
exec(f.read(), metadata)
with open(os.path.join(BASEDIR, "README.md"), "r") as f:
readme = f.read()
setup(
name = metadata["__title__"],
version = metadata["__version__"],
description = metadata["__description__"],
long_description = readme,
long_description_content_type = "text/markdown",
author = metadata["__author__"],
author_email = metadata["__author_email__"],
url = metadata["__url__"],
license = metadata["__license__"],
keywords = "Interferometry, SAR",
# Include all packages (except a few ones like tests)
packages=find_packages(exclude=("*.tests", "*.tests.*", "tests.*", "tests")),
package_data={"": ["LICENSE", "NOTICE"]},
include_package_data=True, # Take MANIFEST.in into account
python_requires='>=3.3, <4',
install_requires=[
"h5py",
"jsonschema",
"numpy",
"gdal=="+request_gdal_version(),
# Any way to require OTB ?
],
# TODO : extras_require
# extras_require={
# "dev": [
# "pylint", ...
# ],
# "docs": [
# "sphinx == 1.8.0",
# "sphinx_rtd_theme" ...
# ],
# },
project_urls={
"Bug Tracker": "https://gitlab.orfeo-toolbox.org/remote_modules/diapotb/-/issues",
"Documentation": "https://gitlab.orfeo-toolbox.org/remote_modules/diapotb/-/wikis/home",
"Source Code": "https://gitlab.orfeo-toolbox.org/remote_modules/diapotb",
},
scripts = ['diapotb/diapOTB.py', 'diapotb/diapOTB_S1IW.py', 'diapotb/SAR_MultiSlc.py', 'diapotb/SAR_MultiSlc_IW.py'],
)