forked from bmw-software-engineering/trlc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (53 loc) · 1.89 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
#!/usr/bin/env python3
import re
import sys
import setuptools
from trlc import version
with open("README.md", "r") as fd:
long_description = fd.read()
# For the readme to look right on PyPI we need to translate any
# relative links to absolute links to github.
fixes = []
for match in re.finditer(r"\[(.*)\]\((.*)\)", long_description):
if not match.group(2).startswith("http"):
fixes.append((match.span(0)[0], match.span(0)[1],
"[%s](%s/blob/main/%s)" % (match.group(1),
version.GITHUB_PROJECT,
match.group(2))))
for begin, end, text in reversed(fixes):
long_description = (long_description[:begin] +
text +
long_description[end:])
project_urls = {
"Bug Tracker" : version.BUGS_URL,
"Documentation" : version.DOCS_URL,
"Source Code" : version.CODE_URL,
}
setuptools.setup(
name="trlc",
version=version.TRLC_VERSION,
author="Bayerische Motoren Werke Aktiengesellschaft (BMW AG)",
author_email="[email protected]",
description="Treat Requirements Like Code",
long_description=long_description,
long_description_content_type="text/markdown",
url=project_urls["Source Code"],
project_urls=project_urls,
license="GNU General Public License v3",
packages=setuptools.find_packages(),
install_requires="PyVCG[api]==1.0.7",
python_requires=">=3.8, <3.13",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Topic :: Documentation",
"Topic :: Software Development",
],
entry_points={
"console_scripts": [
"trlc = trlc.trlc:main",
],
},
)