summaryrefslogtreecommitdiff
path: root/SPECS/python-kubernetes.spec
blob: 2cadb002d84ecfac51a339b74a233d562890656a (plain)
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
%{?python_enable_dependency_generator}

%if 0%{?rhel} == 8
%global py3 python3
%global py3dev python36
%endif
%if 0%{?rhel} >= 9
%global py3 python3
%global py3dev python3
%endif
%if 0%{?fedora} || 0%{?rhel} >= 9
%global py3 python3
%global py3dev python3
%endif

%global library kubernetes

Name:       python-%{library}
Epoch:      1
Version:    29.0.0
Release:    1%{?dist}
Summary:    Python client for the kubernetes API.
License:    ASL 2.0
URL:        https://pypi.python.org/pypi/kubernetes

Source0:    https://github.com/kubernetes-client/python/archive/v%{version}.tar.gz
BuildArch:  noarch

%package -n %{py3}-%{library}
Summary:    Kubernetes Python Client
BuildRequires:  git-core
BuildRequires:  %{py3dev}-devel
BuildRequires:  %{py3dev}-rpm-macros
BuildRequires:  %{py3}-setuptools
%if %{undefined __pythondist_requires}
%if 0%{?fedora}
Requires:  %{py3}-adal
%endif
Requires:  %{py3}-certifi
Requires:  %{py3}-six
Requires:  %{py3}-dateutil
Requires:  %{py3}-setuptools
Requires:  %{py3}-urllib3
Requires:  %{py3}-PyYAML
Requires:  %{py3}-google-auth
Requires:  %{py3}-websocket-client
Requires:  %{py3}-oauthlib
%endif

%description -n %{py3}-%{library}
Python client for the kubernetes API.

%package -n %{py3}-%{library}-tests
Summary:    Tests python-kubernetes library

Requires:  %{py3}-nose
Requires:  %{py3}-py
Requires:  %{py3}-mock
Requires:  %{py3}-%{library} = 1:%{version}-%{release}

%description -n %{py3}-%{library}-tests
Tests python-kubernetes library

#recommonmark not available for docs in EPEL
%if 0%{?fedora}
%package doc
Summary: Documentation for %{name}.
Provides: %{name}-doc = 1:%{version}-%{release}
BuildRequires: %{py3}-sphinx
BuildRequires: %{py3}-recommonmark
%description doc
%{summary}
%endif

%description
Python client for the kubernetes API.

%prep
%autosetup -n python-%{version} -S git

#This is needed until CentOS 8.1. The dep was
#updated because of a CVE in urllib3 and the
#corresponding package update is in EL 8.1
%if 0%{?rhel} == 8
sed -i 's/1.24.2/1.23/g' requirements.txt
%endif

#BZ1758141 - python autorequires do not handles asterisks properly.
#Fedora is using 0.56.0+ since at least Fedora 31 so this works aorund
#the issue by setting the minimum version above the problem versions.
%if 0%{?fedora} > 30
sed -i 's/websocket-client.*/websocket-client>=0.43.0/g' requirements.txt
%endif

%build
%py3_build

#11.0 adds spinx-markdown-tables as a requirement
#It is not packaged in Fedora
#%if 0%{?fedora}
#sphinx-build doc/source/ html
#%{__rm} -rf html/.buildinfo
#%endif

# Currently recommonmark requires an old version of commonmark,
# commonmark (<=0.5.4) wich doesn't exist in fedora rawhide so
# we disable docs generation until recommonmark is fixed to be
# compatible with recent version.
# generate html docs
# {__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
#rm -rf html/.{doctrees,buildinfo}

%install
%py3_install
cp -pr kubernetes/test %{buildroot}%{python3_sitelib}/%{library}/
cp -pr kubernetes/e2e_test %{buildroot}%{python3_sitelib}/%{library}/

%check

%if 0%{?fedora}
%files doc
%license LICENSE
#%doc html
%endif

%files -n %{py3}-%{library}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{library}
%{python3_sitelib}/%{library}-*.egg-info
%exclude %{python3_sitelib}/%{library}/test
%exclude %{python3_sitelib}/%{library}/e2e_test

%files -n %{py3}-%{library}-tests
%license LICENSE
%{python3_sitelib}/%{library}/test
%{python3_sitelib}/%{library}/e2e_test

%changelog
* Mon Jan 29 2024 Jason Montleon <jmontleo@redhat.com> - 1:29.0.0-1
- Update to 29.0.0

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:26.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:26.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:26.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue Jul 18 2023 Jason Montleon <jmontleo@redhat.com> - 1:26.1.0-2
- Replace git BuildRequire with git-core which is sufficient
- Remove conditional for python2

* Mon Jul 17 2023 Jason Montleon <jmontleo@redhat.com> - 1:26.1.0-1
- Update to 26.1.0

* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1:24.2.0-6
- Rebuilt for Python 3.12

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:24.2.0-5
 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Tue Aug 02 2022 Jason Montleon <jmontleo@redhat.com> - 1:24.2.0-4
- Align release / changelog

* Tue Aug 02 2022 Jason Montleon <jmontleo@redhat.com> - 1:24.2.0-1
- Update to 24.2.0

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:21.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:21.7.0-2
- Rebuilt for Python 3.11

* Sun Jan 30 2022 Jason Montleon <jmontleo@redhat.com> - 1:21.7.0-1
- Update to 21.7.0

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:18.20.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Aug 20 2021 Jason Montleon <jmontleo@redhat.com> - 1:18.20.0-1
* Update to 18.20.0

* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:11.0.0-9
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1:11.0.0-8
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:11.0.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Dec 11 2020 Jason Montleon <jmontleo@redhat.com> - 1:11.0.0-6
- Fix sub-package requirements to account for the epoch

* Fri Dec 11 2020 Jason Montleon <jmontleo@redhat.com> - 1:11.0.0-5
- Revert upadte until https://github.com/kubernetes-client/python/issues/1333 is fixed

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 11.0.0-3
- Rebuilt for Python 3.9

* Thu Apr 30 2020 Jason Montleon <jmontleo@redhat.com> - 11.0.0-2
- Fix EPEL 7 and 8 builds

* Thu Apr 30 2020 Jason Montleon <jmontleo@redhat.com> - 11.0.0-1
- Update to 11.0.0

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- Work around BZ1758141 for BZ1799937

* Fri Nov 08 2019 Jason Montleon <jmontleo@redhat.com> 10.0.1-1
- Update to upstream 10.0.1

* Fri Oct 18 2019 Jason Montleon <jmontleo@redhat.com> 9.0.1-1
- Update to upstream 9.0.1

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.1-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.1-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Feb 18 2019 Jason Montleon <jmontleo@redhat.com> 8.0.1-1
- Update to upstream 8.0.1

* Sat Feb 2 2019 Jason Montleon <jmontleo@redhat.com> 8.0.0-8
- add upstream patch to make python-adal optional
- remove python-adal requires for EL7 since it's not available in RHEL base, optional, or extras

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jan 17 2019 Jason Montleon <jmontleo@redhat.com> 8.0.0-6
- Only apply EL7 requirement patch on EL7 so Fedora dependency generator works correctly

* Thu Jan 17 2019 Jason Montleon <jmontleo@redhat.com> 8.0.0-5
- Keep python 2 enabled for Fedora 29.

* Tue Jan 15 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 8.0.0-4
- Enable python dependency generator

* Fri Dec 14 2018 Jason Montleon <jmontleo@redhat.com> 8.0.0-3
- Default to python 2 for EPEL 7 and python 3 for Fedora
- Add docs package for Fedora

* Mon Nov 26 2018 Jason Montleon <jmontleo@redhat.com> 8.0.0-2
- Patch setup.py to work with EL7 python-setuptools

* Mon Nov 5 2018 Jason Montleon <jmontleo@redhat.com> 8.0.0-1
- Update to 8.0.0

* Wed Oct 3 2018 Jason Montleon <jmontleo@redhat.com> 7.0.0-3
- Adding missing python3-adal dependency

* Wed Oct 3 2018 Jason Montleon <jmontleo@redhat.com> 7.0.0-2
- Adding missing python-adal dependency

* Wed Oct 3 2018 Jason Montleon <jmontleo@redhat.com> 7.0.0-1
- Update to 7.0.0

* Tue Feb 28 2017 Alfredo Moralejo <amoralej@redhat.com> 1.0.0-0.3.0b3
- Remove BRs for documentation building as it's not creating html docs.

* Mon Feb 27 2017 Alfredo Moralejo <amoralej@redhat.com> 1.0.0-0.2.0b3
- Fixed files section of python3-kubernetes-tests to contain python3 tests.

* Mon Feb 27 2017 Alfredo Moralejo <amoralej@redhat.com> 1.0.0-0.1.0b3
- Initial spec for release 1.0.0b3