Skip to content

Commit 0addaf5

Browse files
committed
Updated Python dependencies
Change-Id: Ife0f3461adfa42c5507acebe32ba023a4383f374
1 parent 871bb11 commit 0addaf5

File tree

4 files changed

+263
-196
lines changed

4 files changed

+263
-196
lines changed

specs/dogtag-pki.spec.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Release: 1%{?_timestamp}%{?_commit_id}%{?dist}
2626
# Python
2727
################################################################################
2828

29-
%if 0%{?fedora} || 0%{?rhel} > 7
30-
%global with_python3 1
31-
%else
29+
%if 0%{?rhel} && 0%{?rhel} <= 7
3230
%global with_python3 0
31+
%else
32+
%global with_python3 1
3333
%endif
3434

3535
# Make certain that this 'meta' package requires the latest version(s)

specs/pki-console.spec.in

+58-37
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,30 @@ Source: https://github.com/dogtagpki/pki/archive/v%{version}/pki-%{version}.tar.
4343
# Python
4444
################################################################################
4545

46+
# Python 2 packages
47+
%if 0%{!?with_python2:1}
48+
%if 0%{?rhel} && 0%{?rhel} <= 7 || 0%{?fedora} && 0%{?fedora} <= 28
49+
%global with_python2 1
50+
%else
51+
%global with_python2 0
52+
%endif
53+
%endif
54+
4655
# Python 3 packages
4756
%if 0%{!?with_python3:1}
48-
%if 0%{?fedora} || 0%{?rhel} > 7
49-
%global with_python3 1
50-
%else
57+
%if 0%{?rhel} && 0%{?rhel} <= 7
5158
%global with_python3 0
59+
%else
60+
%global with_python3 1
5261
%endif
5362
%endif
5463

55-
# Python 2 packages
56-
%{!?with_python2:%global with_python2 1}
57-
5864
# Use Python 3 for all commands?
5965
%if 0%{!?with_python3_default:1}
60-
%if 0%{?fedora} >= 28 || 0%{?rhel} > 7
61-
%global with_python3_default 1
62-
%else
66+
%if 0%{?rhel} && 0%{?rhel} <= 7 || 0%{?fedora} && 0%{?fedora} <= 27
6367
%global with_python3_default 0
68+
%else
69+
%global with_python3_default 1
6470
%endif
6571
%endif
6672

@@ -141,13 +147,20 @@ BuildRequires: nuxwdog-client-java >= 1.0.3-13
141147
BuildRequires: openldap-devel
142148
BuildRequires: pkgconfig
143149
BuildRequires: policycoreutils
150+
144151
%if 0%{?rhel} && 0%{?rhel} <= 7
145152
BuildRequires: python-lxml
146153
BuildRequires: python-sphinx
147154
%else
155+
%if 0%{?fedora} && 0%{?fedora} <= 28
148156
BuildRequires: python2-lxml
149157
BuildRequires: python2-sphinx
158+
%else
159+
BuildRequires: python3-lxml
160+
BuildRequires: python3-sphinx
161+
%endif
150162
%endif
163+
151164
BuildRequires: velocity
152165
BuildRequires: xalan-j2
153166
BuildRequires: xerces-j2
@@ -173,50 +186,69 @@ BuildRequires: resteasy-core >= 3.0.17-1
173186
BuildRequires: resteasy-jackson-provider >= 3.0.17-1
174187
%endif
175188

176-
%if 0%{?fedora} || 0%{?rhel} > 7
177189
%if 0%{?with_python2}
178-
BuildRequires: pylint
179-
%if 0%{?fedora} >= 28
180-
BuildRequires: python2-flake8 >= 2.5.4
181-
# python-flake8 2.5.4 package should require pyflakes >= 1.2.3
182-
BuildRequires: python2-pyflakes >= 1.2.3
190+
%if 0%{?rhel} && 0%{?rhel} <= 7
191+
# no pylint
183192
%else
193+
BuildRequires: pylint
194+
%if 0%{?fedora} && 0%{?fedora} <= 27
184195
BuildRequires: python-flake8 >= 2.5.4
185196
BuildRequires: pyflakes >= 1.2.3
197+
%else
198+
BuildRequires: python2-flake8 >= 2.5.4
199+
BuildRequires: python2-pyflakes >= 1.2.3
200+
%endif
186201
%endif
187202
%endif # with_python2
188203

189204
%if 0%{?with_python3}
190205
BuildRequires: python3-pylint
191-
# python3-flake8 2.5.4 package should require python3-pyflakes >= 1.2.3
192206
BuildRequires: python3-flake8 >= 2.5.4
193207
BuildRequires: python3-pyflakes >= 1.2.3
194208
%endif # with_python3
195-
%endif
196209

197210
%if 0%{?with_python2}
198211
BuildRequires: python2
199212
BuildRequires: python2-devel
200213
BuildRequires: python2-cryptography
201-
%if 0%{?fedora} >= 28 || 0%{?rhel} > 7
202-
BuildRequires: python2-nss
203-
BuildRequires: python2-requests >= 2.6.0
204-
BuildRequires: python2-six
205-
BuildRequires: python2-libselinux
206-
BuildRequires: python2-policycoreutils
207-
BuildRequires: python2-ldap
208-
%else
214+
%if 0%{?rhel} && 0%{?rhel} <= 7 || 0%{?fedora} && 0%{?fedora} <= 27
209215
BuildRequires: python-nss
210216
BuildRequires: python-requests >= 2.6.0
211217
BuildRequires: python-six
212218
BuildRequires: libselinux-python
213219
BuildRequires: policycoreutils-python
214220
BuildRequires: python-ldap
221+
%else
222+
BuildRequires: python2-nss
223+
BuildRequires: python2-requests >= 2.6.0
224+
BuildRequires: python2-six
225+
BuildRequires: python2-libselinux
226+
BuildRequires: python2-policycoreutils
227+
BuildRequires: python2-ldap
215228
%endif
216-
%if 0%{?fedora} || 0%{?rhel} > 7
229+
%if 0%{?rhel} && 0%{?rhel} <= 7
230+
# no policycoreutils-python-utils
231+
%else
217232
BuildRequires: policycoreutils-python-utils
218233
%endif
219234
%endif # with_python2
235+
236+
%if 0%{?with_python3}
237+
BuildRequires: python3
238+
BuildRequires: python3-devel
239+
BuildRequires: python3-cryptography
240+
BuildRequires: python3-lxml
241+
%if 0%{?rhel} && 0%{?rhel} <= 7 || 0%{?fedora} && 0%{?fedora} <= 27
242+
# no python3-libselinux
243+
%else
244+
BuildRequires: python3-libselinux
245+
%endif
246+
BuildRequires: python3-nss
247+
BuildRequires: python3-pyldap
248+
BuildRequires: python3-requests >= 2.6.0
249+
BuildRequires: python3-six
250+
%endif # with_python3
251+
220252
BuildRequires: junit
221253
BuildRequires: jpackage-utils >= 0:1.7.5-10
222254
%if 0%{?rhel} && 0%{?rhel} <= 7
@@ -242,17 +274,6 @@ BuildRequires: tomcat >= 1:9.0.7
242274
%endif
243275
%endif
244276

245-
%if 0%{?with_python3}
246-
BuildRequires: python3
247-
BuildRequires: python3-devel
248-
BuildRequires: python3-cryptography
249-
BuildRequires: python3-lxml
250-
BuildRequires: python3-nss
251-
BuildRequires: python3-pyldap
252-
BuildRequires: python3-requests >= 2.6.0
253-
BuildRequires: python3-six
254-
%endif # with_python3
255-
256277
# additional build requirements needed to build native 'tpsclient'
257278
# REMINDER: Revisit these once 'tpsclient' is rewritten as a Java app
258279
BuildRequires: apr-devel

0 commit comments

Comments
 (0)