forked from rhugonnet/xdem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
65 lines (54 loc) · 1.47 KB
/
setup.py
File metadata and controls
65 lines (54 loc) · 1.47 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
from __future__ import annotations
import os
from setuptools import setup
FULLVERSION = "0.0.7"
VERSION = FULLVERSION
with open(os.path.join(os.path.dirname(__file__), "README.md")) as infile:
LONG_DESCRIPTION = infile.read()
setup(
name="xdem",
version=FULLVERSION,
description="Set of tools to manipulate Digital Elevation Models (DEMs) ",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/GlacioHack/xdem",
author="The GlacioHack Team",
author_email="this-is-not-an-email@a.com", # This is needed for PyPi unfortunately.
license="BSD-3",
packages=["xdem"],
install_requires=[
"numpy",
"scipy",
"rasterio",
"geopandas",
"pyproj",
"tqdm",
"scikit-gstat",
"scikit-image",
"geoutils",
],
extras_require={
"rioxarray": ["rioxarray"],
"richdem": ["richdem"],
"opencv": ["opencv"],
"pytransform3d": ["pytransform3d"],
},
python_requires=">=3.8",
scripts=[],
zip_safe=False,
)
write_version = True
def write_version_py(filename: str | None = None) -> None:
cnt = """\
version = '%s'
short_version = '%s'
"""
if not filename:
filename = os.path.join(os.path.dirname(__file__), "xdem", "version.py")
a = open(filename, "w")
try:
a.write(cnt % (FULLVERSION, VERSION))
finally:
a.close()
if write_version:
write_version_py()