Change-Id: Iaaf7407fbbd87d3e941c6a22d60f409a6bce4a5b
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3302
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -1,18 +1,26 @@ |
| 1 | 1 |
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
| 2 | 2 |
Name: python-pip |
| 3 | 3 |
Version: 9.0.1 |
| 4 |
-Release: 5%{?dist}
|
|
| 4 |
+Release: 6%{?dist}
|
|
| 5 | 5 |
Url: https://pypi.python.org/pypi/pip |
| 6 | 6 |
Summary: The PyPA recommended tool for installing Python packages. |
| 7 | 7 |
License: MIT |
| 8 | 8 |
Group: Development/Languages/Python |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 |
-Source0: https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-%{version}.tar.gz
|
|
| 12 |
-%define sha1 pip=57ff41e99cb01b6a1c2b0999161589b726f0ec8b |
|
| 11 |
+Source0: https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-%{version}.tar.gz
|
|
| 12 |
+%define sha1 pip-%{version}=57ff41e99cb01b6a1c2b0999161589b726f0ec8b
|
|
| 13 |
+# To get tests: |
|
| 14 |
+# git clone https://github.com/pypa/pip && cd pip |
|
| 15 |
+# git checkout 9.0.1 && tar -czvf ../pip-tests-9.0.1.tar.gz tests/ |
|
| 16 |
+Source1: pip-tests-%{version}.tar.gz
|
|
| 17 |
+%define sha1 pip-tests=cffb5530dba01bc542320a5c41b0a667f5ec6f5f |
|
| 13 | 18 |
BuildRequires: python2 |
| 14 | 19 |
BuildRequires: python2-libs |
| 15 | 20 |
BuildRequires: python-setuptools |
| 21 |
+%if %{with_check}
|
|
| 22 |
+BuildRequires: mercurial |
|
| 23 |
+%endif |
|
| 16 | 24 |
|
| 17 | 25 |
Requires: python2 |
| 18 | 26 |
Requires: python2-libs |
| ... | ... |
@@ -27,6 +35,7 @@ The PyPA recommended tool for installing Python packages. |
| 27 | 27 |
|
| 28 | 28 |
%prep |
| 29 | 29 |
%setup -q -n pip-%{version}
|
| 30 |
+tar -xf %{SOURCE1}
|
|
| 30 | 31 |
|
| 31 | 32 |
%build |
| 32 | 33 |
python2 setup.py build |
| ... | ... |
@@ -35,8 +44,18 @@ python2 setup.py build |
| 35 | 35 |
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
| 36 | 36 |
|
| 37 | 37 |
%check |
| 38 |
-easy_install freezegun |
|
| 39 |
-python2 setup.py test |
|
| 38 |
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2) |
|
| 39 |
+easy_install_2 freezegun |
|
| 40 |
+easy_install_2 mock |
|
| 41 |
+easy_install_2 pretend |
|
| 42 |
+easy_install_2 virtualenv |
|
| 43 |
+easy_install_2 scripttest |
|
| 44 |
+easy_install_2 pytest |
|
| 45 |
+easy_install_2 pytest-capturelog |
|
| 46 |
+ |
|
| 47 |
+#Disabled svn, bazaar, git related tests |
|
| 48 |
+#Disabled non_local_distutils test |
|
| 49 |
+PYTHONPATH=%{buildroot}%{python2_sitelib} py.test -m 'not network' -k 'not svn and not bazaar and not bzr and not git and not non_local_distutils'
|
|
| 40 | 50 |
|
| 41 | 51 |
%files |
| 42 | 52 |
%defattr(-,root,root) |
| ... | ... |
@@ -44,6 +63,8 @@ python2 setup.py test |
| 44 | 44 |
%{_bindir}/*
|
| 45 | 45 |
|
| 46 | 46 |
%changelog |
| 47 |
+* Thu Jul 20 2017 Divya Thaluru <dthaluru@vmware.com> 9.0.1-6 |
|
| 48 |
+- Fixed make check errors |
|
| 47 | 49 |
* Thu Jun 15 2017 Dheeraj Shetty <dheerajs@vmware.com> 9.0.1-5 |
| 48 | 50 |
- Use python2 explicitly |
| 49 | 51 |
* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 9.0.1-4 |