forked from fedora-infra/bodhi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
241 lines (218 loc) · 8.84 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
import os
from setuptools import setup, find_packages
import setuptools.command.egg_info
def get_requirements(requirements_file='requirements.txt'):
"""
Get the contents of a file listing the requirements.
Args:
requirements_file (str): path to a requirements file
Returns:
list: the list of requirements, or an empty list if
`requirements_file` could not be opened or read
"""
lines = open(requirements_file).readlines()
dependencies = []
for line in lines:
maybe_dep = line.strip()
if maybe_dep.startswith('#'):
# Skip pure comment lines
continue
if maybe_dep.startswith('git+'):
# VCS reference for dev purposes, expect a trailing comment
# with the normal requirement
__, __, maybe_dep = maybe_dep.rpartition('#')
else:
# Ignore any trailing comment
maybe_dep, __, __ = maybe_dep.partition('#')
# Remove any whitespace and assume non-empty results are dependencies
maybe_dep = maybe_dep.strip()
if maybe_dep:
dependencies.append(maybe_dep)
return dependencies
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
VERSION = '4.1.1'
# Possible options are at https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: System :: Software Distribution']
LICENSE = 'GPLv2+'
MAINTAINER = 'Fedora Infrastructure Team'
MAINTAINER_EMAIL = '[email protected]'
PLATFORMS = ['Fedora', 'GNU/Linux']
URL = 'https://github.com/fedora-infra/bodhi'
setuptools.command.egg_info.manifest_maker.template = 'BODHI_MANIFEST.in'
setup(
name='bodhi',
version=VERSION,
description='bodhi common package',
long_description=README,
classifiers=CLASSIFIERS,
license=LICENSE,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
platforms=PLATFORMS,
url=URL,
keywords='fedora',
packages=['bodhi'],
include_package_data=True,
zip_safe=False,
install_requires=[],
tests_require=[
'flake8',
'pytest',
'pytest-cov',
'webtest',
'conu >= 0.5.0',
'munch',
'psycopg2',
'requests',
],
)
setuptools.command.egg_info.manifest_maker.template = 'CLIENT_MANIFEST.in'
setup(
name='bodhi-client',
version=VERSION,
description='bodhi client',
long_description=README,
classifiers=CLASSIFIERS,
license=LICENSE,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
platforms=PLATFORMS,
url=URL,
keywords='fedora',
packages=['bodhi.client'],
include_package_data=False,
zip_safe=False,
install_requires=['click', 'python-fedora >= 0.9.0'],
entry_points="""\
[console_scripts]
bodhi = bodhi.client:cli
""")
setuptools.command.egg_info.manifest_maker.template = 'MESSAGES_MANIFEST.in'
setup(
name="bodhi-messages",
version=VERSION,
description="JSON schema for messages sent by Bodhi",
long_description=('Bodhi Messages\n==============\n\n This package contains the schema for '
'messages published by Bodhi.'),
url="https://github.com/fedora-infra/bodhi/",
# Possible options are at https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
license="GPLv2+",
maintainer="Fedora Infrastructure Team",
maintainer_email="[email protected]",
platforms=["Fedora", "GNU/Linux"],
keywords=["fedora", "fedora-messaging"],
packages=find_packages(
exclude=['bodhi.client', 'bodhi.client.*', 'bodhi.server', 'bodhi.server.*', 'bodhi.tests',
'bodhi.tests.*']),
include_package_data=True,
zip_safe=False,
install_requires=["fedora_messaging"],
test_suite="bodhi.tests.messages",
entry_points={
"fedora.messages": [
(
"bodhi.buildroot_override.tag.v1="
"bodhi.messages.schemas.buildroot_override:BuildrootOverrideTagV1"
), (
"bodhi.buildroot_override.untag.v1="
"bodhi.messages.schemas.buildroot_override:BuildrootOverrideUntagV1"
),
"bodhi.errata.publish.v1=bodhi.messages.schemas.errata:ErrataPublishV1",
"bodhi.compose.complete.v1=bodhi.messages.schemas.compose:ComposeCompleteV1",
"bodhi.compose.composing.v1=bodhi.messages.schemas.compose:ComposeComposingV1",
"bodhi.compose.start.v1=bodhi.messages.schemas.compose:ComposeStartV1",
"bodhi.compose.sync.done.v1=bodhi.messages.schemas.compose:ComposeSyncDoneV1",
"bodhi.compose.sync.wait.v1=bodhi.messages.schemas.compose:ComposeSyncWaitV1",
"bodhi.repo.done.v1=bodhi.messages.schemas.compose:RepoDoneV1",
"bodhi.update.comment.v1=bodhi.messages.schemas.update:UpdateCommentV1",
(
"bodhi.update.complete.stable.v1="
"bodhi.messages.schemas.update:UpdateCompleteStableV1"
),
(
"bodhi.update.complete.testing.v1="
"bodhi.messages.schemas.update:UpdateCompleteTestingV1"
),
(
"bodhi.update.status.testing.v1="
"bodhi.messages.schemas.update:UpdateReadyForTestingV1"
),
"bodhi.update.edit.v1=bodhi.messages.schemas.update:UpdateEditV1",
"bodhi.update.eject.v1=bodhi.messages.schemas.update:UpdateEjectV1",
"bodhi.update.karma.threshold.v1=bodhi.messages.schemas.update:UpdateKarmaThresholdV1",
"bodhi.update.request.revoke.v1=bodhi.messages.schemas.update:UpdateRequestRevokeV1",
"bodhi.update.request.stable.v1=bodhi.messages.schemas.update:UpdateRequestStableV1",
"bodhi.update.request.testing.v1=bodhi.messages.schemas.update:UpdateRequestTestingV1",
"bodhi.update.request.unpush.v1=bodhi.messages.schemas.update:UpdateRequestUnpushV1",
(
"bodhi.update.request.obsolete.v1="
"bodhi.messages.schemas.update:UpdateRequestObsoleteV1"
), (
"bodhi.update.requirements_met.stable.v1="
"bodhi.messages.schemas.update:UpdateRequirementsMetStableV1"
),
]
},
)
setuptools.command.egg_info.manifest_maker.template = 'SERVER_MANIFEST.in'
# Due to https://github.com/pypa/setuptools/issues/808, we need to include the bodhi superpackage
# and then remove it if we want find_packages() to find the bodhi.server package and its
# subpackages without including the bodhi top level package.
server_packages = find_packages(
exclude=['bodhi.client', 'bodhi.client.*', 'bodhi.messages', 'bodhi.messages.*', 'bodhi.tests',
'bodhi.tests.*'])
server_packages.remove('bodhi')
setup(
name='bodhi-server',
version=VERSION,
description='bodhi server',
long_description=README,
classifiers=CLASSIFIERS + [
'Framework :: Pyramid',
'Programming Language :: JavaScript',
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application"],
license=LICENSE,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
platforms=PLATFORMS,
url=URL,
keywords='web fedora pyramid',
packages=server_packages,
include_package_data=True,
zip_safe=False,
install_requires=get_requirements(),
message_extractors={'.': []},
entry_points="""\
[paste.app_factory]
main = bodhi.server:main
[console_scripts]
initialize_bodhi_db = bodhi.server.scripts.initializedb:main
bodhi-clean-old-composes = bodhi.server.scripts.clean_old_composes:clean_up
bodhi-push = bodhi.server.push:push
bodhi-expire-overrides = bodhi.server.scripts.expire_overrides:main
bodhi-untag-branched = bodhi.server.scripts.untag_branched:main
bodhi-approve-testing = bodhi.server.scripts.approve_testing:main
bodhi-check-policies = bodhi.server.scripts.check_policies:check
bodhi-skopeo-lite = bodhi.server.scripts.skopeo_lite:main
bodhi-sar = bodhi.server.scripts.sar:get_user_data
bodhi-shell = bodhi.server.scripts.bshell:get_bodhi_shell
""",
paster_plugins=['pyramid'])