-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
74 lines (57 loc) · 1.83 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
72
73
74
#!/usr/bin/env python3
from os import path, environ
from setuptools import find_packages, setup
def readme():
with open("README.md", "r") as fh:
long_description = fh.read()
return long_description
cwd = path.abspath(path.dirname(__file__))
def metadata():
meta = {}
with open(path.join(cwd, "tracker_exporter", "_meta.py"), "r") as fh:
exec(fh.read(), meta) # nosec
return meta
def requirements():
requirements_list = []
with open("requirements.txt") as requirements:
for install in requirements:
requirements_list.append(install.strip())
return requirements_list
metadata = metadata()
readme = readme()
packages = find_packages()
requirements = requirements()
if environ.get("PYPI_FROM_GITHUB", 0) == 1:
version = "{{PKG_VERSION}}"
else:
version = metadata.get("version")
def main():
setup(
name="tracker-exporter",
version=version,
author=metadata.get("author"),
author_email=metadata.get("author_email"),
license=metadata.get("license"),
description=metadata.get("description"),
long_description=readme,
long_description_content_type="text/markdown",
url=metadata.get("url"),
download_url=metadata.get("download_url"),
keywords=["yandex tracker exporter", "yandex", "tracker", "etl", "agile", "cycle time"],
platforms=["osx", "linux"],
packages=packages,
classifiers = [
"Programming Language :: Python :: 3.10",
],
install_requires=requirements,
include_package_data=True,
python_requires=">=3.10",
entry_points={
"console_scripts": [
"tracker-exporter=tracker_exporter.main:main"
]
},
zip_safe=False
)
if __name__ == "__main__":
main()