Browse code

python-service_identity - fix make check

Change-Id: I10045f394d5d68bd4689a59c101b3e641a291562
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6508
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Ankit Jain <ankitja@vmware.com>

Tapas Kundu authored on 2019/01/15 06:18:34
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Service identity verification for pyOpenSSL.
5 5
 Name:           python-service_identity
6 6
 Version:        17.0.0
7
-Release:        1%{?dist}
7
+Release:        2%{?dist}
8 8
 License:        MIT
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
... ...
@@ -12,12 +12,17 @@ Distribution:   Photon
12 12
 Url:            https://pypi.python.org/pypi/service_identity
13 13
 Source0:        service_identity-%{version}.tar.gz
14 14
 %define sha1    service_identity=63408ac8b2cfd70f3b31fdcfefc1414b5b965cbc
15
-
15
+Source1:        service_identity_tests-%{version}.tar.gz
16
+%define sha1    service_identity_tests=874bff43bfe0565ebc279476c66c08c2fdf54973
16 17
 BuildRequires:  python2
17 18
 BuildRequires:  python2-libs
18 19
 BuildRequires:  python2-devel
19 20
 BuildRequires:  python-setuptools
20 21
 BuildRequires:  python-incremental
22
+BuildRequires:  python3-devel
23
+BuildRequires:  python3-libs
24
+BuildRequires:  python3-setuptools
25
+BuildRequires:  python3-xml
21 26
 %if %{with_check}
22 27
 BuildRequires:	python-pytest
23 28
 BuildRequires:	python-pyasn1-modules
... ...
@@ -25,6 +30,14 @@ BuildRequires:	python-pyasn1
25 25
 BuildRequires:	python-attrs
26 26
 BuildRequires:	python-pyOpenSSL
27 27
 BuildRequires:	python-idna
28
+BuildRequires:  python-pip
29
+BuildRequires:  python3-pip
30
+BuildRequires:  python3-pytest
31
+BuildRequires:  python3-pyasn1-modules
32
+BuildRequires:  python3-pyasn1
33
+BuildRequires:  python3-attrs
34
+BuildRequires:  python3-pyOpenSSL
35
+BuildRequires:  python3-idna
28 36
 %endif
29 37
 
30 38
 Requires:       python2
... ...
@@ -43,18 +56,6 @@ In the simplest case, this means host name verification. However, service_identi
43 43
 
44 44
 %package -n     python3-service_identity
45 45
 Summary:        python-service_identity
46
-BuildRequires:  python3-devel
47
-BuildRequires:  python3-libs
48
-BuildRequires:  python3-setuptools
49
-BuildRequires:  python3-xml
50
-%if %{with_check}
51
-BuildRequires:	python3-pytest
52
-BuildRequires:	python3-pyasn1-modules
53
-BuildRequires:	python3-pyasn1
54
-BuildRequires:	python3-attrs
55
-BuildRequires:	python3-pyOpenSSL
56
-BuildRequires:	python3-idna
57
-%endif
58 46
 
59 47
 Requires:       python3
60 48
 Requires:       python3-libs
... ...
@@ -67,6 +68,7 @@ Python 3 version.
67 67
 
68 68
 %prep
69 69
 %setup -q -n service_identity-%{version}
70
+tar xf %{SOURCE1} --no-same-owner
70 71
 
71 72
 %build
72 73
 python2 setup.py build
... ...
@@ -77,7 +79,17 @@ python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
77 77
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
78 78
 
79 79
 %check
80
+pip install pathlib2
81
+pip install funcsigs
82
+pip install pluggy
83
+pip install atomicwrites
84
+pip install more-itertools
80 85
 PYTHONPATH="%{buildroot}%{python2_sitelib}" py.test2
86
+pip3 install pathlib2
87
+pip3 install funcsigs
88
+pip3 install pluggy
89
+pip3 install atomicwrites
90
+pip3 install more-itertools
81 91
 PYTHONPATH="%{buildroot}%{python3_sitelib}" py.test3
82 92
 
83 93
 %files
... ...
@@ -89,6 +101,8 @@ PYTHONPATH="%{buildroot}%{python3_sitelib}" py.test3
89 89
 %{python3_sitelib}/*
90 90
 
91 91
 %changelog
92
+*   Mon Jan 14 2019 Tapas Kundu <tkundu@vmware.com> 17.0.0-2
93
+-   Fix make check
92 94
 *   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 17.0.0-1
93 95
 -   Update to version 17.0.0
94 96
 *   Fri Jul 21 2017 Divya Thaluru <dthaluru@vmware.com> 16.0.0-3