- Add patch to build with pytest5, also sent upstream:

* pytest5.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=68
This commit is contained in:
Tomáš Chvátal 2019-07-22 08:25:30 +00:00 committed by Git OBS Bridge
parent 34466b4ae2
commit 4662065a62
3 changed files with 21 additions and 0 deletions

13
pytest5.patch Normal file
View File

@ -0,0 +1,13 @@
Index: pip-19.1.1+git.1557777841.63878672/tests/unit/test_wheel.py
===================================================================
--- pip-19.1.1+git.1557777841.63878672.orig/tests/unit/test_wheel.py
+++ pip-19.1.1+git.1557777841.63878672/tests/unit/test_wheel.py
@@ -378,7 +378,7 @@ def test_check_compatibility():
# test raises with correct error
with pytest.raises(UnsupportedWheel) as e:
wheel.check_compatibility(higher_v, name)
- assert 'is not compatible' in str(e)
+ assert 'is not compatible' in str(e.value)
# Should only log.warning - minor version is greater
higher_v = (vc[0], vc[1] + 1)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 22 08:24:11 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to build with pytest5, also sent upstream:
* pytest5.patch
-------------------------------------------------------------------
Wed May 15 14:15:56 UTC 2019 - Matej Cepl <mcepl@cepl.eu>

View File

@ -34,6 +34,7 @@ Group: Development/Languages/Python
URL: http://www.pip-installer.org
Source: pip-%{version}.tar.xz
Patch0: pip-shipped-requests-cabundle.patch
Patch1: pytest5.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -71,6 +72,7 @@ pip-installable as well.
%prep
%setup -q -n pip-%{version}
%patch0 -p1
%patch1 -p1
# remove shebangs verbosely (if only sed would offer a verbose mode...)
for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do
sed -i 's|^#!%{_bindir}/env .*$||g' $f