-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
50 lines (41 loc) · 1.35 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
import setuptools
import os
from subprocess import check_output
command = "git describe --tags --dirty"
version_format = ("{tag}.dev{commitcount}+{gitsha}",)
def format_version(version, fmt):
parts = version.split("-")
assert len(parts) in (3, 4)
dirty = len(parts) == 4
tag, count, sha = parts[:3]
if count == "0" and not dirty:
return tag
return fmt.format(tag=tag, commitcount=count, gitsha=sha.lstrip("g"))
version = check_output(command.split()).decode("utf-8").strip()
with open("README.rst", "r") as fh:
long_description = fh.read()
with open("requirements.txt", "r") as fh:
install_requires = fh.read().split("\n")
setuptools.setup(
name="ddom",
version=version,
author="Wilhelm Putz",
author_email="jinjamator@aci.guru",
description="",
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/jinjamator/ddom",
include_package_data=True,
packages=["ddom"],
install_requires=install_requires,
license="ASL V2",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Topic :: System :: Installation/Setup",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
],
python_requires=">=3.8",
zip_safe=False,
)