-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
70 lines (58 loc) · 2.15 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
from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# Workaround for RHEL-8 RPM packaging that uses setuptools 39.2
# find_namespace_packages is supported since setuptools 40.1
# Loosely backported from https://github.com/pypa/setuptools/blob/main/setuptools/discovery.py
from setuptools import PackageFinder
class PEP420PackageFinder(PackageFinder):
@staticmethod
def _looks_like_package(_path):
return True
find_namespace_packages = PEP420PackageFinder.find
def get_description():
return "Publishing tools project family"
def get_long_description():
with open("README.md") as f:
text = f.read()
# Long description is everything after README's initial heading
idx = text.find("\n\n")
return text[idx:]
def get_requirements():
# Note: at time of writing, requirements.txt is empty.
# It exists anyway for a consistent setup.
with open("requirements.txt") as f:
return f.read().splitlines()
setup(
name="pubtools",
version="1.4.3",
packages=find_namespace_packages(where="src"),
package_dir={"": "src"},
url="https://github.com/release-engineering/pubtools",
license="GNU General Public License",
description=get_description(),
long_description=get_long_description(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
],
install_requires=get_requirements(),
extras_require={
"tracing": ["opentelemetry-api", "opentelemetry-sdk"],
},
python_requires=">=3.6",
project_urls={
"Documentation": "https://release-engineering.github.io/pubtools/",
"Changelog": "https://github.com/release-engineering/pubtools/blob/master/CHANGELOG.md",
},
entry_points={
"pubtools.hooks": [
"mallopt = pubtools._impl.mallopt",
]
},
)