Browse code

python-coverage : fix make check errors.

Change-Id: I71356247e05487bba608c59343d3e7a767854022
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3481
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Chang Lee <changlee@vmware.com>

xiaolin-vmware authored on 2017/08/11 05:51:32
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@
6 6
 Summary:        Code coverage measurement for Python.
7 7
 Name:           python-coverage
8 8
 Version:        4.3.4
9
-Release:        4%{?dist}
9
+Release:        5%{?dist}
10 10
 License:        Apache 2.0
11 11
 Group:          Development/Languages/Python
12 12
 Vendor:         VMware, Inc.
... ...
@@ -19,6 +19,10 @@ BuildRequires:  python2
19 19
 BuildRequires:  python2-libs
20 20
 BuildRequires:  python2-devel
21 21
 BuildRequires:  python-setuptools
22
+%if %{with_check}
23
+BuildRequires:  python-pytest
24
+BuildRequires:  python-six
25
+%endif
22 26
 Requires:       python2
23 27
 Requires:       python2-libs
24 28
 Requires:       python-xml
... ...
@@ -33,6 +37,10 @@ BuildRequires:  python3-devel
33 33
 BuildRequires:  python3-libs
34 34
 BuildRequires:  python3-setuptools
35 35
 BuildRequires:  python3-xml
36
+%if %{with_check}
37
+BuildRequires:  python3-pytest
38
+BuildRequires:  python3-six
39
+%endif
36 40
 Requires:       python3
37 41
 Requires:       python3-libs
38 42
 Requires:       python3-xml
... ...
@@ -58,9 +66,11 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
58 58
 popd
59 59
 
60 60
 %check
61
-python2 setup.py test
61
+easy_install tox
62
+easy_install PyContracts
63
+LANG=en_US.UTF-8 tox -e py27
62 64
 pushd ../p3dir
63
-python3 setup.py test
65
+LANG=en_US.UTF-8 tox -e py36
64 66
 popd
65 67
 
66 68
 %files
... ...
@@ -77,6 +87,8 @@ popd
77 77
 %{_bindir}/coverage-%{python3_version}
78 78
 
79 79
 %changelog
80
+*   Thu Aug 10 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.4-5
81
+-   Fixed make check errors
80 82
 *   Fri Jul 07 2017 Chang Lee <changlee@vmware.com> 4.3.4-4
81 83
 -   Add python-xml and pyhton3-xml to  Requires.
82 84
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.4-3