forked from cobbler/cobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
136 lines (126 loc) · 4.66 KB
/
Copy pathsetup.py
File metadata and controls
136 lines (126 loc) · 4.66 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/usr/bin/env python3
"""
Setup module for Cobbler
"""
import os
from setuptools import find_namespace_packages, setup
_version_template = (
"# Auto-generated by setuptools_scm — do not edit\n"
'__version__ = "{version}"\n'
'__gitstamp__ = "{scm_version.node}"\n'
'__gitdate__ = "{scm_version.node_date}"\n'
'__builddate__ = "{scm_version.time}"\n'
)
def read_readme_file() -> str:
"""
read the contents of your README file
"""
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
return f.read()
#####################################################################
## Actual Setup.py Script ###########################################
#####################################################################
if __name__ == "__main__":
setup(
use_scm_version={
"write_to": "cobbler/_version.py",
"write_to_template": _version_template,
"fallback_version": "4.0.0",
},
name="cobbler",
description="Network Boot and Update Server",
long_description=read_readme_file(),
long_description_content_type="text/markdown",
author="Team Cobbler",
author_email="cobbler.project@gmail.com",
project_urls={
"Website": "https://cobbler.github.io",
"Documentation (Users)": "https://cobbler.readthedocs.io/en/latest",
"Documentation (Devs)": "https://github.com/cobbler/cobbler/wiki",
"Source": "https://github.com/cobbler/cobbler",
"Tracker": "https://github.com/cobbler/cobbler/issues",
},
license="GPLv2+",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.6",
"Topic :: System :: Installation/Setup",
"Topic :: System :: Systems Administration",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
],
keywords=["pxe", "autoinstallation", "dhcp", "tftp", "provisioning"],
install_requires=[
"requests",
"pyyaml",
"netaddr",
"Cheetah3",
"distro",
"python-ldap",
"dnspython",
"file-magic",
"schema",
"systemd-python",
"gunicorn",
"libcobblersignatures>=0.4.0",
"dataclasses; python_version < '3.7'",
"importlib-resources; python_version < '3.7'",
],
extras_require={
"mongodb": [
# Cobbler requires Python 3.6; Version 4.2+ requires Python 3.7
"pymongo>=4.2; python_version > '3.6'",
"pymongo<4.2; python_version <= '3.6'",
],
"docker": ["docker>=6.0"],
"windows": [
# "hivex",
"pefile"
],
"extra": ["psutil"], # debugging startup performance
"kerberos": ["gssapi"],
"lint": [
"importlib-resources",
# pyright is not written in Python and has to be installed differently.
"pyflakes",
"pycodestyle",
"pylint",
"black==22.3.0", # See .pre-commit-config.yaml
"types-requests",
"types-PyYAML",
"types-psutil",
"types-netaddr",
"types-setuptools",
"types-dataclasses",
# Due to https://github.com/python/typeshed/issues/15856
"types-mock==5.1.*",
"types-urllib3",
"isort",
"pre-commit",
],
"test": [
"pytest>6",
"pytest-cov",
"coverage",
"pytest-mock>3.3.0",
"pytest-benchmark",
"legacycrypt; python_version > '3.12'",
],
"docs": ["sphinx", "sphinx-rtd-theme", "sphinxcontrib-apidoc"],
# We require the current version to properly detect duplicate issues
# See: https://github.com/twisted/towncrier/releases/tag/22.8.0
"changelog": ["towncrier>=22.8.0"],
},
packages=find_namespace_packages(
exclude=["*tests*", "contrib*", "docs", "bin"]
),
include_package_data=True,
entry_points={
"console_scripts": [
"cobblerd = cobbler.cobblerd:main",
"cobbler-settings = cobbler.settings.cli:main",
]
},
)