forked from GlacioHack/geoutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
71 lines (58 loc) · 1.72 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
59
60
61
62
63
64
65
66
67
68
69
70
71
from glob import glob
from os import path
from typing import Optional
from setuptools import setup
FULLVERSION = "0.0.5"
VERSION = FULLVERSION
write_version = True
def write_version_py(filename: Optional[str] = None) -> None:
cnt = """\
version = '%s'
short_version = '%s'
"""
if filename is None:
filename = path.join(path.dirname(__file__), "geoutils", "version.py")
a = open(filename, "w")
try:
a.write(cnt % (FULLVERSION, VERSION))
finally:
a.close()
if write_version:
write_version_py()
# get all data in the datasets module
data_files = []
for item in glob("geoutils/datasets/*"):
bname = path.basename(item)
if not bname.startswith("__"):
data_files.append(path.join("datasets", bname))
with open("README.md", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="geoutils",
version=FULLVERSION,
description="Tools for working with geospatial data",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://www.github.com/GlacioHack/geoutils/",
author="The GlacioHack Team",
license="BSD-3",
packages=["geoutils", "geoutils.datasets", "geoutils.georaster"],
package_data={"geoutils": data_files},
install_requires=[
"rasterio",
"geopandas >= 0.10.0",
"pyproj",
"scipy",
"typing-extensions; python_version < '3.8'",
"matplotlib",
"tqdm",
],
extras_require={"rioxarray": ["rioxarray"]},
scripts=["geoutils/geoviewer.py"],
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
],
)