-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathsetup_utils.py
60 lines (51 loc) · 2.18 KB
/
setup_utils.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 re
from pathlib import Path
from setuptools import setup, find_packages
def get_parent_directory():
return Path(__file__).parent
def get_version():
_version_file_contents = (get_parent_directory() / "version.py").read_text()
matched = re.search(r'"(.*)"', _version_file_contents)
return matched.group(1) if matched is not None else "UNKNOWN VERSION"
def get_requirements_from_file(file):
with open(get_parent_directory() / file) as f:
required = f.read().splitlines()
return required
def do_the_setup(package_name, package_description, required, extra_requires):
setup(
name=package_name,
version=get_version(),
description=package_description,
author="ApprovalTests Contributors",
author_email="[email protected]",
url="https://github.com/approvals/ApprovalTests.Python",
python_requires=">=3.8",
packages=find_packages(include=["approvaltests*"]),
package_data={"approvaltests": ["reporters/reporters.json"]},
entry_points={
"pytest11": [
"approvaltests_pytest = approvaltests.integrations.pytest.pytest_plugin",
],
},
install_requires=required,
extras_require=extra_requires,
long_description=(get_parent_directory() / "README.md").read_text(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
],
)