-
Notifications
You must be signed in to change notification settings - Fork 145
/
python-openshift.spec
297 lines (253 loc) · 10 KB
/
python-openshift.spec
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
%if 0%{?rhel} == 7
%bcond_with python3
%bcond_without python2
%else
%bcond_with python2
%bcond_without python3
%endif
%global library openshift
%if 0%{?rhel} == 7
%global py3 python%{python3_pkgversion}
%else
%global py3 python3
%endif
Name: python-%{library}
Version: 0.10.0dev1
Release: 1%{?dist}
Summary: Python client for the OpenShift API
License: ASL 2.0
URL: https://github.com/openshift/openshift-restclient-python
Source0: https://github.com/openshift/openshift-restclient-python/archive/v%{version}.tar.gz
BuildArch: noarch
Epoch: 1
%if 0%{?with_python2}
%package -n python2-%{library}
Summary: Python client for the OpenShift API
%{?python_provide:%python_provide python2-%{library}}
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: git
Requires: python2
Requires: python2-kubernetes
Requires: python2-string_utils
Requires: python-requests
Requires: python2-ruamel-yaml
Requires: python-six
Requires: python-jinja2
%description -n python2-%{library}
Python client for the kubernetes API.
%endif
%if 0%{?with_python3}
%package -n %{py3}-%{library}
Summary: Python client for the OpenShift API
BuildRequires: %{py3}-devel
BuildRequires: %{py3}-setuptools
BuildRequires: git
Requires: %{py3}
Requires: %{py3}-kubernetes
Requires: %{py3}-string_utils
Requires: %{py3}-requests
Requires: %{py3}-ruamel-yaml
Requires: %{py3}-six
Requires: %{py3}-jinja2
%description -n %{py3}-%{library}
Python client for the OpenShift API
%endif # with_python3
#recommonmark not available for docs in EPEL
%if 0%{?fedora}
%package doc
Summary: Documentation for %{name}.
Provides: %{name}-doc
%if 0%{?with_python3}
BuildRequires: %{py3}-sphinx
BuildRequires: %{py3}-recommonmark
%else
BuildRequires: python2-sphinx
BuildRequires: python2-recommonmark
%endif
%description doc
%{summary}
%endif
%description
Python client for the OpenShift API
%prep
%autosetup -n openshift-restclient-python-%{version} -S git
#there is no include in RHEL7 setuptools find_packages
#the requirements are also done in an non-backwards compatible way
%if 0%{?rhel}
sed -i -e "s/find_packages(include='openshift.*')/['openshift', 'openshift.dynamic', 'openshift.helper']/g" setup.py
sed -i -e '30s/^/REQUIRES = [\n "jinja2",\n "kubernetes",\n "setuptools",\n "six",\n "ruamel.yaml",\n "python-string-utils",\n]\n/g' setup.py
sed -i -e "s/extract_requirements('requirements.txt')/REQUIRES/g" setup.py
#sed -i -e '14,21d' setup.py
%endif
%build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build
%endif
%if 0%{?fedora}
sphinx-build doc/source/ html
%{__rm} -rf html/.buildinfo
%endif
%install
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install
%endif
%check
#test dependencies are unpackaged
%if 0%{?with_python2}
%files -n python2-%{library}
%license LICENSE
%{python2_sitelib}/%{library}/*
%{python2_sitelib}/%{library}-*.egg-info
%exclude %{python2_sitelib}/scripts
%exclude /usr/requirements.txt/requirements.txt
%{_bindir}/openshift-ansible-gen
%endif
%if 0%{?with_python3}
%files -n %{py3}-%{library}
%license LICENSE
%{python3_sitelib}/%{library}/*
%{python3_sitelib}/%{library}-*.egg-info
%exclude %{python3_sitelib}/scripts
%exclude /usr/requirements.txt/requirements.txt
%{_bindir}/openshift-ansible-gen
%endif
%if 0%{?fedora}
%files doc
%license LICENSE
%doc html
%endif
%changelog
* Tue Dec 4 2018 Jason Montleon <[email protected]> 0.9.0-1
- Bump Version to 0.9.0
- Disable python 2 and enable python 3 builds for Fedora
* Tue Nov 06 2018 Jason Montleon <[email protected]> 0.8.0-1
- Fix tag condition ([email protected])
- Add watch to dynamic client (#221) ([email protected])
- Pin flake8 ([email protected])
- Do not decode response data in Python2 (#225)
- ResourceContainer does not contain delete method (#227)
- Add basic documentation for dynamic client verbs to README (#222)
- Add support for *List kinds (#213) ([email protected])
- Add validate helper function (#199) ([email protected])
- DynamicApiError: add a summary method (#211) ([email protected])
- Allow less strict kubernetes version requirements (#207) ([email protected])
- Add behavior-based tests for dynamic client (#208) ([email protected])
- Provide 'append_hash' for ConfigMaps and Secrets (#196) ([email protected])
- Allow creates on subresources properly (#201) ([email protected])
- Rename async to async_req for compatibility with python3 and kubernetes 7
(#197) ([email protected])
- Update kube_config to support concurrent clusters (#193)
* Mon Aug 06 2018 David Zager <[email protected]> 0.6.2-12
- Fix decode issue (#192) ([email protected])
- b64encode expects bytes not string ([email protected])
- Update releasers for 3.11 ([email protected])
* Mon Jul 23 2018 David Zager <[email protected]> 0.6.2-11
- include version update script ([email protected])
- Version bump to 0.6.2 ([email protected])
* Thu Jul 05 2018 David Zager <[email protected]> 0.6.1-10
- Install openshift.dynamic in RPM (#180) ([email protected])
* Thu Jul 05 2018 David Zager <[email protected]> 0.6.1-9
- Call functions on resource fields if they don't exist as name (#179)
- Release 0.6.1 ([email protected])
- Fix typo in argument passing for patch in dynamic client. (#176)
- Prevent duplicate keys when creating resource (#178) ([email protected])
- Allow content type specification in resource.patch (#174) ([email protected])
- release 0.6.0 ([email protected])
- Default singular name to name sans last letter (#173) ([email protected])
- Serialize body more thoroughly, won't always be passed as kwarg (#172)
- decode response data for python3 compatibility (#171) ([email protected])
- add dynamic client (#167) ([email protected])
- Fixes a bug when running fix_serialization on Kubernetes ExternalName… (#161)
* Tue Feb 27 2018 David Zager <[email protected]> 0.5.0-8
- Bug 1546843- RuntimeRawExtension objects will now deserialize
- Add compatiblity matrix ([email protected])
* Thu Feb 22 2018 David Zager <[email protected]> 0.5.0-7
- Update client for release k8s-client 5.0 ([email protected])
- Lint fix ([email protected])
- Add 'Bearer' to auth header ([email protected])
- All objects will now be instantiated with the proper configuration
- Restore API and model matching ([email protected])
* Thu Feb 08 2018 David Zager <[email protected]> 0.5.0.a1-6
- Allow beta k8s client ([email protected])
- Update client to use k8s client 5 ([email protected])
* Fri Jan 19 2018 David Zager <[email protected]> 0.4.0.a1-5
- Add object to primitives, treat as string for now ([email protected])
- update version to match new scheme ([email protected])
- regen modules ([email protected])
- Don't exclude modules that appear in both k8s and openshift from codegen
- Prefer openshift models to kubernetes models ([email protected])
- extra escape characters ([email protected])
- Update deployment condition to enforce python versioning standards
- Update releasers ([email protected])
* Tue Jan 16 2018 David Zager <[email protected]> 0.4.0-4
- fix linting ([email protected])
- Fix ansible module generation for 1.8/3.8 ([email protected])
- Remove old OpenShift versions ([email protected])
- Update watch test ([email protected])
- fix a few nil value errors ([email protected])
- regen modules ([email protected])
- Fixed some errors around object instantiation in the helpers
- Generated code ([email protected])
- Essentials for updating client-python to 4.0 ([email protected])
- Helper base cleanup (#132) ([email protected])
* Mon Dec 04 2017 Jason Montleon <[email protected]> 0.3.4-3
- prefix test names with the cluster type (openshift/k8s) to prevent collision
- after the argspec is fully created, go through all aliases and remove any
collisions ([email protected])
- Add test for build config ([email protected])
- Update _from conversion to handle all python keywords ([email protected])
- Handle _from -> from and vice versa in ansible helper ([email protected])
- add exclude for new file that won't be packaged (#125) ([email protected])
- Fix k8s_v1beta1_role_binding 404s (#122) ([email protected])
- Pin pytest version due to broken internal API ([email protected])
- Add custom_objects_spec.json to package data
* Fri Nov 03 2017 Jason Montleon <[email protected]> 0.3.4-2
- Update version
* Fri Nov 03 2017 Jason Montleon <[email protected]> 0.3.3-8
- Bug 1508969 - Add foreground propagation policy ([email protected])
- Document how to use the Dockerfile ([email protected])
- Add Dockerfile ([email protected])
- add unit test for watch ([email protected])
- Bump version ([email protected])
- Support watching openshift resources ([email protected])
* Fri Oct 13 2017 Jason Montleon <[email protected]> 0.3.3-7
- add python-requests rpm dep
* Fri Oct 13 2017 Jason Montleon <[email protected]> 0.3.3-6
- Fix module Python interpreter ([email protected])
- Version bump ([email protected])
- fix version regex and api_version formatting to prevent filtering out valid
APIs ([email protected])
* Fri Oct 06 2017 Jason Montleon <[email protected]> 0.3.2-5
- ignore requirements.txt in packaging
* Fri Oct 06 2017 Jason Montleon <[email protected]> 0.3.2-4
-
* Fri Oct 06 2017 Jason Montleon <[email protected]> 0.3.2-3
- make source name match package name
* Fri Oct 06 2017 Jason Montleon <[email protected]> 0.3.2-2
- Fix source name
* Fri Oct 06 2017 Jason Montleon <[email protected]> 0.3.2-1
- new package built with tito
* Wed May 10 2017 Jason Montleon <[email protected]> 1.0.0-0.3
- Initial Build