Browse code

Fix make check for python-hyperlink

Change-Id: I61d99100999c25cff11638d90edd813c18d69c45
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6319
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

Tapas Kundu authored on 2018/12/07 11:16:02
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        provides a pure-Python implementation of immutable URLs
5 5
 Name:           python-hyperlink
6 6
 Version:        18.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.
... ...
@@ -17,13 +17,19 @@ BuildRequires:  python2
17 17
 BuildRequires:  python2-libs
18 18
 BuildRequires:  python2-devel
19 19
 BuildRequires:  python-setuptools
20
-%if %{with_check}
21
-BuildRequires:  python-pytest
22
-%endif
23 20
 
21
+BuildRequires:  python3-devel
22
+BuildRequires:  python3-libs
23
+BuildRequires:  python3-setuptools
24
+BuildRequires:  python3-xml
24 25
 Requires:       python2
25 26
 Requires:       python2-libs
26
-
27
+%if %{with_check}
28
+BuildRequires:  python-idna
29
+BuildRequires:  python3-idna
30
+BuildRequires:  curl-devel
31
+BuildRequires:  openssl-devel
32
+%endif
27 33
 BuildArch:      noarch
28 34
 
29 35
 %description
... ...
@@ -31,13 +37,6 @@ Hyperlink provides a pure-Python implementation of immutable URLs. Based on RFC
31 31
 
32 32
 %package -n     python3-hyperlink
33 33
 Summary:        provides a pure-Python implementation of immutable URLs
34
-BuildRequires:  python3-devel
35
-BuildRequires:  python3-libs
36
-BuildRequires:  python3-setuptools
37
-BuildRequires:  python3-xml
38
-%if %{with_check}
39
-BuildRequires:  python3-pytest
40
-%endif
41 34
 
42 35
 Requires:       python3
43 36
 Requires:       python3-libs
... ...
@@ -56,6 +55,7 @@ pushd ../p3dir
56 56
 python3 setup.py build
57 57
 popd
58 58
 
59
+
59 60
 %install
60 61
 pushd ../p3dir
61 62
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
... ...
@@ -63,11 +63,16 @@ popd
63 63
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
64 64
 
65 65
 %check
66
-pytest2
66
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
67
+$easy_install_2 pytest
68
+pytest
67 69
 pushd ../p3dir
68
-pytest3
70
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
71
+$easy_install_3 pytest
72
+pytest
69 73
 popd
70 74
 
75
+
71 76
 %files
72 77
 %defattr(-,root,root)
73 78
 %{python2_sitelib}/*
... ...
@@ -77,6 +82,8 @@ popd
77 77
 %{python3_sitelib}/*
78 78
 
79 79
 %changelog
80
+*   Thu Dec 06 2018 Tapas Kundu <tkundu@vmware.com> 18.0.0-2
81
+-   Fix make check.
80 82
 *   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 18.0.0-1
81 83
 -   Update to version 18.0.0
82 84
 *   Wed Sep 20 2017 Bo Gan <ganb@vmware.com> 17.3.1-2