-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (49 loc) · 1.76 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
import distutils.text_file
import os
import sys
from pathlib import Path
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = "0.0.3"
class VerifyVersionCommand(install):
description = "verify that git tag matches VERSION prior to publishing to pypi"
def run(self):
tag = os.environ.get("GITHUB_REF")
if not tag:
info = "GITHUB_REF environment variable not available."
sys.exit(info)
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
def parse_requirements(req):
return distutils.text_file.TextFile(Path(__file__).with_name(req)).readlines()
with open(Path(__file__).with_name("README.md")) as f:
long_description = f.read()
setup(
name="esridumpgdf",
version=VERSION,
url="https://github.com/wchatx/esridumpgdf",
license="MIT",
packages=find_packages(exclude=("test*",)),
author_email="[email protected]",
description="ArcGIS Map and Feature Services to GeoDataFrame",
long_description=long_description,
long_description_content_type="text/markdown; charset=UTF-8",
install_requires=parse_requirements("requirements.txt"),
cmdclass={
"verify": VerifyVersionCommand,
},
python_requires=">=3.6",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
)