Change-Id: I2a4d58c9d8fc1c6f9b296ae1b2017435510e1930
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3219
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| ... | ... |
@@ -1,10 +1,12 @@ |
| 1 | 1 |
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
| 2 | 2 |
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
| 3 |
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
|
|
| 4 |
+%{!?python2_version: %define python2_version %(python2 -c "import sys; sys.stdout.write(sys.version[:3])")}
|
|
| 3 | 5 |
|
| 4 | 6 |
Summary: Code coverage measurement for Python. |
| 5 | 7 |
Name: python-coverage |
| 6 | 8 |
Version: 4.3.4 |
| 7 |
-Release: 1%{?dist}
|
|
| 9 |
+Release: 2%{?dist}
|
|
| 8 | 10 |
License: Apache 2.0 |
| 9 | 11 |
Group: Development/Languages/Python |
| 10 | 12 |
Vendor: VMware, Inc. |
| ... | ... |
@@ -48,10 +50,10 @@ python3 setup.py build |
| 48 | 48 |
popd |
| 49 | 49 |
|
| 50 | 50 |
%install |
| 51 |
-python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 52 | 51 |
pushd ../p3dir |
| 53 | 52 |
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
| 54 | 53 |
popd |
| 54 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 55 | 55 |
|
| 56 | 56 |
%check |
| 57 | 57 |
python2 setup.py test |
| ... | ... |
@@ -62,12 +64,19 @@ popd |
| 62 | 62 |
%files |
| 63 | 63 |
%defattr(-,root,root) |
| 64 | 64 |
%{python2_sitelib}/*
|
| 65 |
+%{_bindir}/coverage
|
|
| 66 |
+%{_bindir}/coverage2
|
|
| 67 |
+%{_bindir}/coverage-%{python2_version}
|
|
| 65 | 68 |
|
| 66 | 69 |
%files -n python3-coverage |
| 67 | 70 |
%defattr(-,root,root) |
| 68 | 71 |
%{python3_sitelib}/*
|
| 69 |
-%{_bindir}/*
|
|
| 72 |
+%{_bindir}/coverage3
|
|
| 73 |
+%{_bindir}/coverage-%{python3_version}
|
|
| 74 |
+ |
|
| 70 | 75 |
|
| 71 | 76 |
%changelog |
| 77 |
+* Tue Jul 11 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.4-2 |
|
| 78 |
+- Packaging python2 and python3 scripts in bin directory |
|
| 72 | 79 |
* Wed Apr 05 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.4-1 |
| 73 | 80 |
- Initial packaging for Photon |