From 6b45ab4d3b21a2bb9898ad753b12f8abb7b3e8d8 Mon Sep 17 00:00:00 2001 From: Peter Halliday Date: Thu, 8 Jul 2010 05:17:31 +0000 Subject: [PATCH 001/287] Update to 0.7.2 of pip --- .cvsignore | 2 +- python-pip.spec | 6 ++++-- sources | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2b9f9a5..831a5ed 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pip-0.7.1.tar.gz +pip-0.7.2.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 994b967..37b582b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,7 +3,7 @@ %global srcname pip Name: python-%{srcname} -Version: 0.7.1 +Version: 0.7.2 Release: 4%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement @@ -48,8 +48,10 @@ pip is meant to improve on easy_install.bulletin boards, etc.). %{python_sitelib}/pip* %changelog +* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 +- update to 0.7.2 of pip * Sun May 23 2010 Peter Halliday - 0.7.1-1 -- update to 0.7.1. of pip +- update to 0.7.1 of pip * Fri Jan 1 2010 Peter Halliday - 0.6.1.4 - fix dependency issue * Tue Dec 18 2009 Peter Halliday - 0.6.1-2 diff --git a/sources b/sources index 4a52c8b..670e4d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -420c83ad67bdcb542f772eb64392cce6 pip-0.7.1.tar.gz +cfe73090aaa0d3b0c104179a627859d1 pip-0.7.2.tar.gz From 089f2c50f7170dfc51023ab8f670665a7f043f87 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Thu, 22 Jul 2010 05:02:19 +0000 Subject: [PATCH 002/287] - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 37b582b..1000747 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -4,7 +4,7 @@ Name: python-%{srcname} Version: 0.7.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement Group: Development/Libraries @@ -48,6 +48,9 @@ pip is meant to improve on easy_install.bulletin boards, etc.). %{python_sitelib}/pip* %changelog +* Thu Jul 22 2010 David Malcolm - 0.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + * Wed Jul 7 2010 Peter Halliday - 0.7.2-1 - update to 0.7.2 of pip * Sun May 23 2010 Peter Halliday - 0.7.1-1 From 324f9dc300ef6ae1da5ed820022746a7038440f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 10:36:33 +0000 Subject: [PATCH 003/287] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 2a1826d..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: python-pip -# $Id: Makefile,v 1.1 2009/10/22 04:10:22 kevin Exp $ -NAME := python-pip -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 8edfde7..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -python-pip-0_4-1_fc11:HEAD:python-pip-0.4-1.fc11.src.rpm:1256517782 From 3155cdf475c8e40535e1c30f7faa919fe0662f0b Mon Sep 17 00:00:00 2001 From: Peter Halliday Date: Mon, 30 Aug 2010 23:01:40 -0400 Subject: [PATCH 004/287] BugID: 616399 update to 0.8 --- .gitignore | 1 + python-pip.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 831a5ed..0be679f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pip-0.7.2.tar.gz +/pip-0.8.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 1000747..8dc4e9e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,8 +3,8 @@ %global srcname pip Name: python-%{srcname} -Version: 0.7.2 -Release: 5%{?dist} +Version: 0.8 +Release: 1%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement Group: Development/Libraries @@ -37,6 +37,8 @@ pip is meant to improve on easy_install.bulletin boards, etc.). %install %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} +%{__rm} -rf %{buildroot}%{_bindir}/pip-* +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %clean %{__rm} -rf %{buildroot} @@ -44,10 +46,12 @@ pip is meant to improve on easy_install.bulletin boards, etc.). %files %defattr(-,root,root,-) %doc PKG-INFO docs -%attr(755,root,root) %{_bindir}/pip +%attr(755,root,root) %{_bindir}/pip-python %{python_sitelib}/pip* %changelog +* Mon Aug 30 2010 Peter Halliday - 0.8-1 +- update to 0.8 of pip * Thu Jul 22 2010 David Malcolm - 0.7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild diff --git a/sources b/sources index 670e4d7..9cfbdb1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cfe73090aaa0d3b0c104179a627859d1 pip-0.7.2.tar.gz +468d9adc309f33ad51cee38f0d455429 pip-0.8.tar.gz From 9557dd60da14a8bca21e52d4e315bd1f28cb9aea Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Mon, 20 Dec 2010 16:02:19 -0500 Subject: [PATCH 005/287] Update pip to 0.8.2 --- .gitignore | 1 + python-pip.spec | 4 +++- sources | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0be679f..f35d795 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ pip-0.7.2.tar.gz /pip-0.8.tar.gz +/pip-0.8.2.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 8dc4e9e..ca3a1fe 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,7 +3,7 @@ %global srcname pip Name: python-%{srcname} -Version: 0.8 +Version: 0.8.2 Release: 1%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement @@ -50,6 +50,8 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %{python_sitelib}/pip* %changelog +* Mon Dec 20 2010 Luke Macken - 0.8.2-1 +- update to 0.8.2 of pip * Mon Aug 30 2010 Peter Halliday - 0.8-1 - update to 0.8 of pip * Thu Jul 22 2010 David Malcolm - 0.7.2-5 diff --git a/sources b/sources index 9cfbdb1..889aab0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -468d9adc309f33ad51cee38f0d455429 pip-0.8.tar.gz +df1eca0abe7643d92b5222240bed15f6 pip-0.8.2.tar.gz From 8709b73553c439530837615863724eacd14b749f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 23:43:12 -0600 Subject: [PATCH 006/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index ca3a1fe..7874d40 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -4,7 +4,7 @@ Name: python-%{srcname} Version: 0.8.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement Group: Development/Libraries @@ -50,6 +50,9 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %{python_sitelib}/pip* %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Mon Dec 20 2010 Luke Macken - 0.8.2-1 - update to 0.8.2 of pip * Mon Aug 30 2010 Peter Halliday - 0.8-1 From 74924e00ab813218bb753032375a1adec4af6958 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Fri, 24 Jun 2011 09:00:30 -0600 Subject: [PATCH 007/287] Update to 0.8.3, project web page and removing an EPEL4 specific command. --- python-pip.spec | 13 +++++++++---- sources | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 7874d40..389ba42 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,13 +3,13 @@ %global srcname pip Name: python-%{srcname} -Version: 0.8.2 -Release: 2%{?dist} +Version: 0.8.3 +Release: 1%{?dist} Summary: Pip installs packages. Python packages. An easy_install replacement Group: Development/Libraries License: MIT -URL: http://pip.openplans.org +URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -38,18 +38,23 @@ pip is meant to improve on easy_install.bulletin boards, etc.). %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__rm} -rf %{buildroot}%{_bindir}/pip-* + +# Change the name of the pip executable in order to not conflict with perl-pip +# https://bugzilla.redhat.com/show_bug.cgi?id=616399 mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %clean %{__rm} -rf %{buildroot} %files -%defattr(-,root,root,-) %doc PKG-INFO docs %attr(755,root,root) %{_bindir}/pip-python %{python_sitelib}/pip* %changelog +* Wed Jun 22 2011 Tim Flink - 0.8.3-1 +- update to 0.8.3 and project home page + * Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 889aab0..a3c8d33 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -df1eca0abe7643d92b5222240bed15f6 pip-0.8.2.tar.gz +0603337a81f83df2b1d2f1151565efac pip-0.8.3.tar.gz From c20efaebc1c4285264ac2b5c2376aece4fdda12d Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Fri, 24 Jun 2011 09:34:33 -0600 Subject: [PATCH 008/287] Forgot to add changes to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f35d795..7e84806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pip-0.7.2.tar.gz /pip-0.8.tar.gz /pip-0.8.2.tar.gz +/pip-0.8.3.tar.gz From aded0dc96ca6b27537893d4aa1f7480791a8a98c Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Sun, 23 Oct 2011 12:02:40 -0600 Subject: [PATCH 009/287] update pip to 1.0.2 and add python3 package --- .gitignore | 1 + python-pip.spec | 78 ++++++++++++++++++++++++++++++++++++++++++++----- sources | 2 +- 3 files changed, 73 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7e84806..11be19f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ pip-0.7.2.tar.gz /pip-0.8.tar.gz /pip-0.8.2.tar.gz /pip-0.8.3.tar.gz +/pip-1.0.2.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 389ba42..d4f1bc9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,11 +1,16 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%if (! 0%{?rhel}) || 0%{?rhel} > 6 +%global with_python3 1 +%endif +%if 0%{?rhel} && 0%{?rhel} < 6 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%endif %global srcname pip Name: python-%{srcname} -Version: 0.8.3 +Version: 1.0.2 Release: 1%{?dist} -Summary: Pip installs packages. Python packages. An easy_install replacement +Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries License: MIT @@ -15,43 +20,102 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel -BuildRequires: python-setuptools-devel +BuildRequires: python-setuptools Requires: python-setuptools %description - Pip is a replacement for `easy_install `_. It uses mostly the same techniques for finding packages, so packages that were made easy_installable should be pip-installable as well. -pip is meant to improve on easy_install.bulletin boards, etc.). + +%if 0%{?with_python3} +%package -n python3-pip +Summary: Pip installs packages. Python3 packages. An easy_install replacement +Group: Development/Libraries + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-setuptools + +%description -n python3-pip +Pip is a replacement for `easy_install +`_. It uses mostly the +same techniques for finding packages, so packages that were made +easy_installable should be pip-installable as well. +%endif # with_python3 %prep %setup -q -n %{srcname}-%{version} %{__sed} -i '1d' pip/__init__.py +%if 0%{?with_python3} +cp -a . %{py3dir} +%endif # with_python3 + %build %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + %install %{__rm} -rf %{buildroot} + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} + +# Change the name of the pip executable in order to not conflict with perl-pip +# https://bugzilla.redhat.com/show_bug.cgi?id=616399 +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python3 + +# The install process creates both pip and pip- that seem to +# be the same. Remove the extra script +rm %{buildroot}%{_bindir}/pip-3* + +popd +%endif # with_python3 + %{__python} setup.py install -O1 --skip-build --root %{buildroot} -%{__rm} -rf %{buildroot}%{_bindir}/pip-* + +# The install process creates both pip and pip- that seem to +# be the same. Since removing pip-* also clobbers pip-python3, just remove pip-2* +%{__rm} -rf %{buildroot}%{_bindir}/pip-2* # Change the name of the pip executable in order to not conflict with perl-pip # https://bugzilla.redhat.com/show_bug.cgi?id=616399 mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python + %clean %{__rm} -rf %{buildroot} +# unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in +# fedora yet. Once it is, check can be implemented + %files +%defattr(-,root,root,-) %doc PKG-INFO docs %attr(755,root,root) %{_bindir}/pip-python %{python_sitelib}/pip* +%if 0%{?with_python3} +%files -n python3-pip +%defattr(-,root,root,-) +%doc PKG-INFO docs +%attr(755,root,root) %{_bindir}/pip-python3 +%{python3_sitelib}/pip* +%endif # with_python3 + %changelog +* Sat Oct 22 2011 Tim Flink - 1.0.2-1 +- update to 1.0.2 and added python3 subpackage + * Wed Jun 22 2011 Tim Flink - 0.8.3-1 - update to 0.8.3 and project home page diff --git a/sources b/sources index a3c8d33..7e4d5f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0603337a81f83df2b1d2f1151565efac pip-0.8.3.tar.gz +47ec6ff3f6d962696fe08d4c8264ad49 pip-1.0.2.tar.gz From 3c8c9596394cf887b572ed35f65179f7e64313b0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 19:59:25 -0600 Subject: [PATCH 010/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index d4f1bc9..7fd2899 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -113,6 +113,9 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %endif # with_python3 %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Sat Oct 22 2011 Tim Flink - 1.0.2-1 - update to 1.0.2 and added python3 subpackage From 3a898a9562eb0e9556c3ee555c0c04619830a06e Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 15 May 2012 19:14:00 -0600 Subject: [PATCH 011/287] updating pip to 1.1 --- python-pip.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 7fd2899..387649e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -8,8 +8,8 @@ %global srcname pip Name: python-%{srcname} -Version: 1.0.2 -Release: 2%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -113,6 +113,9 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %endif # with_python3 %changelog +* Tue May 15 2012 Tim Flink - 1.1.0-1 +- Update to upstream 1.1.0 + * Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 7e4d5f9..960af2a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47ec6ff3f6d962696fe08d4c8264ad49 pip-1.0.2.tar.gz +62a9f08dd5dc69d76734568a6c040508 pip-1.1.tar.gz From 13c1fa269928194ed6f35875f979f007dccca9ac Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 02:44:46 -0500 Subject: [PATCH 012/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 387649e..da922ea 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -113,6 +113,9 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %endif # with_python3 %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue May 15 2012 Tim Flink - 1.1.0-1 - Update to upstream 1.1.0 From 1676c4720a56781e647604a84daa2dfb0a1c9467 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sat, 4 Aug 2012 05:32:23 -0400 Subject: [PATCH 013/287] rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index da922ea..c0b7fa8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -113,6 +113,9 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %endif # with_python3 %changelog +* Sat Aug 04 2012 David Malcolm - 1.1-3 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + * Sat Jul 21 2012 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From a74e1e0c548361b3ae61f092ccb895f3c4d19e41 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Thu, 4 Oct 2012 09:49:27 -0600 Subject: [PATCH 014/287] Updating to upstream 1.2.1 and changing symlinks for RHBZ#855495 --- .gitignore | 1 + python-pip.spec | 32 +++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 11be19f..6563c36 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ pip-0.7.2.tar.gz /pip-0.8.2.tar.gz /pip-0.8.3.tar.gz /pip-1.0.2.tar.gz +/pip-1.1.tar.gz diff --git a/python-pip.spec b/python-pip.spec index c0b7fa8..aa12d1d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -8,8 +8,8 @@ %global srcname pip Name: python-%{srcname} -Version: 1.1 -Release: 3%{?dist} +Version: 1.2.1 +Release: 1%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -72,7 +72,14 @@ pushd %{py3dir} # Change the name of the pip executable in order to not conflict with perl-pip # https://bugzilla.redhat.com/show_bug.cgi?id=616399 -mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python3 +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python3-pip + +# after changing the pip-python binary name, make a symlink to the old name, +# that will be removed in a later version +# https://bugzilla.redhat.com/show_bug.cgi?id=855495 +pushd %{buildroot}%{_bindir} +ln -s python3-pip pip-python3 +popd # The install process creates both pip and pip- that seem to # be the same. Remove the extra script @@ -89,7 +96,14 @@ popd # Change the name of the pip executable in order to not conflict with perl-pip # https://bugzilla.redhat.com/show_bug.cgi?id=616399 -mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python-pip + +# after changing the pip-python binary name, make a symlink to the old name, +# that will be removed in a later version +# https://bugzilla.redhat.com/show_bug.cgi?id=855495 +pushd %{buildroot}%{_bindir} +ln -s python-pip pip-python +popd %clean @@ -102,6 +116,7 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %defattr(-,root,root,-) %doc PKG-INFO docs %attr(755,root,root) %{_bindir}/pip-python +%attr(755,root,root) %{_bindir}/python-pip %{python_sitelib}/pip* %if 0%{?with_python3} @@ -113,11 +128,10 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python %endif # with_python3 %changelog -* Sat Aug 04 2012 David Malcolm - 1.1-3 -- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 - -* Sat Jul 21 2012 Fedora Release Engineering - 1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild +* Thu Oct 04 2012 Tim Flink - 1.2.1-1 +- Update to upstream 1.2.1 +- Change binary from pip-python to python-pip (RHBZ#855495) +- Add alias from python-pip to pip-python, to be removed at a later date * Tue May 15 2012 Tim Flink - 1.1.0-1 - Update to upstream 1.1.0 diff --git a/sources b/sources index 960af2a..18bee69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -62a9f08dd5dc69d76734568a6c040508 pip-1.1.tar.gz +db8a6d8a4564d3dc7f337ebed67b1a85 pip-1.2.1.tar.gz \ No newline at end of file From 3a2d5edebd16d79e74ae71cd8009eab83ff09651 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 9 Oct 2012 13:07:10 -0600 Subject: [PATCH 015/287] fixing files for python3-pip and bumping to 1.2.1-2 --- python-pip.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index aa12d1d..ac11570 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -124,10 +124,14 @@ popd %defattr(-,root,root,-) %doc PKG-INFO docs %attr(755,root,root) %{_bindir}/pip-python3 +%attr(755,root,root) %{_bindir}/python3-pip %{python3_sitelib}/pip* %endif # with_python3 %changelog +* Tue Oct 09 2012 Tim Flink - 1.2.1-2 +- Fixing files for python3-pip + * Thu Oct 04 2012 Tim Flink - 1.2.1-1 - Update to upstream 1.2.1 - Change binary from pip-python to python-pip (RHBZ#855495) From 2052a4593bd477e07a6590d3be3e407bcf20d834 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 14:04:59 -0600 Subject: [PATCH 016/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index ac11570..e3cced4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -129,6 +129,9 @@ popd %endif # with_python3 %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Tue Oct 09 2012 Tim Flink - 1.2.1-2 - Fixing files for python3-pip From 53e39cd28e064b982f0f533e62725c5812bb01bb Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Fri, 26 Apr 2013 07:33:23 -0500 Subject: [PATCH 017/287] Update to 1.3.1 to fix CVE-2013-1888. --- .gitignore | 1 + python-pip.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6563c36..f3ead45 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ pip-0.7.2.tar.gz /pip-0.8.3.tar.gz /pip-1.0.2.tar.gz /pip-1.1.tar.gz +/pip-1.3.1.tar.gz diff --git a/python-pip.spec b/python-pip.spec index e3cced4..4025a23 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -8,8 +8,8 @@ %global srcname pip Name: python-%{srcname} -Version: 1.2.1 -Release: 3%{?dist} +Version: 1.3.1 +Release: 1%{?dist} Summary: Pip installs packages. Python3 packages. An easy_install replacement Group: Development/Libraries @@ -129,6 +129,9 @@ popd %endif # with_python3 %changelog +* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 +- Update to 1.3.1, fix for CVE-2013-1888. + * Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 18bee69..4b91cac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db8a6d8a4564d3dc7f337ebed67b1a85 pip-1.2.1.tar.gz \ No newline at end of file +cbb27a191cebc58997c4da8513863153 pip-1.3.1.tar.gz From 9a8af72d4d29610401d5b09e5ea230dd4a78e351 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 6 May 2013 18:50:34 +0200 Subject: [PATCH 018/287] Fix main package Summary, it's for Python 2, not 3 (#877401) * Mon May 06 2013 Kevin Kofler - 1.3.1-2 - Fix main package Summary, it's for Python 2, not 3 (#877401) --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4025a23..85d4f9c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,8 +9,8 @@ Name: python-%{srcname} Version: 1.3.1 -Release: 1%{?dist} -Summary: Pip installs packages. Python3 packages. An easy_install replacement +Release: 2%{?dist} +Summary: Pip installs packages. Python2 packages. An easy_install replacement Group: Development/Libraries License: MIT @@ -129,6 +129,9 @@ popd %endif # with_python3 %changelog +* Mon May 06 2013 Kevin Kofler - 1.3.1-2 +- Fix main package Summary, it's for Python 2, not 3 (#877401) + * Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 - Update to 1.3.1, fix for CVE-2013-1888. From f5a26f94371dba4a3801bd1d4cdceaa568b006a8 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Thu, 23 May 2013 21:30:05 -0600 Subject: [PATCH 019/287] renaming python-pip for #958377 and updating summary to match upstream --- python-pip.spec | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 85d4f9c..ffc33bb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,8 +9,8 @@ Name: python-%{srcname} Version: 1.3.1 -Release: 2%{?dist} -Summary: Pip installs packages. Python2 packages. An easy_install replacement +Release: 3%{?dist} +Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT @@ -32,7 +32,7 @@ easy_installable should be pip-installable as well. %if 0%{?with_python3} %package -n python3-pip -Summary: Pip installs packages. Python3 packages. An easy_install replacement +Summary: A tool for installing and managing Python3 packages Group: Development/Libraries BuildRequires: python3-devel @@ -54,6 +54,7 @@ easy_installable should be pip-installable as well. cp -a . %{py3dir} %endif # with_python3 + %build %{__python} setup.py build @@ -63,6 +64,7 @@ pushd %{py3dir} popd %endif # with_python3 + %install %{__rm} -rf %{buildroot} @@ -70,8 +72,8 @@ popd pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} -# Change the name of the pip executable in order to not conflict with perl-pip -# https://bugzilla.redhat.com/show_bug.cgi?id=616399 +# Change the name of the python3 pip executable in order to not conflict with +# the python2 executable mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python3-pip # after changing the pip-python binary name, make a symlink to the old name, @@ -79,30 +81,30 @@ mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python3-pip # https://bugzilla.redhat.com/show_bug.cgi?id=855495 pushd %{buildroot}%{_bindir} ln -s python3-pip pip-python3 -popd # The install process creates both pip and pip- that seem to # be the same. Remove the extra script -rm %{buildroot}%{_bindir}/pip-3* +%{__rm} -rf pip-3* popd %endif # with_python3 %{__python} setup.py install -O1 --skip-build --root %{buildroot} +pushd %{buildroot}%{_bindir} # The install process creates both pip and pip- that seem to # be the same. Since removing pip-* also clobbers pip-python3, just remove pip-2* -%{__rm} -rf %{buildroot}%{_bindir}/pip-2* +%{__rm} -rf pip-2* -# Change the name of the pip executable in order to not conflict with perl-pip -# https://bugzilla.redhat.com/show_bug.cgi?id=616399 -mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python-pip +# The pip executable no longer needs to be renamed to avoid conflict with perl-pip +# https://bugzilla.redhat.com/show_bug.cgi?id=958377 +# However, we'll keep a python-pip alias for now +ln -s pip python-pip # after changing the pip-python binary name, make a symlink to the old name, # that will be removed in a later version # https://bugzilla.redhat.com/show_bug.cgi?id=855495 -pushd %{buildroot}%{_bindir} -ln -s python-pip pip-python +ln -s pip pip-python popd @@ -115,6 +117,7 @@ popd %files %defattr(-,root,root,-) %doc PKG-INFO docs +%attr(755,root,root) %{_bindir}/pip %attr(755,root,root) %{_bindir}/pip-python %attr(755,root,root) %{_bindir}/python-pip %{python_sitelib}/pip* @@ -129,6 +132,10 @@ popd %endif # with_python3 %changelog +* Thu May 23 2013 Tim Flink - 1.3.1-3 +- undo python2 executable rename to python-pip. fixes #958377 +- fix summary to match upstream + * Mon May 06 2013 Kevin Kofler - 1.3.1-2 - Fix main package Summary, it's for Python 2, not 3 (#877401) From 08349fb2f36405aba9db86e9f50b7ffcf0d2b2d9 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 16 Jul 2013 13:32:51 -0700 Subject: [PATCH 020/287] Fix for CVE 2013-2099 --- python-pip.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ffc33bb..105313e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,13 +9,15 @@ Name: python-%{srcname} Version: 1.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz +# Sent to dstufft (upstream) +Patch0: 0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -48,6 +50,8 @@ easy_installable should be pip-installable as well. %prep %setup -q -n %{srcname}-%{version} +%patch0 -p1 + %{__sed} -i '1d' pip/__init__.py %if 0%{?with_python3} @@ -70,7 +74,7 @@ popd %if 0%{?with_python3} pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%{__python3} setup.py install --skip-build --root %{buildroot} # Change the name of the python3 pip executable in order to not conflict with # the python2 executable @@ -132,6 +136,9 @@ popd %endif # with_python3 %changelog +* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 +- Fix for CVE 2013-2099 + * Thu May 23 2013 Tim Flink - 1.3.1-3 - undo python2 executable rename to python-pip. fixes #958377 - fix summary to match upstream From 1009eb3e5182b663ccec81caf435f8f21ddb49fc Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 16 Jul 2013 13:33:11 -0700 Subject: [PATCH 021/287] Fix for CVE 2013-2099 --- ...s.python.org-issue17980-in-code-back.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch diff --git a/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch b/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch new file mode 100644 index 0000000..5f928ef --- /dev/null +++ b/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch @@ -0,0 +1,36 @@ +From ca207acb4fdea344bb3a775d44aa0d9f59ad31a1 Mon Sep 17 00:00:00 2001 +From: Toshio Kuratomi +Date: Mon, 15 Jul 2013 10:58:20 -0700 +Subject: [PATCH] fix for http://bugs.python.org/issue17980 in code backported + from the python3 stdlib + +--- + pip/backwardcompat/ssl_match_hostname.py | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/pip/backwardcompat/ssl_match_hostname.py b/pip/backwardcompat/ssl_match_hostname.py +index 5707649..a6fadf4 100644 +--- a/pip/backwardcompat/ssl_match_hostname.py ++++ b/pip/backwardcompat/ssl_match_hostname.py +@@ -7,9 +7,17 @@ __version__ = '3.2a3' + class CertificateError(ValueError): + pass + +-def _dnsname_to_pat(dn): ++def _dnsname_to_pat(dn, max_wildcards=1): + pats = [] + for frag in dn.split(r'.'): ++ if frag.count('*') > max_wildcards: ++ # Issue #17980: avoid denials of service by refusing more ++ # than one wildcard per fragment. A survery of established ++ # policy among SSL implementations showed it to be a ++ # reasonable choice. ++ raise CertificateError( ++ "too many wildcards in certificate DNS name: " + repr(dn)) ++ + if frag == '*': + # When '*' is a fragment by itself, it matches a non-empty dotless + # fragment. +-- +1.7.11.7 + From 6064dd1ddb3a086f9df5efcfb585e1e7343d033d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 04:01:34 -0500 Subject: [PATCH 022/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 105313e..da4e626 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.3.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ popd %endif # with_python3 %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 - Fix for CVE 2013-2099 From 42d5421d5012877bcf4e6c0238f54ba06c6e686e Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Mon, 14 Oct 2013 15:13:50 -0600 Subject: [PATCH 023/287] updating to pip 1.4.1 and removing old CVE patch that's not needed anymore --- ...s.python.org-issue17980-in-code-back.patch | 36 ------------------- python-pip.spec | 11 +++--- sources | 1 + 3 files changed, 7 insertions(+), 41 deletions(-) delete mode 100644 0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch diff --git a/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch b/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch deleted file mode 100644 index 5f928ef..0000000 --- a/0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ca207acb4fdea344bb3a775d44aa0d9f59ad31a1 Mon Sep 17 00:00:00 2001 -From: Toshio Kuratomi -Date: Mon, 15 Jul 2013 10:58:20 -0700 -Subject: [PATCH] fix for http://bugs.python.org/issue17980 in code backported - from the python3 stdlib - ---- - pip/backwardcompat/ssl_match_hostname.py | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/pip/backwardcompat/ssl_match_hostname.py b/pip/backwardcompat/ssl_match_hostname.py -index 5707649..a6fadf4 100644 ---- a/pip/backwardcompat/ssl_match_hostname.py -+++ b/pip/backwardcompat/ssl_match_hostname.py -@@ -7,9 +7,17 @@ __version__ = '3.2a3' - class CertificateError(ValueError): - pass - --def _dnsname_to_pat(dn): -+def _dnsname_to_pat(dn, max_wildcards=1): - pats = [] - for frag in dn.split(r'.'): -+ if frag.count('*') > max_wildcards: -+ # Issue #17980: avoid denials of service by refusing more -+ # than one wildcard per fragment. A survery of established -+ # policy among SSL implementations showed it to be a -+ # reasonable choice. -+ raise CertificateError( -+ "too many wildcards in certificate DNS name: " + repr(dn)) -+ - if frag == '*': - # When '*' is a fragment by itself, it matches a non-empty dotless - # fragment. --- -1.7.11.7 - diff --git a/python-pip.spec b/python-pip.spec index da4e626..d4aecd8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -8,16 +8,14 @@ %global srcname pip Name: python-%{srcname} -Version: 1.3.1 -Release: 5%{?dist} +Version: 1.4.1 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz -# Sent to dstufft (upstream) -Patch0: 0001-fix-for-http-bugs.python.org-issue17980-in-code-back.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -50,7 +48,6 @@ easy_installable should be pip-installable as well. %prep %setup -q -n %{srcname}-%{version} -%patch0 -p1 %{__sed} -i '1d' pip/__init__.py @@ -136,6 +133,10 @@ popd %endif # with_python3 %changelog +* Mon Oct 14 2013 Tim Flink - 1.4.1-1 +- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release +- Updated version to 1.4.1 + * Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 4b91cac..23e5b3b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +6afbb46aeb48abac658d4df742bff714 pip-1.4.1.tar.gz cbb27a191cebc58997c4da8513863153 pip-1.3.1.tar.gz From 6a15b7c1f7bb34d3e890352c3531fa2bb6c83a88 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Mon, 14 Oct 2013 15:17:15 -0600 Subject: [PATCH 024/287] removing pip-1.3.1 from sources and updating gitignore --- .gitignore | 1 + sources | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f3ead45..5c538e3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pip-0.7.2.tar.gz /pip-1.0.2.tar.gz /pip-1.1.tar.gz /pip-1.3.1.tar.gz +/pip-1.4.1.tar.gz diff --git a/sources b/sources index 23e5b3b..3dd2690 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ 6afbb46aeb48abac658d4df742bff714 pip-1.4.1.tar.gz -cbb27a191cebc58997c4da8513863153 pip-1.3.1.tar.gz From d42df6d2a7ddd5a2a3316ff615ccffc05294e352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 27 Jan 2014 16:08:50 +0000 Subject: [PATCH 025/287] python3 not in epel7 yet --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 105313e..e9d786c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,4 +1,4 @@ -%if (! 0%{?rhel}) || 0%{?rhel} > 6 +%if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 %endif %if 0%{?rhel} && 0%{?rhel} < 6 From dd9e7dc94db45086cb78b324a160d8f7cb27070d Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Mon, 7 Apr 2014 12:15:48 +0200 Subject: [PATCH 026/287] Update to 1.5.4 and add an option to build as wheel --- .gitignore | 1 + python-pip.spec | 88 ++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 49 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 5c538e3..8a7383c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ pip-0.7.2.tar.gz /pip-1.1.tar.gz /pip-1.3.1.tar.gz /pip-1.4.1.tar.gz +/pip-1.5.4.tar.gz diff --git a/python-pip.spec b/python-pip.spec index d4aecd8..c4d8c9e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,14 +1,21 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 6 %global with_python3 1 +%global build_wheel 0 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %global srcname pip +%if 0%{?build_wheel} +%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%if 0%{?with_python3} +%global python3_wheelname %python2_wheelname +%endif +%endif Name: python-%{srcname} -Version: 1.4.1 +Version: 1.5.4 Release: 1%{?dist} Summary: A tool for installing and managing Python packages @@ -16,11 +23,16 @@ Group: Development/Libraries License: MIT URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz +Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools +%if 0%{?build_wheel} +BuildRequires: python-pip +BuildRequires: python-wheel +%endif Requires: python-setuptools %description @@ -37,6 +49,10 @@ Group: Development/Libraries BuildRequires: python3-devel BuildRequires: python3-setuptools +%if 0%{?build_wheel} +BuildRequires: python3-pip +BuildRequires: python3-wheel +%endif Requires: python3-setuptools %description -n python3-pip @@ -49,6 +65,8 @@ easy_installable should be pip-installable as well. %prep %setup -q -n %{srcname}-%{version} +%patch0 -p1 + %{__sed} -i '1d' pip/__init__.py %if 0%{?with_python3} @@ -57,11 +75,19 @@ cp -a . %{py3dir} %build +%if 0%{?build_wheel} +%{__python} setup.py bdist_wheel +%else %{__python} setup.py build +%endif %if 0%{?with_python3} pushd %{py3dir} +%if 0%{?build_wheel} +%{__python3} setup.py bdist_wheel +%else %{__python3} setup.py build +%endif popd %endif # with_python3 @@ -71,42 +97,21 @@ popd %if 0%{?with_python3} pushd %{py3dir} +%if 0%{?build_wheel} +pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} +# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to +# (pip install wheel doesn't overwrite) +rm %{buildroot}%{_bindir}/pip +%else %{__python3} setup.py install --skip-build --root %{buildroot} - -# Change the name of the python3 pip executable in order to not conflict with -# the python2 executable -mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python3-pip - -# after changing the pip-python binary name, make a symlink to the old name, -# that will be removed in a later version -# https://bugzilla.redhat.com/show_bug.cgi?id=855495 -pushd %{buildroot}%{_bindir} -ln -s python3-pip pip-python3 - -# The install process creates both pip and pip- that seem to -# be the same. Remove the extra script -%{__rm} -rf pip-3* - -popd +%endif %endif # with_python3 +%if 0%{?build_wheel} +pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} +%else %{__python} setup.py install -O1 --skip-build --root %{buildroot} - -pushd %{buildroot}%{_bindir} -# The install process creates both pip and pip- that seem to -# be the same. Since removing pip-* also clobbers pip-python3, just remove pip-2* -%{__rm} -rf pip-2* - -# The pip executable no longer needs to be renamed to avoid conflict with perl-pip -# https://bugzilla.redhat.com/show_bug.cgi?id=958377 -# However, we'll keep a python-pip alias for now -ln -s pip python-pip - -# after changing the pip-python binary name, make a symlink to the old name, -# that will be removed in a later version -# https://bugzilla.redhat.com/show_bug.cgi?id=855495 -ln -s pip pip-python -popd +%endif %clean @@ -117,22 +122,23 @@ popd %files %defattr(-,root,root,-) -%doc PKG-INFO docs +%doc LICENSE.txt README.rst docs %attr(755,root,root) %{_bindir}/pip -%attr(755,root,root) %{_bindir}/pip-python -%attr(755,root,root) %{_bindir}/python-pip +%attr(755,root,root) %{_bindir}/pip2* %{python_sitelib}/pip* %if 0%{?with_python3} %files -n python3-pip %defattr(-,root,root,-) -%doc PKG-INFO docs -%attr(755,root,root) %{_bindir}/pip-python3 -%attr(755,root,root) %{_bindir}/python3-pip +%doc LICENSE.txt README.rst docs +%attr(755,root,root) %{_bindir}/pip3* %{python3_sitelib}/pip* %endif # with_python3 %changelog +* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 +- Updated to 1.5.4 + * Mon Oct 14 2013 Tim Flink - 1.4.1-1 - Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release - Updated version to 1.4.1 @@ -192,9 +198,9 @@ popd - update to 0.7.1 of pip * Fri Jan 1 2010 Peter Halliday - 0.6.1.4 - fix dependency issue -* Tue Dec 18 2009 Peter Halliday - 0.6.1-2 +* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 - fix spec file -* Mon Dec 17 2009 Peter Halliday - 0.6.1-1 +* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 - upgrade to 0.6.1 of pip * Mon Aug 31 2009 Peter Halliday - 0.4-1 - Initial package diff --git a/sources b/sources index 3dd2690..4b0b385 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6afbb46aeb48abac658d4df742bff714 pip-1.4.1.tar.gz +834b2904f92d46aaa333267fb1c922bb pip-1.5.4.tar.gz From 638c2fb55354c0f78ae092e7b94f8062f00e9338 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Mon, 7 Apr 2014 12:26:27 +0200 Subject: [PATCH 027/287] Add patch allowing stripping prefix from wheel RECORD files --- ...pping-prefix-from-wheel-RECORD-files.patch | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch new file mode 100644 index 0000000..eebe2cc --- /dev/null +++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -0,0 +1,102 @@ +commit aefacbb76661520415a1c35028f2984e70cfe0bf +Author: Slavek Kabrda +Date: Fri Nov 29 13:24:58 2013 +0100 + + Allow stripping given prefix from wheel RECORD files + +diff --git a/pip/commands/install.py b/pip/commands/install.py +index 1693d01..0287c06 100644 +--- a/pip/commands/install.py ++++ b/pip/commands/install.py +@@ -137,6 +137,14 @@ class InstallCommand(Command): + help="Install everything relative to this alternate root directory.") + + cmd_opts.add_option( ++ '--strip-file-prefix', ++ dest='strip_file_prefix', ++ metavar='prefix', ++ default=None, ++ help="Strip given prefix from script paths in wheel RECORD." ++ ) ++ ++ cmd_opts.add_option( + "--compile", + action="store_true", + dest="compile", +@@ -273,7 +281,11 @@ class InstallCommand(Command): + requirement_set.locate_files() + + if not options.no_install and not self.bundle: +- requirement_set.install(install_options, global_options, root=options.root_path) ++ requirement_set.install( ++ install_options, ++ global_options, ++ root=options.root_path, ++ strip_file_prefix=options.strip_file_prefix) + installed = ' '.join([req.name for req in + requirement_set.successfully_installed]) + if installed: +diff --git a/pip/req.py b/pip/req.py +index 3ae306d..c171130 100644 +--- a/pip/req.py ++++ b/pip/req.py +@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) + name = name.replace(os.path.sep, '/') + return name + +- def install(self, install_options, global_options=(), root=None): ++ def install(self, install_options, global_options=(), root=None, strip_file_prefix=None): + if self.editable: + self.install_editable(install_options, global_options) + return + if self.is_wheel: + version = pip.wheel.wheel_version(self.source_dir) + pip.wheel.check_compatibility(version, self.name) + +- self.move_wheel_files(self.source_dir, root=root) ++ self.move_wheel_files( ++ self.source_dir, ++ root=root, ++ strip_file_prefix=strip_file_prefix ++ ) + self.install_succeeded = True + return + +@@ -844,13 +848,14 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) + self._bundle_build_dirs = bundle_build_dirs + self._bundle_editable_dirs = bundle_editable_dirs + +- def move_wheel_files(self, wheeldir, root=None): ++ def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): + move_wheel_files( + self.name, self.req, wheeldir, + user=self.use_user_site, + home=self.target_dir, + root=root, + pycompile=self.pycompile, ++ strip_file_prefix=strip_file_prefix, + ) + + @property +diff --git a/pip/wheel.py b/pip/wheel.py +index fa3e270..3a366d0 100644 +--- a/pip/wheel.py ++++ b/pip/wheel.py +@@ -136,7 +136,7 @@ def get_entrypoints(filename): + + + def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, +- pycompile=True): ++ pycompile=True, strip_file_prefix=None): + """Install a wheel""" + + scheme = distutils_scheme(name, user=user, home=home, root=root) +@@ -357,6 +357,8 @@ if __name__ == '__main__': + writer.writerow(row) + for f in generated: + h, l = rehash(f) ++ if strip_file_prefix and f.startswith(strip_file_prefix): ++ f = os.path.join(os.sep, os.path.relpath(f, strip_file_prefix)) + writer.writerow((f, h, l)) + for f in installed: + writer.writerow((installed[f], '', '')) From a48e4cb297b14eb69c0c9f74ae59102717a46447 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Thu, 24 Apr 2014 12:37:03 +0200 Subject: [PATCH 028/287] Rebuild as wheel for Python 3.4 --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index c4d8c9e..7665830 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,6 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 6 %global with_python3 1 -%global build_wheel 0 +%global build_wheel 1 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: 1.5.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 +- Rebuild as wheel for Python 3.4 + * Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 - Updated to 1.5.4 From 5d7f89437bb14be4c050103aea7c55720a8e7333 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Thu, 24 Apr 2014 13:20:46 +0200 Subject: [PATCH 029/287] Disable build_wheel --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 7665830..a21a283 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: 1.5.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 +- Disable build_wheel + * Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 - Rebuild as wheel for Python 3.4 From 16abcb69d8809634bd845e2d71f1e7fe56c0049f Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Thu, 24 Apr 2014 13:27:28 +0200 Subject: [PATCH 030/287] Actually disable build_wheel --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index a21a283..da8d1fc 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,6 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 6 %global with_python3 1 -%global build_wheel 1 +%global build_wheel 0 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} From 3e3470390a8644433869308acb28361263f26e64 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Fri, 25 Apr 2014 14:12:12 +0200 Subject: [PATCH 031/287] Rebuild as wheel for Python 3.4 --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index da8d1fc..fc3f1f4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,6 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 6 %global with_python3 1 -%global build_wheel 0 +%global build_wheel 1 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: 1.5.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 +- Rebuild as wheel for Python 3.4 + * Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 - Disable build_wheel From 56b65b260147ff48bda74db91b58668ee4ac7b90 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Mon, 26 May 2014 00:10:27 +0200 Subject: [PATCH 032/287] Update to 1.5.6 --- ...c1-allow-stripping-prefix-from-wheel-RECORD-files.patch | 6 +++--- python-pip.spec | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch index eebe2cc..f2e8487 100644 --- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -86,11 +86,11 @@ index fa3e270..3a366d0 100644 def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, -- pycompile=True): -+ pycompile=True, strip_file_prefix=None): +- pycompile=True, scheme=None): ++ pycompile=True, scheme=None, strip_file_prefix=None): """Install a wheel""" - scheme = distutils_scheme(name, user=user, home=home, root=root) + if not scheme: @@ -357,6 +357,8 @@ if __name__ == '__main__': writer.writerow(row) for f in generated: diff --git a/python-pip.spec b/python-pip.spec index fc3f1f4..e6d032e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,8 +15,8 @@ %endif Name: python-%{srcname} -Version: 1.5.4 -Release: 4%{?dist} +Version: 1.5.6 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 +- Update to 1.5.6 + * Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 - Rebuild as wheel for Python 3.4 From 594b9f1739942928753e5afe98c5ab8d7e4129d3 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Mon, 26 May 2014 00:24:20 +0200 Subject: [PATCH 033/287] Upload 1.5.6 sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8a7383c..c3f66d3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ pip-0.7.2.tar.gz /pip-1.3.1.tar.gz /pip-1.4.1.tar.gz /pip-1.5.4.tar.gz +/pip-1.5.6.tar.gz diff --git a/sources b/sources index 4b0b385..28c4845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -834b2904f92d46aaa333267fb1c922bb pip-1.5.4.tar.gz +01026f87978932060cc86c1dc527903e pip-1.5.6.tar.gz From e24e478a400f5558642e3e29a50b4ad716bff9d3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 17:05:22 -0500 Subject: [PATCH 034/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index e6d032e..d35b6a2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: 1.5.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -136,6 +136,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun May 25 2014 Matej Stuchlik - 1.5.6-1 - Update to 1.5.6 From a7c7b123d7d980c2f73096b9956f78c629fc301b Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Tue, 18 Nov 2014 13:49:10 +0100 Subject: [PATCH 035/287] Patch local dos with predictable temp directory names See more at http://seclists.org/oss-sec/2014/q4/655 --- local-dos.patch | 395 ++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 11 +- 2 files changed, 405 insertions(+), 1 deletion(-) create mode 100644 local-dos.patch diff --git a/local-dos.patch b/local-dos.patch new file mode 100644 index 0000000..721ca51 --- /dev/null +++ b/local-dos.patch @@ -0,0 +1,395 @@ +diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py +index 8ed3d91..01b2104 100644 +--- a/pip/cmdoptions.py ++++ b/pip/cmdoptions.py +@@ -9,7 +9,7 @@ To be consistent, all options will follow this design. + """ + import copy + from optparse import OptionGroup, SUPPRESS_HELP, Option +-from pip.locations import build_prefix, default_log_file ++from pip.locations import default_log_file + + + def make_option_group(group, parser): +@@ -297,10 +297,8 @@ build_dir = OptionMaker( + '-b', '--build', '--build-dir', '--build-directory', + dest='build_dir', + metavar='dir', +- default=build_prefix, +- help='Directory to unpack packages into and build in. ' +- 'The default in a virtualenv is "/build". ' +- 'The default for global installs is "/pip_build_".') ++ help='Directory to unpack packages into and build in.', ++) + + install_options = OptionMaker( + '--install-option', +diff --git a/pip/commands/install.py b/pip/commands/install.py +index cbf22a0..cb7d0db 100644 +--- a/pip/commands/install.py ++++ b/pip/commands/install.py +@@ -10,6 +10,7 @@ from pip.basecommand import Command + from pip.index import PackageFinder + from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError + from pip import cmdoptions ++from pip.util import BuildDirectory + + + class InstallCommand(Command): +@@ -188,7 +189,7 @@ class InstallCommand(Command): + if ( + options.no_install or + options.no_download or +- (options.build_dir != build_prefix) or ++ options.build_dir or + options.no_clean + ): + logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, ' +@@ -197,7 +198,16 @@ class InstallCommand(Command): + if options.download_dir: + options.no_install = True + options.ignore_installed = True +- options.build_dir = os.path.abspath(options.build_dir) ++ ++ # If we have --no-install or --no-download and no --build we use the ++ # legacy static build dir ++ if (options.build_dir is None ++ and (options.no_install or options.no_download)): ++ options.build_dir = build_prefix ++ ++ if options.build_dir: ++ options.build_dir = os.path.abspath(options.build_dir) ++ + options.src_dir = os.path.abspath(options.src_dir) + install_options = options.install_options or [] + if options.use_user_site: +@@ -246,73 +256,75 @@ class InstallCommand(Command): + + finder = self._build_package_finder(options, index_urls, session) + +- requirement_set = RequirementSet( +- build_dir=options.build_dir, +- src_dir=options.src_dir, +- download_dir=options.download_dir, +- download_cache=options.download_cache, +- upgrade=options.upgrade, +- as_egg=options.as_egg, +- ignore_installed=options.ignore_installed, +- ignore_dependencies=options.ignore_dependencies, +- force_reinstall=options.force_reinstall, +- use_user_site=options.use_user_site, +- target_dir=temp_target_dir, +- session=session, +- pycompile=options.compile, +- ) +- for name in args: +- requirement_set.add_requirement( +- InstallRequirement.from_line(name, None)) +- for name in options.editables: +- requirement_set.add_requirement( +- InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) +- for filename in options.requirements: +- for req in parse_requirements(filename, finder=finder, options=options, session=session): +- requirement_set.add_requirement(req) +- if not requirement_set.has_requirements: +- opts = {'name': self.name} +- if options.find_links: +- msg = ('You must give at least one requirement to %(name)s ' +- '(maybe you meant "pip %(name)s %(links)s"?)' % +- dict(opts, links=' '.join(options.find_links))) +- else: +- msg = ('You must give at least one requirement ' +- 'to %(name)s (see "pip help %(name)s")' % opts) +- logger.warn(msg) +- return +- +- try: +- if not options.no_download: +- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) +- else: +- requirement_set.locate_files() +- +- if not options.no_install and not self.bundle: +- requirement_set.install( +- install_options, +- global_options, +- root=options.root_path, +- strip_file_prefix=options.strip_file_prefix) +- installed = ' '.join([req.name for req in +- requirement_set.successfully_installed]) +- if installed: +- logger.notify('Successfully installed %s' % installed) +- elif not self.bundle: +- downloaded = ' '.join([req.name for req in +- requirement_set.successfully_downloaded]) +- if downloaded: +- logger.notify('Successfully downloaded %s' % downloaded) +- elif self.bundle: +- requirement_set.create_bundle(self.bundle_filename) +- logger.notify('Created bundle in %s' % self.bundle_filename) +- except PreviousBuildDirError: +- options.no_clean = True +- raise +- finally: +- # Clean up +- if (not options.no_clean) and ((not options.no_install) or options.download_dir): +- requirement_set.cleanup_files(bundle=self.bundle) ++ build_delete = (not (options.no_clean or options.build_dir)) ++ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: ++ requirement_set = RequirementSet( ++ build_dir=build_dir, ++ src_dir=options.src_dir, ++ download_dir=options.download_dir, ++ download_cache=options.download_cache, ++ upgrade=options.upgrade, ++ as_egg=options.as_egg, ++ ignore_installed=options.ignore_installed, ++ ignore_dependencies=options.ignore_dependencies, ++ force_reinstall=options.force_reinstall, ++ use_user_site=options.use_user_site, ++ target_dir=temp_target_dir, ++ session=session, ++ pycompile=options.compile, ++ ) ++ for name in args: ++ requirement_set.add_requirement( ++ InstallRequirement.from_line(name, None)) ++ for name in options.editables: ++ requirement_set.add_requirement( ++ InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) ++ for filename in options.requirements: ++ for req in parse_requirements(filename, finder=finder, options=options, session=session): ++ requirement_set.add_requirement(req) ++ if not requirement_set.has_requirements: ++ opts = {'name': self.name} ++ if options.find_links: ++ msg = ('You must give at least one requirement to %(name)s ' ++ '(maybe you meant "pip %(name)s %(links)s"?)' % ++ dict(opts, links=' '.join(options.find_links))) ++ else: ++ msg = ('You must give at least one requirement ' ++ 'to %(name)s (see "pip help %(name)s")' % opts) ++ logger.warn(msg) ++ return ++ ++ try: ++ if not options.no_download: ++ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) ++ else: ++ requirement_set.locate_files() ++ ++ if not options.no_install and not self.bundle: ++ requirement_set.install( ++ install_options, ++ global_options, ++ root=options.root_path, ++ strip_file_prefix=options.strip_file_prefix) ++ installed = ' '.join([req.name for req in ++ requirement_set.successfully_installed]) ++ if installed: ++ logger.notify('Successfully installed %s' % installed) ++ elif not self.bundle: ++ downloaded = ' '.join([req.name for req in ++ requirement_set.successfully_downloaded]) ++ if downloaded: ++ logger.notify('Successfully downloaded %s' % downloaded) ++ elif self.bundle: ++ requirement_set.create_bundle(self.bundle_filename) ++ logger.notify('Created bundle in %s' % self.bundle_filename) ++ except PreviousBuildDirError: ++ options.no_clean = True ++ raise ++ finally: ++ # Clean up ++ if (not options.no_clean) and ((not options.no_install) or options.download_dir): ++ requirement_set.cleanup_files(bundle=self.bundle) + + if options.target_dir: + if not os.path.exists(options.target_dir): +diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py +index 6527063..a96631a 100644 +--- a/pip/commands/wheel.py ++++ b/pip/commands/wheel.py +@@ -8,7 +8,7 @@ from pip.index import PackageFinder + from pip.log import logger + from pip.exceptions import CommandError, PreviousBuildDirError + from pip.req import InstallRequirement, RequirementSet, parse_requirements +-from pip.util import normalize_path ++from pip.util import BuildDirectory, normalize_path + from pip.wheel import WheelBuilder + from pip import cmdoptions + +@@ -123,6 +123,9 @@ class WheelCommand(Command): + "--extra-index-url is suggested.") + index_urls += options.mirrors + ++ if options.build_dir: ++ options.build_dir = os.path.abspath(options.build_dir) ++ + session = self._build_session(options) + + finder = PackageFinder(find_links=options.find_links, +@@ -137,59 +140,60 @@ class WheelCommand(Command): + session=session, + ) + +- options.build_dir = os.path.abspath(options.build_dir) +- requirement_set = RequirementSet( +- build_dir=options.build_dir, +- src_dir=None, +- download_dir=None, +- download_cache=options.download_cache, +- ignore_dependencies=options.ignore_dependencies, +- ignore_installed=True, +- session=session, +- wheel_download_dir=options.wheel_dir +- ) +- +- # make the wheelhouse +- if not os.path.exists(options.wheel_dir): +- os.makedirs(options.wheel_dir) +- +- #parse args and/or requirements files +- for name in args: +- requirement_set.add_requirement( +- InstallRequirement.from_line(name, None)) +- +- for filename in options.requirements: +- for req in parse_requirements( +- filename, +- finder=finder, +- options=options, +- session=session): +- if req.editable: +- logger.notify("ignoring %s" % req.url) +- continue +- requirement_set.add_requirement(req) +- +- #fail if no requirements +- if not requirement_set.has_requirements: +- opts = {'name': self.name} +- msg = ('You must give at least one requirement ' +- 'to %(name)s (see "pip help %(name)s")' % opts) +- logger.error(msg) +- return ++ build_delete = (not (options.no_clean or options.build_dir)) ++ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: ++ requirement_set = RequirementSet( ++ build_dir=build_dir, ++ src_dir=None, ++ download_dir=None, ++ download_cache=options.download_cache, ++ ignore_dependencies=options.ignore_dependencies, ++ ignore_installed=True, ++ session=session, ++ wheel_download_dir=options.wheel_dir ++ ) + +- try: +- #build wheels +- wb = WheelBuilder( +- requirement_set, +- finder, +- options.wheel_dir, +- build_options = options.build_options or [], +- global_options = options.global_options or [] +- ) +- wb.build() +- except PreviousBuildDirError: +- options.no_clean = True +- raise +- finally: +- if not options.no_clean: +- requirement_set.cleanup_files() ++ # make the wheelhouse ++ if not os.path.exists(options.wheel_dir): ++ os.makedirs(options.wheel_dir) ++ ++ #parse args and/or requirements files ++ for name in args: ++ requirement_set.add_requirement( ++ InstallRequirement.from_line(name, None)) ++ ++ for filename in options.requirements: ++ for req in parse_requirements( ++ filename, ++ finder=finder, ++ options=options, ++ session=session): ++ if req.editable: ++ logger.notify("ignoring %s" % req.url) ++ continue ++ requirement_set.add_requirement(req) ++ ++ #fail if no requirements ++ if not requirement_set.has_requirements: ++ opts = {'name': self.name} ++ msg = ('You must give at least one requirement ' ++ 'to %(name)s (see "pip help %(name)s")' % opts) ++ logger.error(msg) ++ return ++ ++ try: ++ #build wheels ++ wb = WheelBuilder( ++ requirement_set, ++ finder, ++ options.wheel_dir, ++ build_options = options.build_options or [], ++ global_options = options.global_options or [] ++ ) ++ wb.build() ++ except PreviousBuildDirError: ++ options.no_clean = True ++ raise ++ finally: ++ if not options.no_clean: ++ requirement_set.cleanup_files() +diff --git a/pip/util.py b/pip/util.py +index f459bb2..f5edeeb 100644 +--- a/pip/util.py ++++ b/pip/util.py +@@ -8,6 +8,7 @@ import zipfile + import tarfile + import subprocess + import textwrap ++import tempfile + + from pip.exceptions import InstallationError, BadCommand, PipError + from pip.backwardcompat import(WindowsError, string_types, raw_input, +@@ -718,3 +719,35 @@ def is_prerelease(vers): + + parsed = version._normalized_key(normalized) + return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed]) ++ ++ ++class BuildDirectory(object): ++ ++ def __init__(self, name=None, delete=None): ++ # If we were not given an explicit directory, and we were not given an ++ # explicit delete option, then we'll default to deleting. ++ if name is None and delete is None: ++ delete = True ++ ++ if name is None: ++ name = tempfile.mkdtemp(prefix="pip-build-") ++ # If we were not given an explicit directory, and we were not given ++ # an explicit delete option, then we'll default to deleting. ++ if delete is None: ++ delete = True ++ ++ self.name = name ++ self.delete = delete ++ ++ def __repr__(self): ++ return "<{} {!r}>".format(self.__class__.__name__, self.name) ++ ++ def __enter__(self): ++ return self.name ++ ++ def __exit__(self, exc, value, tb): ++ self.cleanup() ++ ++ def cleanup(self): ++ if self.delete: ++ rmtree(self.name) diff --git a/python-pip.spec b/python-pip.spec index d35b6a2..f4e0a28 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: 1.5.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -24,6 +24,10 @@ License: MIT URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch + +# patch by dstufft, more at http://seclists.org/oss-sec/2014/q4/655 +Patch1: local-dos.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -66,6 +70,7 @@ easy_installable should be pip-installable as well. %setup -q -n %{srcname}-%{version} %patch0 -p1 +%patch1 -p1 %{__sed} -i '1d' pip/__init__.py @@ -136,6 +141,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 +- Added patch for local dos with predictable temp dictionary names + (http://seclists.org/oss-sec/2014/q4/655) + * Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 929716488711f715822f6801f51828d9991ea833 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Mon, 1 Dec 2014 14:19:59 +0100 Subject: [PATCH 036/287] Add tests and patch skipping tests requiring networking --- .gitignore | 1 + python-pip.spec | 23 +- skip-network-tests.patch | 1079 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 1102 insertions(+), 2 deletions(-) create mode 100644 skip-network-tests.patch diff --git a/.gitignore b/.gitignore index c3f66d3..b633d86 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ pip-0.7.2.tar.gz /pip-1.4.1.tar.gz /pip-1.5.4.tar.gz /pip-1.5.6.tar.gz +/pip-1.5.6-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index f4e0a28..7deafae 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,23 +16,33 @@ Name: python-%{srcname} Version: 1.5.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz -Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +# to get tests: +# git clone https://github.com/pypa/pip && cd fig +# git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/ +Source1: pip-1.5.6-tests.tar.gz + +Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch # patch by dstufft, more at http://seclists.org/oss-sec/2014/q4/655 Patch1: local-dos.patch +Patch2: skip-network-tests.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools +BuildRequires: python-mock +BuildRequires: pytest +BuildRequires: python-scripttest +BuildRequires: python-virtualenv %if 0%{?build_wheel} BuildRequires: python-pip BuildRequires: python-wheel @@ -68,9 +78,11 @@ easy_installable should be pip-installable as well. %prep %setup -q -n %{srcname}-%{version} +tar -xf %{SOURCE1} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %{__sed} -i '1d' pip/__init__.py @@ -118,6 +130,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %{__python} setup.py install -O1 --skip-build --root %{buildroot} %endif +%check +python setup.py test + %clean %{__rm} -rf %{buildroot} @@ -141,6 +156,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %endif # with_python3 %changelog +* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 +- Add tests +- Add patch skipping tests requiring Internet access + * Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 - Added patch for local dos with predictable temp dictionary names (http://seclists.org/oss-sec/2014/q4/655) diff --git a/skip-network-tests.patch b/skip-network-tests.patch new file mode 100644 index 0000000..4fbbf1a --- /dev/null +++ b/skip-network-tests.patch @@ -0,0 +1,1079 @@ +diff -up pip-1.5.6/tests/functional/test_bundle.py.orig pip-1.5.6/tests/functional/test_bundle.py +--- pip-1.5.6/tests/functional/test_bundle.py.orig 2014-11-27 11:23:19.857665215 +0100 ++++ pip-1.5.6/tests/functional/test_bundle.py 2014-11-27 11:31:10.992460920 +0100 +@@ -1,10 +1,12 @@ + import zipfile + import textwrap ++import pytest + from os.path import abspath, exists, join + from pip.download import path_to_url + from tests.lib.local_repos import local_checkout + + ++@pytest.mark.skipif(True, reason='No network') + def test_create_bundle(script, tmpdir, data): + """ + Test making a bundle. We'll grab one package from the filesystem +@@ -30,6 +32,7 @@ def test_create_bundle(script, tmpdir, d + assert 'build/pip/' in files + + ++@pytest.mark.skipif(True, reason='No network') + def test_cleanup_after_create_bundle(script, tmpdir, data): + """ + Test clean up after making a bundle. Make sure (build|src)-bundle/ dirs are removed but not src/. +diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py +--- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 ++++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 +@@ -1,6 +1,7 @@ + import sys + import re + import textwrap ++import pytest + from doctest import OutputChecker, ELLIPSIS + + from tests.lib.local_repos import local_checkout, local_repo +@@ -58,6 +59,7 @@ def test_freeze_basic(script): + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_svn(script, tmpdir): + """Test freezing a svn checkout""" + +@@ -79,6 +81,7 @@ def test_freeze_svn(script, tmpdir): + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_git_clone(script, tmpdir): + """ + Test freezing a Git clone. +@@ -109,6 +112,7 @@ def test_freeze_git_clone(script, tmpdir + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_mercurial_clone(script, tmpdir): + """ + Test freezing a Mercurial clone. +@@ -140,6 +144,7 @@ def test_freeze_mercurial_clone(script, + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_bazaar_clone(script, tmpdir): + """ + Test freezing a Bazaar clone. +@@ -175,6 +180,7 @@ def test_freeze_bazaar_clone(script, tmp + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_with_local_option(script): + """ + Test that wsgiref (from global site-packages) is reported normally, but not with --local. +@@ -205,6 +211,7 @@ def test_freeze_with_local_option(script + _check_output(result, expected) + + ++@pytest.mark.skipif(True, reason='No network') + def test_freeze_with_requirement_option(script): + """ + Test that new requirements are created correctly with --requirement hints +diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py +--- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-11-27 11:23:20.863671103 +0100 ++++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-11-27 14:25:05.086297126 +0100 +@@ -1,4 +1,5 @@ + import os ++import pytest + + from os.path import abspath, exists, join + +@@ -20,6 +21,7 @@ def test_cleanup_after_install(script, d + script.assert_no_temp() + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_clean_option_blocks_cleaning_after_install(script, data): + """ + Test --no-clean option blocks cleaning after install +@@ -29,6 +31,7 @@ def test_no_clean_option_blocks_cleaning + assert exists(build), "build/simple should still exist %s" % str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_cleanup_after_install_editable_from_hg(script, tmpdir): + """ + Test clean up after cloning from Mercurial. +@@ -87,6 +90,7 @@ def test_cleanup_req_satisifed_no_name(s + script.assert_no_temp() + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_should_not_delete_existing_build_dir(script): + """ + It should not delete build/ if existing before run the command +@@ -123,6 +127,7 @@ def test_cleanup_after_egg_info_exceptio + script.assert_no_temp() + + ++@pytest.mark.skipif(True, reason='No network') + def test_cleanup_prevented_upon_build_dir_exception(script, data): + """ + Test no cleanup occurs after a PreviousBuildDirError +diff -up pip-1.5.6/tests/functional/test_install_compat.py.orig pip-1.5.6/tests/functional/test_install_compat.py +--- pip-1.5.6/tests/functional/test_install_compat.py.orig 2014-11-27 11:23:20.912671389 +0100 ++++ pip-1.5.6/tests/functional/test_install_compat.py 2014-11-27 11:30:36.533251976 +0100 +@@ -3,9 +3,11 @@ Tests for compatibility workarounds. + + """ + import os ++import pytest + from tests.lib import pyversion, assert_all_changes + + ++@pytest.mark.skipif(True, reason='No network') + def test_debian_egg_name_workaround(script): + """ + We can uninstall packages installed with the pyversion removed from the +diff -up pip-1.5.6/tests/functional/test_install_config.py.orig pip-1.5.6/tests/functional/test_install_config.py +--- pip-1.5.6/tests/functional/test_install_config.py.orig 2014-11-27 11:23:20.920671436 +0100 ++++ pip-1.5.6/tests/functional/test_install_config.py 2014-11-27 11:30:03.530051860 +0100 +@@ -1,7 +1,7 @@ + import os + import tempfile + import textwrap +- ++import pytest + + def test_options_from_env_vars(script): + """ +@@ -28,6 +28,7 @@ def test_command_line_options_override_e + assert "Getting page http://download.zope.org/ppix" in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_env_vars_override_config_file(script, virtualenv): + """ + Test that environmental variables override settings in config files. +@@ -62,6 +63,7 @@ def _test_env_vars_override_config_file( + assert "Successfully installed INITools" in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_command_line_append_flags(script, virtualenv, data): + """ + Test command line flags that append to defaults set by environmental variables. +@@ -76,6 +78,7 @@ def test_command_line_append_flags(scrip + assert "Skipping link %s" % data.find_links in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_command_line_appends_correctly(script, data): + """ + Test multiple appending options set by environmental variables. +diff -up pip-1.5.6/tests/functional/test_install_download.py.orig pip-1.5.6/tests/functional/test_install_download.py +--- pip-1.5.6/tests/functional/test_install_download.py.orig 2014-11-27 11:23:20.970671729 +0100 ++++ pip-1.5.6/tests/functional/test_install_download.py 2014-11-27 11:29:42.503924368 +0100 +@@ -1,9 +1,11 @@ + import os + import textwrap ++import pytest + + from tests.lib.path import Path + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_if_requested(script): + """ + It should download (in the scratch path) and not install if requested. +@@ -13,6 +15,7 @@ def test_download_if_requested(script): + assert script.site_packages/ 'initools' not in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_wheel(script): + """ + Test using "pip install --download" to download a *.whl archive. +@@ -26,6 +29,7 @@ def test_download_wheel(script): + assert script.site_packages/ 'piptestpackage' not in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_single_download_from_requirements_file(script): + """ + It should support download (in the scratch path) from PyPi from a requirements file +@@ -38,6 +42,7 @@ def test_single_download_from_requiremen + assert script.site_packages/ 'initools' not in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_should_download_dependencies(script): + """ + It should download dependencies (in the scratch path) +@@ -77,6 +82,7 @@ def test_download_should_download_wheel_ + assert Path('scratch') / dep_filename in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_should_skip_existing_files(script): + """ + It should not download files already existing in the scratch dir +diff -up pip-1.5.6/tests/functional/test_install_extras.py.orig pip-1.5.6/tests/functional/test_install_extras.py +--- pip-1.5.6/tests/functional/test_install_extras.py.orig 2014-11-27 11:23:21.066672291 +0100 ++++ pip-1.5.6/tests/functional/test_install_extras.py 2014-11-27 11:31:01.854405511 +0100 +@@ -1,6 +1,8 @@ ++import pytest + from os.path import join + + ++@pytest.mark.skipif(True, reason='No network') + def test_simple_extras_install_from_pypi(script): + """ + Test installing a package from PyPI using extras dependency Paste[openid]. +@@ -10,6 +12,7 @@ def test_simple_extras_install_from_pypi + assert initools_folder in result.files_created, result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_extras_uninstall(script): + """ + No extras dependency gets uninstalled when the root package is uninstalled +diff -up pip-1.5.6/tests/functional/test_install.py.orig pip-1.5.6/tests/functional/test_install.py +--- pip-1.5.6/tests/functional/test_install.py.orig 2014-11-27 11:23:20.227667380 +0100 ++++ pip-1.5.6/tests/functional/test_install.py 2014-11-27 11:23:20.825670880 +0100 +@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ + from tests.lib.path import Path + + ++@pytest.mark.skipif(True, reason='No network') + def test_without_setuptools(script): + script.run("pip", "uninstall", "setuptools", "-y") + result = script.run( +@@ -26,6 +27,7 @@ def test_without_setuptools(script): + ) + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_second_command_line_interface_works(script): + """ + Check if ``pip`` commands behaves equally +@@ -39,6 +41,7 @@ def test_pip_second_command_line_interfa + assert initools_folder in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_from_pypi(script): + """ + Test installing a package from PyPI. +@@ -60,6 +63,7 @@ def test_editable_install(script): + assert not result.files_updated, result.files_updated + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_editable_from_svn(script, tmpdir): + """ + Test checking out from svn. +@@ -71,6 +75,7 @@ def test_install_editable_from_svn(scrip + result.assert_installed('INITools', with_files=['.svn']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_download_editable_to_custom_path(script, tmpdir): + """ + Test downloading an editable using a relative custom src folder. +@@ -94,6 +99,7 @@ def test_download_editable_to_custom_pat + assert customdl_files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_editable_no_install_followed_by_no_download(script, tmpdir): + """ + Test installing an editable in two steps (first with --no-install, then with --no-download). +@@ -113,6 +119,7 @@ def test_editable_no_install_followed_by + result.assert_installed('INITools', without_files=[curdir, '.svn']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_install_followed_by_no_download(script): + """ + Test installing in two steps (first with --no-install, then with --no-download). +@@ -143,6 +150,7 @@ def test_bad_install_with_no_download(sc + "an equivalent install with --no-install?" in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_dev_version_from_pypi(script): + """ + Test using package==dev. +@@ -154,6 +162,7 @@ def test_install_dev_version_from_pypi(s + assert (script.site_packages / 'initools') in result.files_created, str(result.stdout) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_editable_from_git(script, tmpdir): + """ + Test cloning from Git. +@@ -166,6 +175,7 @@ def test_install_editable_from_git(scrip + result.assert_installed('pip-test-package', with_files=['.git']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_editable_from_hg(script, tmpdir): + """ + Test cloning from Mercurial. +@@ -177,6 +187,7 @@ def test_install_editable_from_hg(script + result.assert_installed('ScriptTest', with_files=['.hg']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_vcs_url_final_slash_normalization(script, tmpdir): + """ + Test that presence or absence of final slash in VCS URL is normalized. +@@ -188,6 +199,7 @@ def test_vcs_url_final_slash_normalizati + assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_editable_from_bazaar(script, tmpdir): + """ + Test checking out from Bazaar. +@@ -199,6 +211,7 @@ def test_install_editable_from_bazaar(sc + result.assert_installed('django-wikiapp', with_files=['.bzr']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_vcs_url_urlquote_normalization(script, tmpdir): + """ + Test that urlquoted characters are normalized for repo URL comparison. +@@ -295,6 +308,7 @@ def test_install_pardir(script, data): + assert egg_info_folder in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_global_option(script): + """ + Test using global distutils options. +@@ -320,6 +334,7 @@ def test_install_with_hacked_egg_info(sc + assert 'Successfully installed hackedegginfo\n' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_using_install_option_and_editable(script, tmpdir): + """ + Test installing a tool using -e and --install-option +@@ -334,6 +349,7 @@ def test_install_using_install_option_an + assert virtualenv_bin in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_global_option_using_editable(script, tmpdir): + """ + Test using global distutils options, but in an editable installation +@@ -345,6 +361,7 @@ def test_install_global_option_using_edi + assert '0.2.5\n' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_package_with_same_name_in_curdir(script): + """ + Test installing a package with the same name of a local folder +@@ -398,6 +415,7 @@ def test_install_folder_using_relative_p + assert egg_folder in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_package_which_contains_dev_in_name(script): + """ + Test installing package from pypi which contains 'dev' in name +@@ -409,6 +427,7 @@ def test_install_package_which_contains_ + assert egg_info_folder in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_package_with_target(script): + """ + Test installing a package using pip install --target +@@ -481,6 +500,7 @@ def test_url_req_case_mismatch(script, d + assert egg_folder not in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_compiles_pyc(script): + """ + Test installing with --compile on +@@ -501,6 +521,7 @@ def test_compiles_pyc(script): + assert any(exists) + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_compiles_pyc(script, data): + """ + Test installing from wheel with --compile on +diff -up pip-1.5.6/tests/functional/test_install_reqs.py.orig pip-1.5.6/tests/functional/test_install_reqs.py +--- pip-1.5.6/tests/functional/test_install_reqs.py.orig 2014-11-27 11:23:21.114672571 +0100 ++++ pip-1.5.6/tests/functional/test_install_reqs.py 2014-11-27 14:25:42.443560282 +0100 +@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ + from tests.lib.path import Path + + ++@pytest.mark.skipif(True, reason='No network') + def test_requirements_file(script): + """ + Test installing from a requirements file. +@@ -59,6 +60,7 @@ def test_relative_requirements_file(scri + assert (script.site_packages/'fspkg') in result.files_created, str(result.stdout) + + ++@pytest.mark.skipif(True, reason='No network') + def test_multiple_requirements_files(script, tmpdir): + """ + Test installing from multiple nested requirements files. +@@ -110,6 +112,7 @@ def test_install_local_editable_with_ext + assert script.site_packages/'simple' in res.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_local_editable_with_subdirectory(script): + version_pkg_path = _create_test_package_with_subdirectory(script, + 'version_subpkg') +diff -up pip-1.5.6/tests/functional/test_install_upgrade.py.orig pip-1.5.6/tests/functional/test_install_upgrade.py +--- pip-1.5.6/tests/functional/test_install_upgrade.py.orig 2014-11-27 11:23:21.159672835 +0100 ++++ pip-1.5.6/tests/functional/test_install_upgrade.py 2014-11-27 11:23:21.743676253 +0100 +@@ -22,6 +22,7 @@ def test_no_upgrade_unless_requested(scr + assert not result.files_created, 'pip install INITools upgraded when it should not have' + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_to_specific_version(script): + """ + It does upgrade to specific version requested. +@@ -34,6 +35,7 @@ def test_upgrade_to_specific_version(scr + assert script.site_packages/'INITools-0.2-py%s.egg-info' % pyversion in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_if_requested(script): + """ + And it does upgrade if requested. +@@ -56,6 +58,7 @@ def test_upgrade_with_newest_already_ins + assert 'already up-to-date' in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_force_reinstall_newest(script): + """ + Force reinstallation of a package even if it is already at its newest +@@ -69,6 +72,7 @@ def test_upgrade_force_reinstall_newest( + assert_all_changes(result, result3, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_before_upgrade(script): + """ + Automatic uninstall-before-upgrade. +@@ -82,6 +86,7 @@ def test_uninstall_before_upgrade(script + assert_all_changes(result, result3, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_before_upgrade_from_url(script): + """ + Automatic uninstall-before-upgrade from URL. +@@ -95,6 +100,7 @@ def test_uninstall_before_upgrade_from_u + assert_all_changes(result, result3, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_to_same_version_from_url(script): + """ + When installing from a URL the same version that is already installed, no +@@ -109,6 +115,7 @@ def test_upgrade_to_same_version_from_ur + assert_all_changes(result, result3, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_from_reqs_file(script): + """ + Upgrade from a requirements file. +@@ -161,6 +168,7 @@ def test_editable_git_upgrade(script): + assert 'some different version' in version2.stdout, "Output: %s" % (version2.stdout) + + ++@pytest.mark.skipif(True, reason='No network') + def test_should_not_install_always_from_cache(script): + """ + If there is an old cached package, pip should download the newer version +@@ -173,6 +181,7 @@ def test_should_not_install_always_from_ + assert script.site_packages/'INITools-0.1-py%s.egg-info' % pyversion in result.files_created + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_with_ignoreinstalled_requested(script): + """ + Test old conflicting package is completely ignored +@@ -185,6 +194,7 @@ def test_install_with_ignoreinstalled_re + assert os.path.exists(script.site_packages_path/'INITools-0.3-py%s.egg-info' % pyversion) + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_vcs_req_with_no_dists_found(script, tmpdir): + """It can upgrade a VCS requirement that has no distributions otherwise.""" + req = "%s#egg=pip-test-package" % local_checkout( +@@ -194,6 +204,7 @@ def test_upgrade_vcs_req_with_no_dists_f + assert not result.returncode + + ++@pytest.mark.skipif(True, reason='No network') + def test_upgrade_vcs_req_with_dist_found(script): + """It can upgrade a VCS requirement that has distributions on the index.""" + # TODO(pnasrat) Using local_checkout fails on windows - oddness with the test path urls/git. +diff -up pip-1.5.6/tests/functional/test_install_user.py.orig pip-1.5.6/tests/functional/test_install_user.py +--- pip-1.5.6/tests/functional/test_install_user.py.orig 2014-11-27 11:23:21.750676293 +0100 ++++ pip-1.5.6/tests/functional/test_install_user.py 2014-11-27 11:23:22.157678676 +0100 +@@ -42,7 +42,8 @@ def _patch_dist_in_site_packages(script) + @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") + class Tests_UserSite: + +- def test_reset_env_system_site_packages_usersite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_reset_env_system_site_packages_usersite(self, script, virtualenv): + """ + reset_env(system_site_packages=True) produces env where a --user install can be found using pkg_resources + """ +@@ -53,7 +54,8 @@ class Tests_UserSite: + assert 'INITools'== project_name, "'%s' should be 'INITools'" %project_name + + +- def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): + """ + Test installing current directory ('.') into usersite after installing distribute + """ +@@ -85,7 +87,8 @@ class Tests_UserSite: + result = script.pip('install', '--user', curdir, cwd=run_from, expect_error=True) + assert "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." in result.stdout + +- def test_install_user_conflict_in_usersite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_install_user_conflict_in_usersite(self, script, virtualenv): + """ + Test user install with conflict in usersite updates usersite. + """ +@@ -99,7 +102,8 @@ class Tests_UserSite: + assert egg_info_folder in result2.files_created, str(result2) + assert not isfile(initools_v3_file), initools_v3_file + +- def test_install_user_conflict_in_globalsite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_install_user_conflict_in_globalsite(self, script, virtualenv): + """ + Test user install with conflict in global site ignores site and installs to usersite + """ +@@ -129,7 +133,8 @@ class Tests_UserSite: + assert isdir(egg_info_folder) + assert isdir(initools_folder) + +- def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): + """ + Test user install/upgrade with conflict in global site ignores site and installs to usersite + """ +@@ -159,7 +164,8 @@ class Tests_UserSite: + assert isdir(egg_info_folder), result2.stdout + assert isdir(initools_folder) + +- def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): + """ + Test user install with conflict in globalsite and usersite ignores global site and updates usersite. + """ +@@ -190,7 +196,8 @@ class Tests_UserSite: + assert isdir(egg_info_folder) + assert isdir(initools_folder) + +- def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): + """ + Test user install in --system-site-packages virtualenv with conflict in site fails. + """ +diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py +--- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-11-27 14:27:33.238340755 +0100 ++++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-11-27 14:28:28.154727603 +0100 +@@ -36,6 +36,7 @@ def test_get_refs_should_return_branch_n + assert result['branch0.1'] == commit, result + + ++@pytest.mark.skipif(True, reason='No network') + def test_get_refs_should_ignore_no_branch(script): + version_pkg_path = _create_test_package(script) + script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) +@@ -79,6 +80,7 @@ def test_check_rev_options_should_handle + + # TODO(pnasrat) fix all helpers to do right things with paths on windows. + @pytest.mark.skipif("sys.platform == 'win32'") ++@pytest.mark.skipif(True, reason='No network') + def test_check_submodule_addition(script): + """ + Submodules are pulled in on install and updated on upgrade. +diff -up pip-1.5.6/tests/functional/test_install_vcs.py.orig pip-1.5.6/tests/functional/test_install_vcs.py +--- pip-1.5.6/tests/functional/test_install_vcs.py.orig 2014-11-27 11:23:22.169678746 +0100 ++++ pip-1.5.6/tests/functional/test_install_vcs.py 2014-11-27 14:27:14.133206173 +0100 +@@ -1,7 +1,9 @@ ++import pytest + from tests.lib import _create_test_package, _change_test_package_version + from tests.lib.local_repos import local_checkout + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_editable_from_git_with_https(script, tmpdir): + """ + Test cloning from Git with https. +@@ -13,6 +15,7 @@ def test_install_editable_from_git_with_ + result.assert_installed('pip-test-package', with_files=['.git']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_sha1_revisions(script): + """ + Git backend should be able to install from SHA1 revisions +@@ -25,6 +28,7 @@ def test_git_with_sha1_revisions(script) + assert '0.1' in version.stdout, version.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_branch_name_as_revision(script): + """ + Git backend should be able to install from branch names +@@ -37,6 +41,7 @@ def test_git_with_branch_name_as_revisio + assert 'some different version' in version.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_tag_name_as_revision(script): + """ + Git backend should be able to install from tag names +@@ -49,6 +54,7 @@ def test_git_with_tag_name_as_revision(s + assert '0.1' in version.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_tag_name_and_update(script, tmpdir): + """ + Test cloning a git repository and updating to a different version. +@@ -64,6 +70,7 @@ def test_git_with_tag_name_and_update(sc + assert '0.1.2' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_branch_should_not_be_changed(script, tmpdir): + """ + Editable installations should not change branch +@@ -77,6 +84,7 @@ def test_git_branch_should_not_be_change + assert '* master' in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_non_editable_unpacking(script, tmpdir): + """ + Test cloning a git repository from a non-editable URL with a given tag. +@@ -88,6 +96,7 @@ def test_git_with_non_editable_unpacking + assert '0.1.2' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_editable_where_egg_contains_dev_string(script, tmpdir): + """ + Test cloning a git repository from an editable url which contains "dev" string +@@ -97,6 +106,7 @@ def test_git_with_editable_where_egg_con + result.assert_installed('django-devserver', with_files=['.git']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_non_editable_where_egg_contains_dev_string(script, tmpdir): + """ + Test cloning a git repository from a non-editable url which contains "dev" string +@@ -107,6 +117,7 @@ def test_git_with_non_editable_where_egg + assert devserver_folder in result.files_created, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_with_ambiguous_revs(script): + """ + Test git with two "names" (tag/branch) pointing to the same commit +@@ -121,6 +132,7 @@ def test_git_with_ambiguous_revs(script) + result.assert_installed('version-pkg', with_files=['.git']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_git_works_with_editable_non_origin_repo(script): + # set up, create a git repo and install it as editable from a local directory path + version_pkg_path = _create_test_package(script) +diff -up pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig pip-1.5.6/tests/functional/test_install_vcs_svn.py +--- pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig 2014-11-27 14:30:00.551378474 +0100 ++++ pip-1.5.6/tests/functional/test_install_vcs_svn.py 2014-11-27 14:30:03.217397254 +0100 +@@ -1,7 +1,8 @@ ++import pytest + from mock import patch + from pip.vcs.subversion import Subversion + +- ++@pytest.mark.skipif(True, reason='No network') + @patch('pip.vcs.subversion.call_subprocess') + def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): + svn = Subversion(url='svn+http://username:password@svn.example.com/') +@@ -11,6 +12,7 @@ def test_obtain_should_recognize_auth_in + 'http://username:password@svn.example.com/', script.scratch_path/'test']) + + ++@pytest.mark.skipif(True, reason='No network') + @patch('pip.vcs.subversion.call_subprocess') + def test_export_should_recognize_auth_info_url(call_subprocess_mock, script): + svn = Subversion(url='svn+http://username:password@svn.example.com/') +diff -up pip-1.5.6/tests/functional/test_install_wheel.py.orig pip-1.5.6/tests/functional/test_install_wheel.py +--- pip-1.5.6/tests/functional/test_install_wheel.py.orig 2014-11-27 11:23:22.371679928 +0100 ++++ pip-1.5.6/tests/functional/test_install_wheel.py 2014-11-27 11:23:22.372679934 +0100 +@@ -92,6 +92,7 @@ def test_install_from_wheel_with_headers + result.stdout) + + ++@pytest.mark.skipif(True, reason='No network') + def test_install_wheel_with_target(script, data): + """ + Test installing a wheel using pip install --target +diff -up pip-1.5.6/tests/functional/test_list.py.orig pip-1.5.6/tests/functional/test_list.py +--- pip-1.5.6/tests/functional/test_list.py.orig 2014-11-27 11:23:22.379679974 +0100 ++++ pip-1.5.6/tests/functional/test_list.py 2014-11-27 11:31:06.129431433 +0100 +@@ -1,6 +1,7 @@ + import os + import re + import textwrap ++import pytest + + from tests.lib.local_repos import local_checkout + +@@ -26,6 +27,7 @@ def test_local_flag(script, data): + assert 'simple (1.0)' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_uptodate_flag(script, data): + """ + Test the behavior of --uptodate flag in the list command +@@ -39,6 +41,7 @@ def test_uptodate_flag(script, data): + assert 'simple2 (3.0)' in result.stdout, str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_outdated_flag(script, data): + """ + Test the behavior of --outdated flag in the list command +@@ -52,6 +55,7 @@ def test_outdated_flag(script, data): + assert 'simple2' not in result.stdout, str(result) #3.0 is latest + + ++@pytest.mark.skipif(True, reason='No network') + def test_editables_flag(script, data): + """ + Test the behavior of --editables flag in the list command +diff -up pip-1.5.6/tests/functional/test_search.py.orig pip-1.5.6/tests/functional/test_search.py +--- pip-1.5.6/tests/functional/test_search.py.orig 2014-11-27 11:23:22.903683041 +0100 ++++ pip-1.5.6/tests/functional/test_search.py 2014-11-27 11:30:57.397378486 +0100 +@@ -1,3 +1,4 @@ ++import pytest + import pip.download + from pip.commands.search import (compare_versions, + highest_version, +@@ -53,6 +54,7 @@ def test_invalid_pypi_transformation(): + assert transform_hits(pypi_hits) == expected + + ++@pytest.mark.skipif(True, reason='No network') + def test_search(script): + """ + End to end test of search command. +@@ -62,6 +64,7 @@ def test_search(script): + assert 'A tool for installing and managing Python packages' in output.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_multiple_search(script): + """ + Test searching for multiple packages at once. +@@ -80,6 +83,7 @@ def test_search_missing_argument(script) + assert 'ERROR: Missing required argument (search query).' in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_run_method_should_return_sucess_when_find_packages(): + """ + Test SearchCommand.run for found package +@@ -91,6 +95,7 @@ def test_run_method_should_return_sucess + assert status == SUCCESS + + ++@pytest.mark.skipif(True, reason='No network') + def test_run_method_should_return_no_matches_found_when_does_not_find_packages(): + """ + Test SearchCommand.run for no matches +@@ -102,6 +107,7 @@ def test_run_method_should_return_no_mat + assert status == NO_MATCHES_FOUND, status + + ++@pytest.mark.skipif(True, reason='No network') + def test_search_should_exit_status_code_zero_when_find_packages(script): + """ + Test search exit status code for package found +@@ -110,6 +116,7 @@ def test_search_should_exit_status_code_ + assert result.returncode == SUCCESS + + ++@pytest.mark.skipif(True, reason='No network') + def test_search_exit_status_code_when_finds_no_package(script): + """ + Test search exit status code for no matches +diff -up pip-1.5.6/tests/functional/test_show.py.orig pip-1.5.6/tests/functional/test_show.py +--- pip-1.5.6/tests/functional/test_show.py.orig 2014-11-27 11:23:23.160684545 +0100 ++++ pip-1.5.6/tests/functional/test_show.py 2014-11-27 11:30:52.417348289 +0100 +@@ -1,4 +1,5 @@ + import re ++import pytest + from pip import __version__ + from pip.commands.show import search_packages_info + +@@ -34,6 +35,7 @@ def test_show_with_files_not_found(scrip + assert lines[6] == 'Cannot locate installed-files.txt', lines[5] + + ++@pytest.mark.skipif(True, reason='No network') + def test_show_with_all_files(script): + """ + Test listing all files in the show command. +diff -up pip-1.5.6/tests/functional/test_uninstall.py.orig pip-1.5.6/tests/functional/test_uninstall.py +--- pip-1.5.6/tests/functional/test_uninstall.py.orig 2014-11-27 11:23:23.168684592 +0100 ++++ pip-1.5.6/tests/functional/test_uninstall.py 2014-11-27 11:30:22.367166080 +0100 +@@ -3,6 +3,7 @@ from __future__ import with_statement + import textwrap + import os + import sys ++import pytest + from os.path import join, abspath, normpath + from tempfile import mkdtemp + from mock import patch +@@ -12,6 +13,7 @@ from tests.lib.local_repos import local_ + from pip.util import rmtree + + ++@pytest.mark.skipif(True, reason='No network') + def test_simple_uninstall(script): + """ + Test simple install and uninstall. +@@ -25,6 +27,7 @@ def test_simple_uninstall(script): + assert_all_changes(result, result2, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_with_scripts(script): + """ + Uninstall an easy_installed package with scripts. +@@ -38,6 +41,7 @@ def test_uninstall_with_scripts(script): + assert_all_changes(result, result2, [script.venv/'build', 'cache', easy_install_pth]) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_easy_install_after_import(script): + """ + Uninstall an easy_installed package after it's been imported +@@ -50,6 +54,7 @@ def test_uninstall_easy_install_after_im + assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_namespace_package(script): + """ + Uninstall a distribution with a namespace package without clobbering +@@ -90,6 +95,7 @@ def test_uninstall_overlapping_package(s + assert_all_changes(result2, result3, []) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_console_scripts(script): + """ + Test uninstalling a package with more files (console_script entry points, extra directories). +@@ -102,6 +108,7 @@ def test_uninstall_console_scripts(scrip + assert_all_changes(result, result2, [script.venv/'build', 'cache']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_easy_installed_console_scripts(script): + """ + Test uninstalling package with console_scripts that is easy_installed. +@@ -114,6 +121,7 @@ def test_uninstall_easy_installed_consol + assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_editable_from_svn(script, tmpdir): + """ + Test uninstalling an editable installation from svn. +@@ -126,6 +134,7 @@ def test_uninstall_editable_from_svn(scr + assert_all_changes(result, result2, [script.venv/'src', script.venv/'build', script.site_packages/'easy-install.pth']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_editable_with_source_outside_venv(script, tmpdir): + """ + Test uninstalling editable install from existing source outside the venv. +@@ -149,6 +158,7 @@ def _test_uninstall_editable_with_source + assert_all_changes(result, result3, [script.venv/'build', script.site_packages/'easy-install.pth']) + + ++@pytest.mark.skipif(True, reason='No network') + def test_uninstall_from_reqs_file(script, tmpdir): + """ + Test uninstall from a requirements file. +diff -up pip-1.5.6/tests/functional/test_uninstall_user.py.orig pip-1.5.6/tests/functional/test_uninstall_user.py +--- pip-1.5.6/tests/functional/test_uninstall_user.py.orig 2014-11-27 11:23:23.590687062 +0100 ++++ pip-1.5.6/tests/functional/test_uninstall_user.py 2014-11-27 11:29:55.413002643 +0100 +@@ -17,7 +17,8 @@ from tests.functional.test_install_user + @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") + class Tests_UninstallUserSite: + +- def test_uninstall_from_usersite(self, script, virtualenv): ++ @pytest.mark.skipif(True, reason='No network') ++ def test_uninstall_from_usersite(self, script, virtualenv): + """ + Test uninstall from usersite + """ +diff -up pip-1.5.6/tests/functional/test_wheel.py.orig pip-1.5.6/tests/functional/test_wheel.py +--- pip-1.5.6/tests/functional/test_wheel.py.orig 2014-11-27 11:23:23.598687109 +0100 ++++ pip-1.5.6/tests/functional/test_wheel.py 2014-11-27 11:30:30.345214455 +0100 +@@ -2,6 +2,7 @@ + import os + import sys + import textwrap ++import pytest + + from os.path import exists + +@@ -20,6 +21,7 @@ def test_pip_wheel_fails_without_wheel(s + assert "'pip wheel' requires the 'wheel' package" in result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_success(script, data): + """ + Test 'pip wheel' success. +@@ -32,6 +34,7 @@ def test_pip_wheel_success(script, data) + assert "Successfully built simple" in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_downloads_wheels(script, data): + """ + Test 'pip wheel' downloads wheels +@@ -46,6 +49,7 @@ def test_pip_wheel_downloads_wheels(scri + assert "Saved" in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_fail(script, data): + """ + Test 'pip wheel' failure. +@@ -59,6 +63,7 @@ def test_pip_wheel_fail(script, data): + assert "Failed to build wheelbroken" in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_ignore_wheels_editables(script, data): + """ + Test 'pip wheel' ignores editables +@@ -85,6 +90,7 @@ def test_pip_wheel_ignore_wheels_editabl + assert ignore_editable in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_clean_option_blocks_cleaning_after_wheel(script, data): + """ + Test --no-clean option blocks cleaning after wheel build +@@ -95,6 +101,7 @@ def test_no_clean_option_blocks_cleaning + assert exists(build), "build/simple should still exist %s" % str(result) + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_source_deps(script, data): + """ + Test 'pip wheel --use-wheel' finds and builds source archive dependencies of wheels +@@ -108,6 +115,7 @@ def test_pip_wheel_source_deps(script, d + assert "Successfully built source" in result.stdout, result.stdout + + ++@pytest.mark.skipif(True, reason='No network') + def test_pip_wheel_fail_cause_of_previous_build_dir(script, data): + """Test when 'pip wheel' tries to install a package that has a previous build directory""" + +diff -up pip-1.5.6/tests/unit/test_finder.py.orig pip-1.5.6/tests/unit/test_finder.py +--- pip-1.5.6/tests/unit/test_finder.py.orig 2014-11-27 11:23:23.937689093 +0100 ++++ pip-1.5.6/tests/unit/test_finder.py 2014-11-27 14:30:48.597716927 +0100 +@@ -71,6 +71,7 @@ def test_finder_detects_latest_already_s + finder.find_requirement(req, True) + + ++@pytest.mark.skipif(True, reason='No network') + def test_finder_detects_latest_already_satisfied_pypi_links(): + """Test PackageFinder detects latest already satisified using pypi links""" + req = InstallRequirement.from_line('initools', None) +@@ -199,6 +200,7 @@ def test_finder_priority_file_over_page( + assert link.url.startswith("file://") + + ++@pytest.mark.skipif(True, reason='No network') + def test_finder_priority_page_over_deplink(): + """Test PackageFinder prefers page links over equivalent dependency links""" + req = InstallRequirement.from_line('gmpy==1.15', None) +diff -up pip-1.5.6/tests/unit/test_req.py.orig pip-1.5.6/tests/unit/test_req.py +--- pip-1.5.6/tests/unit/test_req.py.orig 2014-11-27 11:23:23.946689145 +0100 ++++ pip-1.5.6/tests/unit/test_req.py 2014-11-27 11:23:23.947689151 +0100 +@@ -149,6 +149,7 @@ def test_parse_editable_local_extras(isd + normcase_mock.return_value = "/some/path/foo" + assert parse_editable('foo[bar,baz]', 'git') == (None, 'file:///some/path/foo', ('bar', 'baz')) + ++@pytest.mark.skipif(True, reason='No network') + def test_remote_reqs_parse(): + """ + Test parsing a simple remote requirements file +diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py +--- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-12-01 13:31:24.075490830 +0100 ++++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-12-01 13:30:59.208326741 +0100 +@@ -62,6 +62,7 @@ def test_cleanup_after_install_from_loca + script.assert_no_temp() + + ++@pytest.mark.skipif(True, reason='No network') + def test_no_install_and_download_should_not_leave_build_dir(script): + """ + It should remove build/ dir if it was pip that created +diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py +--- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-12-01 13:32:11.419803237 +0100 ++++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-12-01 13:32:30.298927814 +0100 +@@ -13,6 +13,7 @@ from tests.lib.git_submodule_helpers imp + ) + + ++@pytest.mark.skipif(True, reason='No network') + def test_get_refs_should_return_tag_name_and_commit_pair(script): + version_pkg_path = _create_test_package(script) + script.run('git', 'tag', '0.1', cwd=version_pkg_path) +@@ -25,6 +26,7 @@ def test_get_refs_should_return_tag_name + assert result['0.2'] == commit, result + + ++@pytest.mark.skipif(True, reason='No network') + def test_get_refs_should_return_branch_name_and_commit_pair(script): + version_pkg_path = _create_test_package(script) + script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) diff --git a/sources b/sources index 28c4845..185df82 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 01026f87978932060cc86c1dc527903e pip-1.5.6.tar.gz +03fb001023223970c16e9379f53af8b6 pip-1.5.6-tests.tar.gz From 4669cc950dace9fbcaa037ffbf24690abe71c764 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Thu, 18 Dec 2014 09:44:03 +0100 Subject: [PATCH 037/287] Only enable tests on Fedora. --- python-pip.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index d9be143..dc6bb78 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,7 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 %global build_wheel 1 +%global with_tests 1 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -16,7 +17,7 @@ Name: python-%{srcname} Version: 1.5.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -39,10 +40,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools +%if 0%{?with_tests} BuildRequires: python-mock BuildRequires: pytest BuildRequires: python-scripttest BuildRequires: python-virtualenv +%endif %if 0%{?build_wheel} BuildRequires: python-pip BuildRequires: python-wheel @@ -130,8 +133,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %{__python} setup.py install -O1 --skip-build --root %{buildroot} %endif +%if 0%{?with_tests} %check python setup.py test +%endif %clean @@ -156,6 +161,9 @@ python setup.py test %endif # with_python3 %changelog +* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 +- Only enable tests on Fedora. + * Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 - Add tests - Add patch skipping tests requiring Internet access From f50907e1c1b65c68127c0c4b3f72d1980f5b3e4d Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Thu, 15 Jan 2015 14:05:55 +0100 Subject: [PATCH 038/287] Update to 6.0.8 --- .gitignore | 1 + ...pping-prefix-from-wheel-RECORD-files.patch | 47 +++++++++---------- python-pip.spec | 35 ++++++++++---- skip-network-tests.patch | 24 ---------- sources | 3 +- 5 files changed, 49 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index b633d86..9ee51e6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ pip-0.7.2.tar.gz /pip-1.5.4.tar.gz /pip-1.5.6.tar.gz /pip-1.5.6-tests.tar.gz +/pip-6.0.8.tar.gz diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch index f2e8487..bc7fa88 100644 --- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -9,7 +9,7 @@ index 1693d01..0287c06 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py @@ -137,6 +137,14 @@ class InstallCommand(Command): - help="Install everything relative to this alternate root directory.") + "directory.") cmd_opts.add_option( + '--strip-file-prefix', @@ -23,26 +23,22 @@ index 1693d01..0287c06 100644 "--compile", action="store_true", dest="compile", -@@ -273,7 +281,11 @@ class InstallCommand(Command): - requirement_set.locate_files() - - if not options.no_install and not self.bundle: -- requirement_set.install(install_options, global_options, root=options.root_path) -+ requirement_set.install( -+ install_options, -+ global_options, -+ root=options.root_path, -+ strip_file_prefix=options.strip_file_prefix) - installed = ' '.join([req.name for req in - requirement_set.successfully_installed]) - if installed: -diff --git a/pip/req.py b/pip/req.py +@@ -345,6 +353,7 @@ class InstallCommand(Command): + install_options, + global_options, + root=options.root_path, ++ strip_file_prefix=options.strip_file_prefix, + ) + reqs = sorted( + requirement_set.successfully_installed, + +diff --git a/pip/req/req_install.py b/pip/req/req_install.py index 3ae306d..c171130 100644 ---- a/pip/req.py -+++ b/pip/req.py +--- a/pip/req/req_install.py ++++ b/pip/req/req_install.py @@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) - name = name.replace(os.path.sep, '/') - return name + else: + return True - def install(self, install_options, global_options=(), root=None): + def install(self, install_options, global_options=(), root=None, strip_file_prefix=None): @@ -62,9 +58,9 @@ index 3ae306d..c171130 100644 self.install_succeeded = True return -@@ -844,13 +848,14 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) - self._bundle_build_dirs = bundle_build_dirs - self._bundle_editable_dirs = bundle_editable_dirs +@@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) + def is_wheel(self): + return self.url and '.whl' in self.url - def move_wheel_files(self, wheeldir, root=None): + def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): @@ -74,10 +70,11 @@ index 3ae306d..c171130 100644 home=self.target_dir, root=root, pycompile=self.pycompile, + isolated=self.isolated, + strip_file_prefix=strip_file_prefix, ) - @property + def get_dist(self): diff --git a/pip/wheel.py b/pip/wheel.py index fa3e270..3a366d0 100644 --- a/pip/wheel.py @@ -86,8 +83,8 @@ index fa3e270..3a366d0 100644 def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, -- pycompile=True, scheme=None): -+ pycompile=True, scheme=None, strip_file_prefix=None): +- pycompile=True, scheme=None, isolated=False): ++ pycompile=True, scheme=None, isolated=False, strip_file_prefix=None): """Install a wheel""" if not scheme: diff --git a/python-pip.spec b/python-pip.spec index dc6bb78..f9551e9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,7 +1,7 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 %global build_wheel 1 -%global with_tests 1 +%global with_tests 0 %endif %if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -16,8 +16,8 @@ %endif Name: python-%{srcname} -Version: 1.5.6 -Release: 5%{?dist} +Version: 6.0.8 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -28,12 +28,11 @@ Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{versio # to get tests: # git clone https://github.com/pypa/pip && cd fig # git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/ -Source1: pip-1.5.6-tests.tar.gz +%if 0%{?with_tests} +Source1: pip-6.0.8-tests.tar.gz +%endif Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch -# patch by dstufft, more at http://seclists.org/oss-sec/2014/q4/655 -Patch1: local-dos.patch -Patch2: skip-network-tests.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -43,6 +42,8 @@ BuildRequires: python-setuptools %if 0%{?with_tests} BuildRequires: python-mock BuildRequires: pytest +BuildRequires: python-pretend +BuildRequires: python-freezegun BuildRequires: python-scripttest BuildRequires: python-virtualenv %endif @@ -66,6 +67,14 @@ Group: Development/Libraries BuildRequires: python3-devel BuildRequires: python3-setuptools +%if 0%{?with_tests} +BuildRequires: python3-mock +BuildRequires: python3-pytest +BuildRequires: python3-pretend +BuildRequires: python3-freezegun +BuildRequires: python3-scripttest +BuildRequires: python3-virtualenv +%endif %if 0%{?build_wheel} BuildRequires: python3-pip BuildRequires: python3-wheel @@ -81,11 +90,11 @@ easy_installable should be pip-installable as well. %prep %setup -q -n %{srcname}-%{version} +%if 0%{?with_tests} tar -xf %{SOURCE1} +%endif %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %{__sed} -i '1d' pip/__init__.py @@ -135,7 +144,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %if 0%{?with_tests} %check -python setup.py test +py.test -m 'not network' +pushd %{py3dir} +py.test-3.4 -m 'not network' +popd %endif @@ -161,6 +173,9 @@ python setup.py test %endif # with_python3 %changelog +* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 +- Update to 6.0.8 + * Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 - Only enable tests on Fedora. diff --git a/skip-network-tests.patch b/skip-network-tests.patch index 4fbbf1a..9dec67e 100644 --- a/skip-network-tests.patch +++ b/skip-network-tests.patch @@ -1,27 +1,3 @@ -diff -up pip-1.5.6/tests/functional/test_bundle.py.orig pip-1.5.6/tests/functional/test_bundle.py ---- pip-1.5.6/tests/functional/test_bundle.py.orig 2014-11-27 11:23:19.857665215 +0100 -+++ pip-1.5.6/tests/functional/test_bundle.py 2014-11-27 11:31:10.992460920 +0100 -@@ -1,10 +1,12 @@ - import zipfile - import textwrap -+import pytest - from os.path import abspath, exists, join - from pip.download import path_to_url - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.skipif(True, reason='No network') - def test_create_bundle(script, tmpdir, data): - """ - Test making a bundle. We'll grab one package from the filesystem -@@ -30,6 +32,7 @@ def test_create_bundle(script, tmpdir, d - assert 'build/pip/' in files - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_after_create_bundle(script, tmpdir, data): - """ - Test clean up after making a bundle. Make sure (build|src)-bundle/ dirs are removed but not src/. diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py --- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 +++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 diff --git a/sources b/sources index 185df82..7d60591 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -01026f87978932060cc86c1dc527903e pip-1.5.6.tar.gz -03fb001023223970c16e9379f53af8b6 pip-1.5.6-tests.tar.gz +2332e6f97e75ded3bddde0ced01dbda3 pip-6.0.8.tar.gz From 319306cca0d0e20cf235166d312d8f65a45b21f3 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Thu, 4 Jun 2015 11:47:42 +0200 Subject: [PATCH 039/287] Update to 7.0.3 --- .gitignore | 1 + ...rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch | 6 +++--- python-pip.spec | 5 ++++- sources | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9ee51e6..4635453 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ pip-0.7.2.tar.gz /pip-1.5.6.tar.gz /pip-1.5.6-tests.tar.gz /pip-6.0.8.tar.gz +/pip-7.0.3.tar.gz diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch index bc7fa88..d581eee 100644 --- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -40,8 +40,8 @@ index 3ae306d..c171130 100644 else: return True -- def install(self, install_options, global_options=(), root=None): -+ def install(self, install_options, global_options=(), root=None, strip_file_prefix=None): +- def install(self, install_options, global_options=[], root=None): ++ def install(self, install_options, global_options=[], root=None, strip_file_prefix=None): if self.editable: self.install_editable(install_options, global_options) return @@ -60,7 +60,7 @@ index 3ae306d..c171130 100644 @@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) def is_wheel(self): - return self.url and '.whl' in self.url + return self.link and self.link.is_wheel - def move_wheel_files(self, wheeldir, root=None): + def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): diff --git a/python-pip.spec b/python-pip.spec index f9551e9..a4781aa 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ %endif Name: python-%{srcname} -Version: 6.0.8 +Version: 7.0.3 Release: 1%{?dist} Summary: A tool for installing and managing Python packages @@ -173,6 +173,9 @@ popd %endif # with_python3 %changelog +* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 +- Update to 7.0.3 + * Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 - Update to 6.0.8 diff --git a/sources b/sources index 7d60591..1563812 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2332e6f97e75ded3bddde0ced01dbda3 pip-6.0.8.tar.gz +54cbf5ae000fb3af3367345f5d299d1c pip-7.0.3.tar.gz From fdbeb4830277e8eeab0b2b61fa9077c16c389c4f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 20:17:14 +0000 Subject: [PATCH 040/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index a4781aa..ceac72c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 7.0.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -173,6 +173,9 @@ popd %endif # with_python3 %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 - Update to 7.0.3 From 25a2de78a92603508ae7d4a4689091dac7b6cd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 30 Jun 2015 13:45:43 +0300 Subject: [PATCH 041/287] Install bash completion - Ship LICENSE.txt as %license where available --- python-pip.spec | 69 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ceac72c..c24ce04 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,9 +15,14 @@ %endif %endif +%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) +%if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d" +%global bashcomp2 1 +%endif + Name: python-%{srcname} Version: 7.0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -67,6 +72,7 @@ Group: Development/Libraries BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: bash-completion %if 0%{?with_tests} BuildRequires: python3-mock BuildRequires: python3-pytest @@ -142,6 +148,44 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi %{__python} setup.py install -O1 --skip-build --root %{buildroot} %endif +mkdir -p %{buildroot}%{bashcompdir} +PYTHONPATH=%{buildroot}%{python_sitelib} \ + %{buildroot}%{_bindir}/pip completion --bash \ + > %{buildroot}%{bashcompdir}/pip +%if 0%{?with_python3} +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + %{buildroot}%{_bindir}/pip3 completion --bash \ + > %{buildroot}%{bashcompdir}/pip3 +%endif +pips2=pip +pips3=pip3 +for pip in %{buildroot}%{_bindir}/pip*; do + pip=$(basename $pip) + case $pip in + pip2*) + pips2="$pips2 $pip" +%if 0%{?bashcomp2} + ln -s pip %{buildroot}%{bashcompdir}/$pip +%endif + ;; +%if 0%{?with_python3} + pip3?*) + pips3="$pips3 $pip" +%if 0%{?bashcomp2} + ln -s pip3 %{buildroot}%{bashcompdir}/$pip +%endif + ;; +%endif + esac +done +%if 0%{?with_python3} +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ + -e s/_pip_completion/_pip3_completion/ \ + %{buildroot}%{bashcompdir}/pip3 +%endif +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ + %{buildroot}%{bashcompdir}/pip + %if 0%{?with_tests} %check py.test -m 'not network' @@ -159,20 +203,39 @@ popd %files %defattr(-,root,root,-) -%doc LICENSE.txt README.rst docs +%{!?_licensedir:%global license %%doc} +%license LICENSE.txt +%doc README.rst docs %attr(755,root,root) %{_bindir}/pip %attr(755,root,root) %{_bindir}/pip2* %{python_sitelib}/pip* +%{bashcompdir} +%if 0%{?with_python3} +%exclude %{bashcompdir}/pip3* +%endif +%if 0%{?bashcomp2} +%dir %(dirname %{bashcompdir}) +%endif %if 0%{?with_python3} %files -n python3-pip %defattr(-,root,root,-) -%doc LICENSE.txt README.rst docs +%license LICENSE.txt +%doc README.rst docs %attr(755,root,root) %{_bindir}/pip3* %{python3_sitelib}/pip* +%dir %{bashcompdir} +%{bashcompdir}/pip3* +%if 0%{?bashcomp2} +%dir %(dirname %{bashcompdir}) +%endif %endif # with_python3 %changelog +* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 +- Install bash completion +- Ship LICENSE.txt as %%license where available + * Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From b664d7200a44f1c7732f0115a1ac62839cd2f77a Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Wed, 1 Jul 2015 11:42:00 +0200 Subject: [PATCH 042/287] Update to 7.1.0 --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index c24ce04..137c007 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,8 +21,8 @@ %endif Name: python-%{srcname} -Version: 7.0.3 -Release: 3%{?dist} +Version: 7.1.0 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -232,6 +232,9 @@ popd %endif # with_python3 %changelog +* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 +- Update to 7.1.0 + * Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 - Install bash completion - Ship LICENSE.txt as %%license where available From 28b76001e4eb3e7c3604598dca8f1a8b7e43d7f6 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Wed, 1 Jul 2015 11:44:41 +0200 Subject: [PATCH 043/287] Add new source --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4635453..fcd6753 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ pip-0.7.2.tar.gz /pip-1.5.6-tests.tar.gz /pip-6.0.8.tar.gz /pip-7.0.3.tar.gz +/pip-7.1.0.tar.gz diff --git a/sources b/sources index 1563812..74cf9a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54cbf5ae000fb3af3367345f5d299d1c pip-7.0.3.tar.gz +d935ee9146074b1d3f26c5f0acfd120e pip-7.1.0.tar.gz From 459949c95faf79b7882d601f1683727c08145184 Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Tue, 13 Oct 2015 18:39:17 +0200 Subject: [PATCH 044/287] Rebuilt for Python3.5 rebuild --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 137c007..da5b3a3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,6 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 -%global build_wheel 1 +%global build_wheel 0 %global with_tests 0 %endif %if 0%{?rhel} && 0%{?rhel} < 6 @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 7.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -232,6 +232,9 @@ popd %endif # with_python3 %changelog +* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 +- Rebuilt for Python3.5 rebuild + * Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 - Update to 7.1.0 From d688f38fb0f37416254f2266722f8004e530bc38 Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Wed, 14 Oct 2015 10:38:05 +0200 Subject: [PATCH 045/287] Rebuilt for Python3.5 rebuild With wheel set to 1 --- .gitignore | 1 + python-pip.spec | 10 +++++++--- sources | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fcd6753..a024235 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ pip-0.7.2.tar.gz /pip-6.0.8.tar.gz /pip-7.0.3.tar.gz /pip-7.1.0.tar.gz +/pip-7.1.0-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index da5b3a3..bfaddc8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,6 @@ %if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 -%global build_wheel 0 +%global build_wheel 1 %global with_tests 0 %endif %if 0%{?rhel} && 0%{?rhel} < 6 @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 7.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -34,7 +34,7 @@ Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{versio # git clone https://github.com/pypa/pip && cd fig # git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/ %if 0%{?with_tests} -Source1: pip-6.0.8-tests.tar.gz +Source1: pip-7.1.0-tests.tar.gz %endif Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -232,6 +232,10 @@ popd %endif # with_python3 %changelog +* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 +- Rebuilt for Python3.5 rebuild +- With wheel set to 1 + * Tue Oct 13 2015 Robert Kuska - 7.1.0-2 - Rebuilt for Python3.5 rebuild diff --git a/sources b/sources index 74cf9a7..c824eb5 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ d935ee9146074b1d3f26c5f0acfd120e pip-7.1.0.tar.gz +8f5d8574a1c1d2bc535846adf8c7265a pip-7.1.0-tests.tar.gz From 6ab95f60b96518aa088b099400f432a9f73e2876 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 20:29:14 +0000 Subject: [PATCH 046/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index bfaddc8..0b0b592 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 7.1.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -232,6 +232,9 @@ popd %endif # with_python3 %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Oct 14 2015 Robert Kuska - 7.1.0-3 - Rebuilt for Python3.5 rebuild - With wheel set to 1 From 686a4e2e6d71d67bd198781c079f6b9736abf680 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Mon, 22 Feb 2016 11:35:39 +0100 Subject: [PATCH 047/287] Update to 8.0.2 --- ...pping-prefix-from-wheel-RECORD-files.patch | 32 +++++++++++-------- python-pip.spec | 16 +++++++--- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch index d581eee..d47b649 100644 --- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -20,13 +20,13 @@ index 1693d01..0287c06 100644 + ) + + cmd_opts.add_option( - "--compile", - action="store_true", - dest="compile", + '--prefix', + dest='prefix_path', + metavar='dir', @@ -345,6 +353,7 @@ class InstallCommand(Command): - install_options, global_options, root=options.root_path, + prefix=options.prefix_path, + strip_file_prefix=options.strip_file_prefix, ) reqs = sorted( @@ -36,39 +36,43 @@ diff --git a/pip/req/req_install.py b/pip/req/req_install.py index 3ae306d..c171130 100644 --- a/pip/req/req_install.py +++ b/pip/req/req_install.py -@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +@@ -615,17 +615,21 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) else: return True -- def install(self, install_options, global_options=[], root=None): -+ def install(self, install_options, global_options=[], root=None, strip_file_prefix=None): +- def install(self, install_options, global_options=[], root=None, +- prefix=None): ++ def install(self, install_options, global_options=[], root=None, prefix=None, strip_file_prefix=None): if self.editable: - self.install_editable(install_options, global_options) + self.install_editable( + install_options, global_options, prefix=prefix) return if self.is_wheel: version = pip.wheel.wheel_version(self.source_dir) pip.wheel.check_compatibility(version, self.name) -- self.move_wheel_files(self.source_dir, root=root) +- self.move_wheel_files(self.source_dir, root=root, prefix=prefix) + self.move_wheel_files( + self.source_dir, + root=root, ++ prefix=prefix, + strip_file_prefix=strip_file_prefix + ) self.install_succeeded = True return -@@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +@@ -844,15 +848,16 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) def is_wheel(self): return self.link and self.link.is_wheel -- def move_wheel_files(self, wheeldir, root=None): -+ def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): +- def move_wheel_files(self, wheeldir, root=None, prefix=None): ++ def move_wheel_files(self, wheeldir, root=None, prefix=None, strip_file_prefix=None): move_wheel_files( self.name, self.req, wheeldir, user=self.use_user_site, home=self.target_dir, root=root, + prefix=prefix, pycompile=self.pycompile, isolated=self.isolated, + strip_file_prefix=strip_file_prefix, @@ -83,8 +87,8 @@ index fa3e270..3a366d0 100644 def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, -- pycompile=True, scheme=None, isolated=False): -+ pycompile=True, scheme=None, isolated=False, strip_file_prefix=None): +- pycompile=True, scheme=None, isolated=False, prefix=None): ++ pycompile=True, scheme=None, isolated=False, prefix=None, strip_file_prefix=None): """Install a wheel""" if not scheme: diff --git a/python-pip.spec b/python-pip.spec index 0b0b592..62b1be6 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,8 +21,8 @@ %endif Name: python-%{srcname} -Version: 7.1.0 -Release: 4%{?dist} +Version: 8.0.2 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -31,10 +31,10 @@ URL: http://www.pip-installer.org Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz # to get tests: -# git clone https://github.com/pypa/pip && cd fig -# git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/ +# git clone https://github.com/pypa/pip && cd pip +# git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/ %if 0%{?with_tests} -Source1: pip-7.1.0-tests.tar.gz +Source1: pip-8.0.2-tests.tar.gz %endif Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -45,10 +45,12 @@ BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?with_tests} +BuildRequires: git BuildRequires: python-mock BuildRequires: pytest BuildRequires: python-pretend BuildRequires: python-freezegun +BuildRequires: python-pytest-capturelog BuildRequires: python-scripttest BuildRequires: python-virtualenv %endif @@ -78,6 +80,7 @@ BuildRequires: python3-mock BuildRequires: python3-pytest BuildRequires: python3-pretend BuildRequires: python3-freezegun +BuildRequires: python3-pytest-capturelog BuildRequires: python3-scripttest BuildRequires: python3-virtualenv %endif @@ -232,6 +235,9 @@ popd %endif # with_python3 %changelog +* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 +- Update to 8.0.2 + * Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 240615c88291718c29cc91325157926602c35049 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Mon, 22 Feb 2016 11:43:40 +0100 Subject: [PATCH 048/287] Of course, I forgot to upload new source... --- .gitignore | 1 + sources | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a024235..ccfe1b6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ pip-0.7.2.tar.gz /pip-7.0.3.tar.gz /pip-7.1.0.tar.gz /pip-7.1.0-tests.tar.gz +/pip-8.0.2.tar.gz diff --git a/sources b/sources index c824eb5..93f5171 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -d935ee9146074b1d3f26c5f0acfd120e pip-7.1.0.tar.gz -8f5d8574a1c1d2bc535846adf8c7265a pip-7.1.0-tests.tar.gz +3a73c4188f8dbad6a1e6f6d44d117eeb pip-8.0.2.tar.gz From 47343443246cfa35f12d0aa659fbdbc7eed90af4 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 20 May 2016 11:32:33 +0200 Subject: [PATCH 049/287] Refactoring: Renamed the file for the prefix stripping patch. --- ... => allow-stripping-given-prefix-from-wheel-RECORD-files.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch => allow-stripping-given-prefix-from-wheel-RECORD-files.patch (100%) diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch similarity index 100% rename from pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch rename to allow-stripping-given-prefix-from-wheel-RECORD-files.patch From 7df5bbee66260f25680b52b17c56bbf98bb7511f Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 17 May 2016 16:57:08 +0200 Subject: [PATCH 050/287] Rebased to a new upstream version 8.1.2 Updated the prefix-stripping patch due to upstream changes in pip/wheel.py --- .gitignore | 1 + ...given-prefix-from-wheel-RECORD-files.patch | 56 ++++++++++++------- python-pip.spec | 13 ++++- sources | 2 +- 4 files changed, 47 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index ccfe1b6..b4f825c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ pip-0.7.2.tar.gz /pip-7.1.0.tar.gz /pip-7.1.0-tests.tar.gz /pip-8.0.2.tar.gz +/pip-8.1.2.tar.gz diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index d47b649..d0cead6 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,14 +1,24 @@ -commit aefacbb76661520415a1c35028f2984e70cfe0bf -Author: Slavek Kabrda -Date: Fri Nov 29 13:24:58 2013 +0100 +From 7b3991c99cd8bb9358e109901d4aa8f51269a87a Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 17 May 2016 16:40:37 +0200 +Subject: [PATCH] Allow stripping given prefix from wheel RECORD files - Allow stripping given prefix from wheel RECORD files +Update of a previous patch [0] by Slavek Kabrda . +Changes in the pip/wheel.py file in upstream prevented #2 hunk from being +applied cleanly. + +[0] pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +--- + pip/commands/install.py | 9 +++++++++ + pip/req/req_install.py | 13 +++++++++---- + pip/wheel.py | 8 ++++++-- + 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/pip/commands/install.py b/pip/commands/install.py -index 1693d01..0287c06 100644 +index 7ddde93..e31bd3e 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py -@@ -137,6 +137,14 @@ class InstallCommand(Command): +@@ -137,6 +137,14 @@ class InstallCommand(RequirementCommand): "directory.") cmd_opts.add_option( @@ -23,7 +33,7 @@ index 1693d01..0287c06 100644 '--prefix', dest='prefix_path', metavar='dir', -@@ -345,6 +353,7 @@ class InstallCommand(Command): +@@ -315,6 +323,7 @@ class InstallCommand(RequirementCommand): global_options, root=options.root_path, prefix=options.prefix_path, @@ -31,12 +41,11 @@ index 1693d01..0287c06 100644 ) reqs = sorted( requirement_set.successfully_installed, - diff --git a/pip/req/req_install.py b/pip/req/req_install.py -index 3ae306d..c171130 100644 +index 9e9fbbb..47f263f 100644 --- a/pip/req/req_install.py +++ b/pip/req/req_install.py -@@ -615,17 +615,21 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +@@ -818,8 +818,7 @@ class InstallRequirement(object): else: return True @@ -46,8 +55,7 @@ index 3ae306d..c171130 100644 if self.editable: self.install_editable( install_options, global_options, prefix=prefix) - return - if self.is_wheel: +@@ -828,7 +827,12 @@ class InstallRequirement(object): version = pip.wheel.wheel_version(self.source_dir) pip.wheel.check_compatibility(version, self.name) @@ -61,7 +69,7 @@ index 3ae306d..c171130 100644 self.install_succeeded = True return -@@ -844,15 +848,16 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +@@ -1021,7 +1025,7 @@ class InstallRequirement(object): def is_wheel(self): return self.link and self.link.is_wheel @@ -70,8 +78,7 @@ index 3ae306d..c171130 100644 move_wheel_files( self.name, self.req, wheeldir, user=self.use_user_site, - home=self.target_dir, - root=root, +@@ -1030,6 +1034,7 @@ class InstallRequirement(object): prefix=prefix, pycompile=self.pycompile, isolated=self.isolated, @@ -80,10 +87,10 @@ index 3ae306d..c171130 100644 def get_dist(self): diff --git a/pip/wheel.py b/pip/wheel.py -index fa3e270..3a366d0 100644 +index b257d76..6d78ce6 100644 --- a/pip/wheel.py +++ b/pip/wheel.py -@@ -136,7 +136,7 @@ def get_entrypoints(filename): +@@ -238,7 +238,7 @@ def get_entrypoints(filename): def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, @@ -92,12 +99,19 @@ index fa3e270..3a366d0 100644 """Install a wheel""" if not scheme: -@@ -357,6 +357,8 @@ if __name__ == '__main__': +@@ -522,7 +522,11 @@ if __name__ == '__main__': writer.writerow(row) for f in generated: h, l = rehash(f) -+ if strip_file_prefix and f.startswith(strip_file_prefix): -+ f = os.path.join(os.sep, os.path.relpath(f, strip_file_prefix)) - writer.writerow((f, h, l)) +- writer.writerow((normpath(f, lib_dir), h, l)) ++ final_path = normpath(f, lib_dir) ++ if strip_file_prefix and final_path.startswith(strip_file_prefix): ++ final_path = os.path.join(os.sep, ++ os.path.relpath(final_path, strip_file_prefix)) ++ writer.writerow((final_path, h, l)) for f in installed: writer.writerow((installed[f], '', '')) + shutil.move(temp_record, record) +-- +2.5.5 + diff --git a/python-pip.spec b/python-pip.spec index 62b1be6..e183f32 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,14 +21,14 @@ %endif Name: python-%{srcname} -Version: 8.0.2 +Version: 8.1.2 Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT URL: http://www.pip-installer.org -Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz # to get tests: # git clone https://github.com/pypa/pip && cd pip @@ -37,7 +37,9 @@ Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{versio Source1: pip-8.0.2-tests.tar.gz %endif -Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +# Patch until the following issue gets implemented upstream: +# https://github.com/pypa/pip/issues/1351 +Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -235,6 +237,11 @@ popd %endif # with_python3 %changelog +* Tue May 17 2016 Tomas Orsava - 8.1.2-1 +- Update to 8.1.2 +- Moved to a new PyPI URL format +- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py + * Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 - Update to 8.0.2 diff --git a/sources b/sources index 93f5171..efcb06b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3a73c4188f8dbad6a1e6f6d44d117eeb pip-8.0.2.tar.gz +87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz From 4841a130cb7f00a33a31c55c91abf1ac5997aa4e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 10:58:39 +0000 Subject: [PATCH 051/287] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index e183f32..8eda65d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -237,6 +237,9 @@ popd %endif # with_python3 %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Tue May 17 2016 Tomas Orsava - 8.1.2-1 - Update to 8.1.2 - Moved to a new PyPI URL format From 47ea835c808b77ba989da3d42f1cc75c4d335c8e Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 5 Aug 2016 18:32:19 +0200 Subject: [PATCH 052/287] Moved python-pip into the python2-pip subpackage Added the python_provide macro --- python-pip.spec | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 8eda65d..1158836 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -30,6 +30,9 @@ License: MIT URL: http://www.pip-installer.org Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + # to get tests: # git clone https://github.com/pypa/pip && cd pip # git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/ @@ -41,9 +44,16 @@ Source1: pip-8.0.2-tests.tar.gz # https://github.com/pypa/pip/issues/1351 Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%description +Pip is a replacement for `easy_install +`_. It uses mostly the +same techniques for finding packages, so packages that were made +easy_installable should be pip-installable as well. -BuildArch: noarch + +%package -n python2-%{srcname} +Summary: A tool for installing and managing Python 2 packages +Group: Development/Libraries BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?with_tests} @@ -61,8 +71,9 @@ BuildRequires: python-pip BuildRequires: python-wheel %endif Requires: python-setuptools +%{?python_provide:%python_provide python2-%{srcname}} -%description +%description -n python2-%{srcname} Pip is a replacement for `easy_install `_. It uses mostly the same techniques for finding packages, so packages that were made @@ -70,7 +81,7 @@ easy_installable should be pip-installable as well. %if 0%{?with_python3} -%package -n python3-pip +%package -n python3-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries @@ -91,14 +102,16 @@ BuildRequires: python3-pip BuildRequires: python3-wheel %endif Requires: python3-setuptools +%{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-pip +%description -n python3-%{srcname} Pip is a replacement for `easy_install `_. It uses mostly the same techniques for finding packages, so packages that were made easy_installable should be pip-installable as well. %endif # with_python3 + %prep %setup -q -n %{srcname}-%{version} %if 0%{?with_tests} @@ -206,7 +219,8 @@ popd # unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in # fedora yet. Once it is, check can be implemented -%files + +%files -n python2-%{srcname} %defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE.txt @@ -223,7 +237,7 @@ popd %endif %if 0%{?with_python3} -%files -n python3-pip +%files -n python3-%{srcname} %defattr(-,root,root,-) %license LICENSE.txt %doc README.rst docs @@ -237,6 +251,10 @@ popd %endif # with_python3 %changelog +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 +- Moved python-pip into the python2-pip subpackage +- Added the python_provide macro + * Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From 627cdf9b5b16edc67b73cdab206d88de981d39e8 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Mon, 15 Aug 2016 16:18:34 +0200 Subject: [PATCH 053/287] Updated test sources to 8.1.2 --- .gitignore | 1 + python-pip.spec | 13 +++++++------ sources | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b4f825c..2153847 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ pip-0.7.2.tar.gz /pip-7.1.0-tests.tar.gz /pip-8.0.2.tar.gz /pip-8.1.2.tar.gz +/pip-8.1.2-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 1158836..f0e3a0a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -37,7 +37,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # git clone https://github.com/pypa/pip && cd pip # git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/ %if 0%{?with_tests} -Source1: pip-8.0.2-tests.tar.gz +Source1: pip-8.1.2-tests.tar.gz %endif # Patch until the following issue gets implemented upstream: @@ -58,6 +58,7 @@ BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?with_tests} BuildRequires: git +BuildRequires: bzr BuildRequires: python-mock BuildRequires: pytest BuildRequires: python-pretend @@ -208,7 +209,7 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %check py.test -m 'not network' pushd %{py3dir} -py.test-3.4 -m 'not network' +py.test-%{python3_version} -m 'not network' popd %endif @@ -216,9 +217,6 @@ popd %clean %{__rm} -rf %{buildroot} -# unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in -# fedora yet. Once it is, check can be implemented - %files -n python2-%{srcname} %defattr(-,root,root,-) @@ -251,6 +249,9 @@ popd %endif # with_python3 %changelog +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 +- Updated the test sources + * Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 - Moved python-pip into the python2-pip subpackage - Added the python_provide macro diff --git a/sources b/sources index efcb06b..71a12f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz +e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz From 788deaa0c1924507a1584d7f50f70fb90b07562d Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Mon, 15 Aug 2016 17:33:27 +0200 Subject: [PATCH 054/287] Fixed the sources file --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index 71a12f4..6722521 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz From 6190fb22295da0434fd99f72bbcc1a6697ac4c04 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 18 Nov 2016 14:38:54 -0700 Subject: [PATCH 055/287] Enable EPEL Python 3 builds - Use new python macros - Cleanup spec --- python-pip.spec | 84 +++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 51 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f0e3a0a..e2c1e3f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,11 +1,6 @@ -%if (! 0%{?rhel}) || 0%{?rhel} > 7 %global with_python3 1 %global build_wheel 1 %global with_tests 0 -%endif -%if 0%{?rhel} && 0%{?rhel} < 6 -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%endif %global srcname pip %if 0%{?build_wheel} @@ -22,7 +17,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -54,7 +49,7 @@ easy_installable should be pip-installable as well. %package -n python2-%{srcname} Summary: A tool for installing and managing Python 2 packages Group: Development/Libraries -BuildRequires: python-devel +BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?with_tests} BuildRequires: git @@ -68,7 +63,7 @@ BuildRequires: python-scripttest BuildRequires: python-virtualenv %endif %if 0%{?build_wheel} -BuildRequires: python-pip +BuildRequires: python2-pip BuildRequires: python-wheel %endif Requires: python-setuptools @@ -82,30 +77,30 @@ easy_installable should be pip-installable as well. %if 0%{?with_python3} -%package -n python3-%{srcname} +%package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if 0%{?with_tests} -BuildRequires: python3-mock -BuildRequires: python3-pytest -BuildRequires: python3-pretend -BuildRequires: python3-freezegun -BuildRequires: python3-pytest-capturelog -BuildRequires: python3-scripttest -BuildRequires: python3-virtualenv +BuildRequires: python%{python3_pkgversion}-mock +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-pretend +BuildRequires: python%{python3_pkgversion}-freezegun +BuildRequires: python%{python3_pkgversion}-pytest-capturelog +BuildRequires: python%{python3_pkgversion}-scripttest +BuildRequires: python%{python3_pkgversion}-virtualenv %endif %if 0%{?build_wheel} -BuildRequires: python3-pip -BuildRequires: python3-wheel +BuildRequires: python%{python3_pkgversion}-pip +BuildRequires: python%{python3_pkgversion}-wheel %endif -Requires: python3-setuptools -%{?python_provide:%python_provide python3-%{srcname}} +Requires: python%{python3_pkgversion}-setuptools +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -%description -n python3-%{srcname} +%description -n python%{python3_pkgversion}-%{srcname} Pip is a replacement for `easy_install `_. It uses mostly the same techniques for finding packages, so packages that were made @@ -121,50 +116,41 @@ tar -xf %{SOURCE1} %patch0 -p1 -%{__sed} -i '1d' pip/__init__.py - -%if 0%{?with_python3} -cp -a . %{py3dir} -%endif # with_python3 +sed -i '1d' pip/__init__.py %build %if 0%{?build_wheel} -%{__python} setup.py bdist_wheel +%py2_build_wheel %else -%{__python} setup.py build +%py2_build %endif %if 0%{?with_python3} -pushd %{py3dir} %if 0%{?build_wheel} -%{__python3} setup.py bdist_wheel +%py3_build_wheel %else -%{__python3} setup.py build +%py3_build %endif -popd %endif # with_python3 %install -%{__rm} -rf %{buildroot} - %if 0%{?with_python3} -pushd %{py3dir} %if 0%{?build_wheel} -pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} +%py3_install_wheel %{python3_wheelname} # TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to # (pip install wheel doesn't overwrite) rm %{buildroot}%{_bindir}/pip %else -%{__python3} setup.py install --skip-build --root %{buildroot} +%py3_install %endif %endif # with_python3 %if 0%{?build_wheel} -pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} +%py2_install_wheel %{python2_wheelname} %else -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%py2_install %endif mkdir -p %{buildroot}%{bashcompdir} @@ -208,19 +194,11 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %if 0%{?with_tests} %check py.test -m 'not network' -pushd %{py3dir} py.test-%{python3_version} -m 'not network' -popd %endif -%clean -%{__rm} -rf %{buildroot} - - %files -n python2-%{srcname} -%defattr(-,root,root,-) -%{!?_licensedir:%global license %%doc} %license LICENSE.txt %doc README.rst docs %attr(755,root,root) %{_bindir}/pip @@ -235,8 +213,7 @@ popd %endif %if 0%{?with_python3} -%files -n python3-%{srcname} -%defattr(-,root,root,-) +%files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst docs %attr(755,root,root) %{_bindir}/pip3* @@ -249,6 +226,11 @@ popd %endif # with_python3 %changelog +* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 +- Enable EPEL Python 3 builds +- Use new python macros +- Cleanup spec + * Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 - Updated the test sources From cdcedeafd9018ca6e4c57b9037d3d01de516e1bf Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 18 Nov 2016 14:31:08 -0700 Subject: [PATCH 056/287] Update to 9.0.1 --- ...given-prefix-from-wheel-RECORD-files.patch | 58 ++++++------------- python-pip.spec | 7 ++- 2 files changed, 23 insertions(+), 42 deletions(-) diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index d0cead6..d66b250 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,24 +1,7 @@ -From 7b3991c99cd8bb9358e109901d4aa8f51269a87a Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Tue, 17 May 2016 16:40:37 +0200 -Subject: [PATCH] Allow stripping given prefix from wheel RECORD files - -Update of a previous patch [0] by Slavek Kabrda . -Changes in the pip/wheel.py file in upstream prevented #2 hunk from being -applied cleanly. - -[0] pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch ---- - pip/commands/install.py | 9 +++++++++ - pip/req/req_install.py | 13 +++++++++---- - pip/wheel.py | 8 ++++++-- - 3 files changed, 24 insertions(+), 6 deletions(-) - -diff --git a/pip/commands/install.py b/pip/commands/install.py -index 7ddde93..e31bd3e 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -137,6 +137,14 @@ class InstallCommand(RequirementCommand): +diff -up pip-9.0.1/pip/commands/install.py.orig pip-9.0.1/pip/commands/install.py +--- pip-9.0.1/pip/commands/install.py.orig 2016-11-06 11:49:45.000000000 -0700 ++++ pip-9.0.1/pip/commands/install.py 2016-11-16 16:20:48.638906543 -0700 +@@ -151,6 +151,14 @@ class InstallCommand(RequirementCommand) "directory.") cmd_opts.add_option( @@ -33,19 +16,18 @@ index 7ddde93..e31bd3e 100644 '--prefix', dest='prefix_path', metavar='dir', -@@ -315,6 +323,7 @@ class InstallCommand(RequirementCommand): +@@ -340,6 +348,7 @@ class InstallCommand(RequirementCommand) global_options, root=options.root_path, prefix=options.prefix_path, + strip_file_prefix=options.strip_file_prefix, ) - reqs = sorted( - requirement_set.successfully_installed, -diff --git a/pip/req/req_install.py b/pip/req/req_install.py -index 9e9fbbb..47f263f 100644 ---- a/pip/req/req_install.py -+++ b/pip/req/req_install.py -@@ -818,8 +818,7 @@ class InstallRequirement(object): + + possible_lib_locations = get_lib_location_guesses( +diff -up pip-9.0.1/pip/req/req_install.py.orig pip-9.0.1/pip/req/req_install.py +--- pip-9.0.1/pip/req/req_install.py.orig 2016-11-06 11:49:45.000000000 -0700 ++++ pip-9.0.1/pip/req/req_install.py 2016-11-16 16:19:24.848336960 -0700 +@@ -838,8 +838,7 @@ class InstallRequirement(object): else: return True @@ -55,7 +37,7 @@ index 9e9fbbb..47f263f 100644 if self.editable: self.install_editable( install_options, global_options, prefix=prefix) -@@ -828,7 +827,12 @@ class InstallRequirement(object): +@@ -848,7 +847,12 @@ class InstallRequirement(object): version = pip.wheel.wheel_version(self.source_dir) pip.wheel.check_compatibility(version, self.name) @@ -69,7 +51,7 @@ index 9e9fbbb..47f263f 100644 self.install_succeeded = True return -@@ -1021,7 +1025,7 @@ class InstallRequirement(object): +@@ -1053,7 +1057,7 @@ class InstallRequirement(object): def is_wheel(self): return self.link and self.link.is_wheel @@ -78,7 +60,7 @@ index 9e9fbbb..47f263f 100644 move_wheel_files( self.name, self.req, wheeldir, user=self.use_user_site, -@@ -1030,6 +1034,7 @@ class InstallRequirement(object): +@@ -1062,6 +1066,7 @@ class InstallRequirement(object): prefix=prefix, pycompile=self.pycompile, isolated=self.isolated, @@ -86,10 +68,9 @@ index 9e9fbbb..47f263f 100644 ) def get_dist(self): -diff --git a/pip/wheel.py b/pip/wheel.py -index b257d76..6d78ce6 100644 ---- a/pip/wheel.py -+++ b/pip/wheel.py +diff -up pip-9.0.1/pip/wheel.py.orig pip-9.0.1/pip/wheel.py +--- pip-9.0.1/pip/wheel.py.orig 2016-11-06 11:49:45.000000000 -0700 ++++ pip-9.0.1/pip/wheel.py 2016-11-16 16:19:24.848336960 -0700 @@ -238,7 +238,7 @@ def get_entrypoints(filename): @@ -99,7 +80,7 @@ index b257d76..6d78ce6 100644 """Install a wheel""" if not scheme: -@@ -522,7 +522,11 @@ if __name__ == '__main__': +@@ -521,7 +521,11 @@ if __name__ == '__main__': writer.writerow(row) for f in generated: h, l = rehash(f) @@ -112,6 +93,3 @@ index b257d76..6d78ce6 100644 for f in installed: writer.writerow((installed[f], '', '')) shutil.move(temp_record, record) --- -2.5.5 - diff --git a/python-pip.spec b/python-pip.spec index e2c1e3f..f574e57 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,8 +16,8 @@ %endif Name: python-%{srcname} -Version: 8.1.2 -Release: 5%{?dist} +Version: 9.0.1 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -226,6 +226,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 +- Update to 9.0.1 + * Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 - Enable EPEL Python 3 builds - Use new python macros From 7ea3985a41e6ce23be0c44709fb94f517473feec Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 21 Nov 2016 08:50:17 -0700 Subject: [PATCH 057/287] Drop BuildRoot --- python-pip.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index f574e57..b53323f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -26,7 +26,6 @@ URL: http://www.pip-installer.org Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # to get tests: # git clone https://github.com/pypa/pip && cd pip From 3d2b99cd7097ba968abec5eb2752f6363446a67f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 21 Nov 2016 09:06:02 -0700 Subject: [PATCH 058/287] Upload 9.0.1 sources --- .gitignore | 2 ++ python-pip.spec | 4 ++-- sources | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2153847..4844c76 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ pip-0.7.2.tar.gz /pip-8.0.2.tar.gz /pip-8.1.2.tar.gz /pip-8.1.2-tests.tar.gz +/pip-9.0.1.tar.gz +/pip-9.0.1-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index b53323f..8a8a2af 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -29,9 +29,9 @@ BuildArch: noarch # to get tests: # git clone https://github.com/pypa/pip && cd pip -# git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/ +# git checkout 9.0.1 && tar -czvf ../pip-9.0.1-tests.tar.gz tests/ %if 0%{?with_tests} -Source1: pip-8.1.2-tests.tar.gz +Source1: pip-9.0.1-tests.tar.gz %endif # Patch until the following issue gets implemented upstream: diff --git a/sources b/sources index 6722521..31e725f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz -e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz +35f01da33009719497f01a4ba69d63c9 pip-9.0.1.tar.gz +93ea1b8882c0e3e0e52d5034970d900f pip-9.0.1-tests.tar.gz From ce7b625142ff9dd25aae8d15e6505ce6290e550a Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Sat, 10 Dec 2016 13:28:49 +0100 Subject: [PATCH 059/287] Rebuild for Python 3.6 without wheel --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 8a8a2af..0d90d54 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,5 @@ %global with_python3 1 -%global build_wheel 1 +%global build_wheel 0 %global with_tests 0 %global srcname pip @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -225,6 +225,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 +- Rebuild for Python 3.6 without wheel + * Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 - Update to 9.0.1 From c4e2448c9e0cae9d614bfdf3e76ed1e026ac0530 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Sat, 10 Dec 2016 14:49:54 +0100 Subject: [PATCH 060/287] Rebuild for Python 3.6 with wheel --- python-pip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 0d90d54..cb4faed 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,5 @@ %global with_python3 1 -%global build_wheel 0 +%global build_wheel 1 %global with_tests 0 %global srcname pip @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -225,6 +225,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 +- Rebuild for Python 3.6 with wheel + * Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 - Rebuild for Python 3.6 without wheel From de16c87712a6ee6b165d6b47581fbcb6e8d9be95 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Mon, 2 Jan 2017 16:33:49 +0100 Subject: [PATCH 061/287] Provide symlinks to executables to comply with Fedora guidelines for Python --- python-pip.spec | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index cb4faed..59e3a70 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -190,6 +190,13 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %{buildroot}%{bashcompdir}/pip +# Provide symlinks to executables to comply with Fedora guidelines for Python +ln -s ./pip%{python2_version} %{buildroot}%{_bindir}/pip-%{python2_version} +ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} +ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2 +ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 + + %if 0%{?with_tests} %check py.test -m 'not network' @@ -200,8 +207,11 @@ py.test-%{python3_version} -m 'not network' %files -n python2-%{srcname} %license LICENSE.txt %doc README.rst docs -%attr(755,root,root) %{_bindir}/pip -%attr(755,root,root) %{_bindir}/pip2* +%{_bindir}/pip +%{_bindir}/pip2 +%{_bindir}/pip-2 +%{_bindir}/pip%{python2_version} +%{_bindir}/pip-%{python2_version} %{python_sitelib}/pip* %{bashcompdir} %if 0%{?with_python3} @@ -215,7 +225,10 @@ py.test-%{python3_version} -m 'not network' %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst docs -%attr(755,root,root) %{_bindir}/pip3* +%{_bindir}/pip3 +%{_bindir}/pip-3 +%{_bindir}/pip%{python3_version} +%{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* %dir %{bashcompdir} %{bashcompdir}/pip3* @@ -225,6 +238,10 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 +- Provide symlinks to executables to comply with Fedora guidelines for Python +Resolves: rhbz#1406922 + * Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 - Rebuild for Python 3.6 with wheel From 71bf5a7601782db46344f79ad6751f7f3acdddea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 09:57:45 +0000 Subject: [PATCH 062/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 59e3a70..51e162b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -238,6 +238,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 - Provide symlinks to executables to comply with Fedora guidelines for Python Resolves: rhbz#1406922 From 3d0a78651ff8b2453445e5c5a7d069f20d2b6a22 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Thu, 16 Feb 2017 11:48:01 +0100 Subject: [PATCH 063/287] Added patch: Emit a warning when running with root privileges --- ...ng-when-running-with-root-privileges.patch | 30 +++++++++++++++++++ python-pip.spec | 11 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 emit-a-warning-when-running-with-root-privileges.patch diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch new file mode 100644 index 0000000..ecc2df5 --- /dev/null +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -0,0 +1,30 @@ +From 5023ea0feceb5a9cc4931f6be9404d4582cb8502 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 14 Feb 2017 17:10:09 +0100 +Subject: [PATCH] Emit a warning when running with root privileges + +--- + pip/commands/install.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/pip/commands/install.py b/pip/commands/install.py +index b7e662bd..c1bcf3b5 100644 +--- a/pip/commands/install.py ++++ b/pip/commands/install.py +@@ -192,6 +192,13 @@ class InstallCommand(RequirementCommand): + cmdoptions.resolve_wheel_no_use_binary(options) + cmdoptions.check_install_build_global(options) + ++ # Check whether we have root privileges ++ if os.getuid() == 0: ++ logger.warning( ++ "WARNING: Running pip install with root privileges is " ++ "generally not advised. Try `pip install --user` instead." ++ ) ++ + if options.as_egg: + warnings.warn( + "--egg has been deprecated and will be removed in the future. " +-- +2.11.0 + diff --git a/python-pip.spec b/python-pip.spec index 51e162b..e58c6f3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -38,6 +38,11 @@ Source1: pip-9.0.1-tests.tar.gz # https://github.com/pypa/pip/issues/1351 Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch +# Downstream only patch +# Emit a warning to the user if pip install is run with root privileges +# Issue upstream: https://github.com/pypa/pip/issues/4288 +Patch1: emit-a-warning-when-running-with-root-privileges.patch + %description Pip is a replacement for `easy_install `_. It uses mostly the @@ -114,6 +119,7 @@ tar -xf %{SOURCE1} %endif %patch0 -p1 +%patch1 -p1 sed -i '1d' pip/__init__.py @@ -238,6 +244,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 +- Added patch 1: Emit a warning when running with root privileges + * Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 33d96860e500d5997f962eb6da90e8b24ac5ae58 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Thu, 23 Feb 2017 12:16:46 +0100 Subject: [PATCH 064/287] Customize the sudo pip warning with the proper version of the pip --- ...ng-when-running-with-root-privileges.patch | 26 +++++++++++++------ python-pip.spec | 6 ++++- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index ecc2df5..5ad98e4 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,25 +1,35 @@ -From 5023ea0feceb5a9cc4931f6be9404d4582cb8502 Mon Sep 17 00:00:00 2001 +From e29dfc3855813dbab25513ca82703fc5d7b989cf Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 14 Feb 2017 17:10:09 +0100 Subject: [PATCH] Emit a warning when running with root privileges --- - pip/commands/install.py | 7 +++++++ - 1 file changed, 7 insertions(+) + pip/commands/install.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) -diff --git a/pip/commands/install.py b/pip/commands/install.py -index b7e662bd..c1bcf3b5 100644 +diff --git a/commands/install.py b/commands/install.py +index 227c526..88c7c58 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py -@@ -192,6 +192,13 @@ class InstallCommand(RequirementCommand): +@@ -6,6 +6,8 @@ import os + import tempfile + import shutil + import warnings ++import sys ++from os import path + try: + import wheel + except ImportError: +@@ -193,6 +195,14 @@ class InstallCommand(RequirementCommand): cmdoptions.resolve_wheel_no_use_binary(options) cmdoptions.check_install_build_global(options) + # Check whether we have root privileges + if os.getuid() == 0: + logger.warning( -+ "WARNING: Running pip install with root privileges is " -+ "generally not advised. Try `pip install --user` instead." ++ "WARNING: Running pip install with root privileges is" ++ "generally not a good idea. Try `%s install --user` instead." ++ % path.basename(sys.argv[0]) + ) + if options.as_egg: diff --git a/python-pip.spec b/python-pip.spec index e58c6f3..c5b0bac 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -244,6 +244,10 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 +- Patch 1 update: Customize the warning with the proper version of the pip + command + * Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 - Added patch 1: Emit a warning when running with root privileges From 5a8e99c9e5769de15e43efe2cd339f45a034d1d7 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 3 Mar 2017 15:15:18 +0100 Subject: [PATCH 065/287] No sudo pip warning in venv or virtualenv --- ...ng-when-running-with-root-privileges.patch | 22 +++++++++++-------- python-pip.spec | 5 ++++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 5ad98e4..6cfe250 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,14 +1,14 @@ -From e29dfc3855813dbab25513ca82703fc5d7b989cf Mon Sep 17 00:00:00 2001 +From 18a617e9e0f64b727938422d4f941dfddfbf5d00 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 14 Feb 2017 17:10:09 +0100 -Subject: [PATCH] Emit a warning when running with root privileges +Subject: [PATCH] Emit a warning when running with root privileges. --- - pip/commands/install.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) + pip/commands/install.py | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) -diff --git a/commands/install.py b/commands/install.py -index 227c526..88c7c58 100644 +diff --git a/pip/commands/install.py b/pip/commands/install.py +index 227c526..277a3d1 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py @@ -6,6 +6,8 @@ import os @@ -20,12 +20,16 @@ index 227c526..88c7c58 100644 try: import wheel except ImportError: -@@ -193,6 +195,14 @@ class InstallCommand(RequirementCommand): +@@ -193,6 +195,18 @@ class InstallCommand(RequirementCommand): cmdoptions.resolve_wheel_no_use_binary(options) cmdoptions.check_install_build_global(options) -+ # Check whether we have root privileges -+ if os.getuid() == 0: ++ def is_venv(): ++ return hasattr(sys, 'real_prefix') or \ ++ (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix) ++ ++ # Check whether we have root privileges and aren't in venv/virtualenv ++ if os.getuid() == 0 and not is_venv(): + logger.warning( + "WARNING: Running pip install with root privileges is" + "generally not a good idea. Try `%s install --user` instead." diff --git a/python-pip.spec b/python-pip.spec index c5b0bac..379b005 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -244,6 +244,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 +- Patch 1 update: No sudo pip warning in venv or virtualenv + * Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 - Patch 1 update: Customize the warning with the proper version of the pip command From d6fcf17a6e6686f638b77b1a485469a991ddbb57 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 21 Mar 2017 12:09:02 +0100 Subject: [PATCH 066/287] Fix typo in the sudo pip warning --- emit-a-warning-when-running-with-root-privileges.patch | 2 +- python-pip.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 6cfe250..644fce9 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -31,7 +31,7 @@ index 227c526..277a3d1 100644 + # Check whether we have root privileges and aren't in venv/virtualenv + if os.getuid() == 0 and not is_venv(): + logger.warning( -+ "WARNING: Running pip install with root privileges is" ++ "WARNING: Running pip install with root privileges is " + "generally not a good idea. Try `%s install --user` instead." + % path.basename(sys.argv[0]) + ) diff --git a/python-pip.spec b/python-pip.spec index 379b005..e2ca90c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -244,6 +244,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 +- Fix typo in the sudo pip warning + * Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 - Patch 1 update: No sudo pip warning in venv or virtualenv From db23604636ee1b1436d0e505e35b373003d96904 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 23 May 2017 15:50:27 +0200 Subject: [PATCH 067/287] Modernized package descriptions --- python-pip.spec | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e2ca90c..7bb6278 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -44,10 +44,10 @@ Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch Patch1: emit-a-warning-when-running-with-root-privileges.patch %description -Pip is a replacement for `easy_install -`_. It uses mostly the -same techniques for finding packages, so packages that were made -easy_installable should be pip-installable as well. +pip is a package management system used to install and manage software packages +written in Python. Many packages can be found in the Python Package Index +(PyPI). pip is a recursive acronym that can stand for either "Pip Installs +Packages" or "Pip Installs Python". %package -n python2-%{srcname} @@ -74,10 +74,10 @@ Requires: python-setuptools %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} -Pip is a replacement for `easy_install -`_. It uses mostly the -same techniques for finding packages, so packages that were made -easy_installable should be pip-installable as well. +pip is a package management system used to install and manage software packages +written in Python. Many packages can be found in the Python Package Index +(PyPI). pip is a recursive acronym that can stand for either "Pip Installs +Packages" or "Pip Installs Python". %if 0%{?with_python3} @@ -105,10 +105,11 @@ Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} -Pip is a replacement for `easy_install -`_. It uses mostly the -same techniques for finding packages, so packages that were made -easy_installable should be pip-installable as well. +pip is a package management system used to install and manage software packages +written in Python. Many packages can be found in the Python Package Index +(PyPI). pip is a recursive acronym that can stand for either "Pip Installs +Packages" or "Pip Installs Python". + %endif # with_python3 @@ -244,6 +245,10 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Tue May 23 2017 Tomas Orsava - 9.0.1-10 +- Modernized package descriptions +Resolves: rhbz#1452568 + * Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 - Fix typo in the sudo pip warning From e27aaa21f19120825b5d729c5c3b470025278702 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 11:18:15 +0000 Subject: [PATCH 068/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 7bb6278..62689bd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -245,6 +245,9 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Tue May 23 2017 Tomas Orsava - 9.0.1-10 - Modernized package descriptions Resolves: rhbz#1452568 From a096270f29910e1869577f23500ac935dfed5d03 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 29 Aug 2017 11:28:16 +0200 Subject: [PATCH 069/287] Switch macros to bcond's To facilitate building the Python 2 and Python 3 modules. --- python-pip.spec | 64 +++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 62689bd..fe3e80b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,11 +1,12 @@ -%global with_python3 1 -%global build_wheel 1 -%global with_tests 0 +%bcond_with bootstrap +%bcond_with tests + +%bcond_without python3 %global srcname pip -%if 0%{?build_wheel} +%if %{without bootstrap} %global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl -%if 0%{?with_python3} +%if %{with python3} %global python3_wheelname %python2_wheelname %endif %endif @@ -30,7 +31,7 @@ BuildArch: noarch # to get tests: # git clone https://github.com/pypa/pip && cd pip # git checkout 9.0.1 && tar -czvf ../pip-9.0.1-tests.tar.gz tests/ -%if 0%{?with_tests} +%if %{with tests} Source1: pip-9.0.1-tests.tar.gz %endif @@ -55,7 +56,7 @@ Summary: A tool for installing and managing Python 2 packages Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python-setuptools -%if 0%{?with_tests} +%if %{with tests} BuildRequires: git BuildRequires: bzr BuildRequires: python-mock @@ -66,7 +67,7 @@ BuildRequires: python-pytest-capturelog BuildRequires: python-scripttest BuildRequires: python-virtualenv %endif -%if 0%{?build_wheel} +%if %{without bootstrap} BuildRequires: python2-pip BuildRequires: python-wheel %endif @@ -80,7 +81,7 @@ written in Python. Many packages can be found in the Python Package Index Packages" or "Pip Installs Python". -%if 0%{?with_python3} +%if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries @@ -88,7 +89,7 @@ Group: Development/Libraries BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion -%if 0%{?with_tests} +%if %{with tests} BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend @@ -97,7 +98,7 @@ BuildRequires: python%{python3_pkgversion}-pytest-capturelog BuildRequires: python%{python3_pkgversion}-scripttest BuildRequires: python%{python3_pkgversion}-virtualenv %endif -%if 0%{?build_wheel} +%if %{without bootstrap} BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %endif @@ -110,12 +111,12 @@ written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". -%endif # with_python3 +%endif # with python3 %prep %setup -q -n %{srcname}-%{version} -%if 0%{?with_tests} +%if %{with tests} tar -xf %{SOURCE1} %endif @@ -126,34 +127,35 @@ sed -i '1d' pip/__init__.py %build -%if 0%{?build_wheel} +%if %{without bootstrap} %py2_build_wheel %else %py2_build %endif -%if 0%{?with_python3} -%if 0%{?build_wheel} +%if %{with python3} +%if %{without bootstrap} %py3_build_wheel %else %py3_build %endif -%endif # with_python3 +%endif # with python3 %install -%if 0%{?with_python3} -%if 0%{?build_wheel} +%if %{with python3} +%if %{without bootstrap} %py3_install_wheel %{python3_wheelname} -# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to -# (pip install wheel doesn't overwrite) -rm %{buildroot}%{_bindir}/pip %else %py3_install %endif -%endif # with_python3 -%if 0%{?build_wheel} +# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to +# (pip install wheel doesn't overwrite) +rm %{buildroot}%{_bindir}/pip +%endif # with python3 + +%if %{without bootstrap} %py2_install_wheel %{python2_wheelname} %else %py2_install @@ -163,7 +165,7 @@ mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ > %{buildroot}%{bashcompdir}/pip -%if 0%{?with_python3} +%if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip3 completion --bash \ > %{buildroot}%{bashcompdir}/pip3 @@ -179,7 +181,7 @@ for pip in %{buildroot}%{_bindir}/pip*; do ln -s pip %{buildroot}%{bashcompdir}/$pip %endif ;; -%if 0%{?with_python3} +%if %{with python3} pip3?*) pips3="$pips3 $pip" %if 0%{?bashcomp2} @@ -189,7 +191,7 @@ for pip in %{buildroot}%{_bindir}/pip*; do %endif esac done -%if 0%{?with_python3} +%if %{with python3} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ %{buildroot}%{bashcompdir}/pip3 @@ -204,7 +206,7 @@ ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2 ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -%if 0%{?with_tests} +%if %{with tests} %check py.test -m 'not network' py.test-%{python3_version} -m 'not network' @@ -221,14 +223,14 @@ py.test-%{python3_version} -m 'not network' %{_bindir}/pip-%{python2_version} %{python_sitelib}/pip* %{bashcompdir} -%if 0%{?with_python3} +%if %{with python3} %exclude %{bashcompdir}/pip3* %endif %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif -%if 0%{?with_python3} +%if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst docs @@ -242,7 +244,7 @@ py.test-%{python3_version} -m 'not network' %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif -%endif # with_python3 +%endif # with python3 %changelog * Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 From 222c069cc5dd3ff61fe15a626212cdce97b9ac28 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 29 Aug 2017 14:38:10 +0200 Subject: [PATCH 070/287] Make Python 2 optional To facilitate building the Python 2 and Python 3 modules. --- python-pip.spec | 57 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index fe3e80b..44e4dee 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,13 +1,17 @@ %bcond_with bootstrap %bcond_with tests +%bcond_without python2 %bcond_without python3 %global srcname pip +%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl %if %{without bootstrap} -%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%if %{with python2} +%global python2_wheelname %python_wheelname +%endif %if %{with python3} -%global python3_wheelname %python2_wheelname +%global python3_wheelname %python_wheelname %endif %endif @@ -18,7 +22,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -28,6 +32,9 @@ Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{sr BuildArch: noarch +BuildRequires: git +BuildRequires: bzr + # to get tests: # git clone https://github.com/pypa/pip && cd pip # git checkout 9.0.1 && tar -czvf ../pip-9.0.1-tests.tar.gz tests/ @@ -51,14 +58,13 @@ written in Python. Many packages can be found in the Python Package Index Packages" or "Pip Installs Python". +%if %{with python2} %package -n python2-%{srcname} Summary: A tool for installing and managing Python 2 packages Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python-setuptools %if %{with tests} -BuildRequires: git -BuildRequires: bzr BuildRequires: python-mock BuildRequires: pytest BuildRequires: python-pretend @@ -80,6 +86,8 @@ written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". +%endif # with python2 + %if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} @@ -127,11 +135,13 @@ sed -i '1d' pip/__init__.py %build +%if %{with python2} %if %{without bootstrap} %py2_build_wheel %else %py2_build %endif +%endif # with python2 %if %{with python3} %if %{without bootstrap} @@ -155,16 +165,20 @@ sed -i '1d' pip/__init__.py rm %{buildroot}%{_bindir}/pip %endif # with python3 +%if %{with python2} %if %{without bootstrap} %py2_install_wheel %{python2_wheelname} %else %py2_install %endif +%endif # with python2 mkdir -p %{buildroot}%{bashcompdir} -PYTHONPATH=%{buildroot}%{python_sitelib} \ +%if %{with python2} +PYTHONPATH=%{buildroot}%{python2_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ > %{buildroot}%{bashcompdir}/pip +%endif %if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip3 completion --bash \ @@ -175,12 +189,14 @@ pips3=pip3 for pip in %{buildroot}%{_bindir}/pip*; do pip=$(basename $pip) case $pip in +%if %{with python2} pip2*) pips2="$pips2 $pip" %if 0%{?bashcomp2} ln -s pip %{buildroot}%{bashcompdir}/$pip %endif ;; +%endif %if %{with python3} pip3?*) pips3="$pips3 $pip" @@ -196,23 +212,34 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ %{buildroot}%{bashcompdir}/pip3 %endif +%if %{with python2} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %{buildroot}%{bashcompdir}/pip +%endif # Provide symlinks to executables to comply with Fedora guidelines for Python +%if %{with python2} ln -s ./pip%{python2_version} %{buildroot}%{_bindir}/pip-%{python2_version} -ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2 +%endif +%if %{with python3} +ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 +%endif %if %{with tests} %check -py.test -m 'not network' +%if %{with python2} +py.test-%{python2_version} -m 'not network' +%endif +%if %{with python3} py.test-%{python3_version} -m 'not network' %endif +%endif +%if %{with python2} %files -n python2-%{srcname} %license LICENSE.txt %doc README.rst docs @@ -221,14 +248,14 @@ py.test-%{python3_version} -m 'not network' %{_bindir}/pip-2 %{_bindir}/pip%{python2_version} %{_bindir}/pip-%{python2_version} -%{python_sitelib}/pip* -%{bashcompdir} -%if %{with python3} -%exclude %{bashcompdir}/pip3* -%endif +%{python2_sitelib}/pip* +%dir %{bashcompdir} +%{bashcompdir}/pip +%{bashcompdir}/pip2* %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif +%endif # with python2 %if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} @@ -247,6 +274,10 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 +- Switch macros to bcond's and make Python 2 optional to facilitate building + the Python 2 and Python 3 modules + * Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From d7cbed0aa453f656e79ec8d03fdd044a65964d1b Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 29 Aug 2017 16:12:19 +0200 Subject: [PATCH 071/287] Specify test dependencies in an if block --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 44e4dee..86f0c48 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -32,8 +32,10 @@ Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{sr BuildArch: noarch +%if %{with tests} BuildRequires: git BuildRequires: bzr +%endif # to get tests: # git clone https://github.com/pypa/pip && cd pip From a18983a006ec2f90473f45db4cb2bcb35cb9014b Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Wed, 30 Aug 2017 18:39:43 +0200 Subject: [PATCH 072/287] Fix python2-only dependencies --- python-pip.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 86f0c48..7662e3d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -253,7 +253,6 @@ py.test-%{python3_version} -m 'not network' %{python2_sitelib}/pip* %dir %{bashcompdir} %{bashcompdir}/pip -%{bashcompdir}/pip2* %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif From 2a788630f3847fd61d855d995dd48ba26326f59d Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 1 Sep 2017 16:28:36 +0200 Subject: [PATCH 073/287] Properly conditionalize bashcompdir contents --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 7662e3d..56edce1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,6 +15,8 @@ %endif %endif +# Note that with disabled python3, bashcomp2 will be disabled as well because +# bashcompdir will point to a different path than with python3 enabled. %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) %if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d" %global bashcomp2 1 @@ -254,6 +256,7 @@ py.test-%{python3_version} -m 'not network' %dir %{bashcompdir} %{bashcompdir}/pip %if 0%{?bashcomp2} +%{bashcompdir}/pip2* %dir %(dirname %{bashcompdir}) %endif %endif # with python2 From 5fc56f6e70bfd6e6f8a321dadb5b11d5b0fa34d0 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 20 Nov 2017 16:00:20 +0100 Subject: [PATCH 074/287] Add virtual provides for all the libraries that pip bundles. Remove ordereddict bundle as it is only required for python <=2.6. Remove ipaddress library from the python3 build as it only required on python2. Changed some dependency names from python-* to the python2-* namespace. Resolves: rhbz#1096912 --- python-pip.spec | 82 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 56edce1..965b908 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,8 +23,9 @@ %endif Name: python-%{srcname} +# When updating, update the bundled libraries versions bellow! Version: 9.0.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -67,21 +68,46 @@ Packages" or "Pip Installs Python". Summary: A tool for installing and managing Python 2 packages Group: Development/Libraries BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools %if %{with tests} -BuildRequires: python-mock -BuildRequires: pytest -BuildRequires: python-pretend -BuildRequires: python-freezegun -BuildRequires: python-pytest-capturelog -BuildRequires: python-scripttest -BuildRequires: python-virtualenv +BuildRequires: python2-mock +BuildRequires: python2-pytest +BuildRequires: python2-pretend +BuildRequires: python2-freezegun +BuildRequires: python2-pytest-capturelog +BuildRequires: python2-scripttest +BuildRequires: python2-virtualenv %endif %if %{without bootstrap} BuildRequires: python2-pip -BuildRequires: python-wheel +BuildRequires: python2-wheel %endif -Requires: python-setuptools +Requires: python2-setuptools + +# Virtual provides for the packages bundled by pip. +# You can find the versions in pip/_vendor/vendor.txt file. +# Don't forget to update this bellow for python3 as well. +Provides: bundled(python2dist(appdirs)) = 1.4.0 +Provides: bundled(python2dist(cachecontrol)) = 0.11.7 +Provides: bundled(python2dist(colorama)) = 0.3.7 +Provides: bundled(python2dist(distlib)) = 0.2.4 +Provides: bundled(python2dist(distro)) = 1.0.1 +Provides: bundled(python2dist(html5lib)) = 1.0b10 +Provides: bundled(python2dist(ipaddress) = 1.0.17 +Provides: bundled(python2dist(lockfile)) = 0.12.2 +Provides: bundled(python2dist(packaging)) = 16.8 +Provides: bundled(python2dist(setuptools)) = 28.8.0 +Provides: bundled(python2dist(progress)) = 1.2 +Provides: bundled(python2dist(pyparsing)) = 2.1.10 +Provides: bundled(python2dist(requests)) = 2.11.1 +Provides: bundled(python2dist(retrying)) = 1.3.3 +Provides: bundled(python2dist(six)) = 1.10.0 +Provides: bundled(python2dist(webencodings)) = 0.5 + +# Bundled within the requests bundle +Provides: bundled(python2dist(chardet)) = 2.3.0 +Provides: bundled(python2dist(urllib3)) = 1.16 + %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} @@ -115,6 +141,29 @@ BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %endif Requires: python%{python3_pkgversion}-setuptools + +# Virtual provides for the packages bundled by pip. +# See the python2 list above for instructions. +Provides: bundled(python3dist(appdirs)) = 1.4.0 +Provides: bundled(python3dist(cachecontrol)) = 0.11.7 +Provides: bundled(python3dist(colorama)) = 0.3.7 +Provides: bundled(python3dist(distlib)) = 0.2.4 +Provides: bundled(python3dist(distro)) = 1.0.1 +Provides: bundled(python3dist(html5lib)) = 1.0b10 +Provides: bundled(python3dist(lockfile)) = 0.12.2 +Provides: bundled(python3dist(packaging)) = 16.8 +Provides: bundled(python3dist(setuptools)) = 28.8.0 +Provides: bundled(python3dist(progress)) = 1.2 +Provides: bundled(python3dist(pyparsing)) = 2.1.10 +Provides: bundled(python3dist(requests)) = 2.11.1 +Provides: bundled(python3dist(retrying)) = 1.3.3 +Provides: bundled(python3dist(six)) = 1.10.0 +Provides: bundled(python3dist(webencodings)) = 0.5 + +# Bundled within the requests bundle +Provides: bundled(python3dist(chardet)) = 2.3.0 +Provides: bundled(python3dist(urllib3)) = 1.16 + %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} @@ -137,6 +186,9 @@ tar -xf %{SOURCE1} sed -i '1d' pip/__init__.py +# Remove ordereddict as it is only required for python <= 2.6 +rm pip/_vendor/ordereddict.py + %build %if %{with python2} @@ -169,6 +221,11 @@ sed -i '1d' pip/__init__.py rm %{buildroot}%{_bindir}/pip %endif # with python3 +# Remove the bundled ipaddress library from the python3 build +# as it is only required by the python2 one. +rm %{buildroot}%{python3_sitelib}/pip/_vendor/ipaddress.py +rm %{buildroot}%{python3_sitelib}/pip/_vendor/__pycache__/ipaddress.cpython-*.pyc + %if %{with python2} %if %{without bootstrap} %py2_install_wheel %{python2_wheelname} @@ -278,6 +335,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 +- Add virtual provides for the bundled libraries. (rhbz#1096912) + * Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 - Switch macros to bcond's and make Python 2 optional to facilitate building the Python 2 and Python 3 modules From dab969604360f2c783ad688bfcd568d3a7f99152 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 4 Dec 2017 15:53:44 +0100 Subject: [PATCH 075/287] Reintroduce the ipaddress module in the python3 subpackage as it is used within python3's upstream test suite. --- python-pip.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 965b908..cb73b02 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -25,7 +25,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -150,6 +150,7 @@ Provides: bundled(python3dist(colorama)) = 0.3.7 Provides: bundled(python3dist(distlib)) = 0.2.4 Provides: bundled(python3dist(distro)) = 1.0.1 Provides: bundled(python3dist(html5lib)) = 1.0b10 +Provides: bundled(python3dist(ipaddress) = 1.0.17 Provides: bundled(python3dist(lockfile)) = 0.12.2 Provides: bundled(python3dist(packaging)) = 16.8 Provides: bundled(python3dist(setuptools)) = 28.8.0 @@ -221,11 +222,6 @@ rm pip/_vendor/ordereddict.py rm %{buildroot}%{_bindir}/pip %endif # with python3 -# Remove the bundled ipaddress library from the python3 build -# as it is only required by the python2 one. -rm %{buildroot}%{python3_sitelib}/pip/_vendor/ipaddress.py -rm %{buildroot}%{python3_sitelib}/pip/_vendor/__pycache__/ipaddress.cpython-*.pyc - %if %{with python2} %if %{without bootstrap} %py2_install_wheel %{python2_wheelname} @@ -335,6 +331,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 +- Reintroduce the ipaddress module in the python3 subpackage. + * Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 - Add virtual provides for the bundled libraries. (rhbz#1096912) From 86e88e4c46b7ee4558908fcd787c2881e81b18dc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 09:48:53 +0000 Subject: [PATCH 076/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index cb73b02..a285828 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -25,7 +25,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -331,6 +331,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 - Reintroduce the ipaddress module in the python3 subpackage. From 2611854c44a4107a87b28b70a16f6a31da218a70 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Thu, 22 Feb 2018 10:27:43 +0100 Subject: [PATCH 077/287] Include built HTML documentation (in the new -docs subpackage) and man page --- python-pip.spec | 63 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a285828..3813d10 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,6 +3,11 @@ %bcond_without python2 %bcond_without python3 +%if %{without python3} +%bcond_with doc +%else +%bcond_without doc +%endif %global srcname pip %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl @@ -25,7 +30,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -173,10 +178,26 @@ written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". +%if %{with doc} +%package doc +Summary: A documentation for a tool for installing and managing Python packages + +BuildRequires: python%{python3_pkgversion}-sphinx + +%description doc +A documentation for a tool for installing and managing Python packages + +%endif + %endif # with python3 %prep +%if %{with doc} && %{without python3} +echo "This combination (with doc, without python3) is unsupported" +exit 1 +%endif + %setup -q -n %{srcname}-%{version} %if %{with tests} tar -xf %{SOURCE1} @@ -208,6 +229,14 @@ rm pip/_vendor/ordereddict.py %endif %endif # with python3 +%if %{with doc} +pushd docs +make html +make man +rm _build/html/.buildinfo +popd +%endif + %install %if %{with python3} @@ -222,6 +251,17 @@ rm pip/_vendor/ordereddict.py rm %{buildroot}%{_bindir}/pip %endif # with python3 +%if %{with doc} +install -d %{buildroot}%{_mandir}/man1 +%if %{with python2} +install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip.1 +install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip2.1 +%endif +%if %{with python3} +install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip3.1 +%endif +%endif # with doc + %if %{with python2} %if %{without bootstrap} %py2_install_wheel %{python2_wheelname} @@ -299,7 +339,11 @@ py.test-%{python3_version} -m 'not network' %if %{with python2} %files -n python2-%{srcname} %license LICENSE.txt -%doc README.rst docs +%doc README.rst +%if %{with doc} +%{_mandir}/man1/pip.* +%{_mandir}/man1/pip2.* +%endif %{_bindir}/pip %{_bindir}/pip2 %{_bindir}/pip-2 @@ -317,7 +361,10 @@ py.test-%{python3_version} -m 'not network' %if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt -%doc README.rst docs +%doc README.rst +%if %{with doc} +%{_mandir}/man1/pip3.* +%endif %{_bindir}/pip3 %{_bindir}/pip-3 %{_bindir}/pip%{python3_version} @@ -328,9 +375,19 @@ py.test-%{python3_version} -m 'not network' %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif + +%if %{with doc} +%files doc +%license LICENSE.txt +%doc README.rst +%doc docs/_build/html +%endif # with doc %endif # with python3 %changelog +* Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 +- Include built HTML documentation (in the new -doc subpackage) and man page + * Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 3989bcbcc0ed5b9ca236e6bafa553406b403de3c Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 29 Mar 2018 15:17:28 +0200 Subject: [PATCH 078/287] Update to 9.0.3 --- .gitignore | 2 ++ python-pip.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4844c76..5abdf9b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ pip-0.7.2.tar.gz /pip-8.1.2-tests.tar.gz /pip-9.0.1.tar.gz /pip-9.0.1-tests.tar.gz +/pip-9.0.3.tar.gz +/pip-9.0.3-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index 3813d10..104c575 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -29,8 +29,8 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! -Version: 9.0.1 -Release: 16%{?dist} +Version: 9.0.3 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -385,6 +385,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 +- Update to 9.0.3 + * Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 - Include built HTML documentation (in the new -doc subpackage) and man page diff --git a/sources b/sources index 31e725f..49c5067 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -35f01da33009719497f01a4ba69d63c9 pip-9.0.1.tar.gz -93ea1b8882c0e3e0e52d5034970d900f pip-9.0.1-tests.tar.gz +SHA512 (pip-9.0.3.tar.gz) = daf5bb2460787a0391400d5e074fc69c78d623445fcc6fcb12fae9a118f19692cc7ce316a7e85a04662bc82c0a0514577fa1ca8323b09be0d08c7a7bb8728e77 +SHA512 (pip-9.0.3-tests.tar.gz) = 5cc7c06b2c688307d2e081e01d750c1c462f34879ddffe204fa4523d4d4dc0afc9f584ff9bdc86768944bccd8bf79d93c87e9935b3a38e22aeb2fd839cce1447 From d02d7aa312dbccd9cc7b173f85f3f06c36a81501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 May 2018 12:11:26 +0200 Subject: [PATCH 079/287] Allow to import pip10's main from pip9's /usr/bin/pip Users are upgrading pip9 to pip10 by various manners, one of them is `pip install --user --upgrade pip`. If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. However that's the one from this RPM package (pip9) and the import in there fails (it tries to import from ~/.local, but pip10 is there with a bit different API). We add a patch as a dirty workaround to make /usr/bin/pip* work with both pip9 (from this RPM) and pip10 (from whatever). A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, however others are against that and we cannot change it for existing installs/user homes anyway. This is a workaround for: * https://bugzilla.redhat.com/show_bug.cgi?id=1569488 * https://bugzilla.redhat.com/show_bug.cgi?id=1571650 Patch is applied in %install, because /usr/bin/pip* are entrypoints. --- pip9-allow-pip10-import.patch | 16 ++++++++++++++++ python-pip.spec | 30 +++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pip9-allow-pip10-import.patch diff --git a/pip9-allow-pip10-import.patch b/pip9-allow-pip10-import.patch new file mode 100644 index 0000000..657b7b3 --- /dev/null +++ b/pip9-allow-pip10-import.patch @@ -0,0 +1,16 @@ +--- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200 ++++ pip3 2018-05-04 11:49:08.098821010 +0200 +@@ -4,7 +4,12 @@ + import re + import sys + +-from pip import main ++try: ++ from pip import main ++except ImportError: ++ # user has most probably upgraded pip in their home ++ # so let them run it anyway until ~/.local/bin makes it in front of the PATH ++ from pip._internal import main + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) diff --git a/python-pip.spec b/python-pip.spec index 104c575..791ccb7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -30,7 +30,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -61,6 +61,24 @@ Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch # Issue upstream: https://github.com/pypa/pip/issues/4288 Patch1: emit-a-warning-when-running-with-root-privileges.patch +# Downstream only patch +# Users are upgrading pip9 to pip10 by various manners, +# one of them is `pip install --user --upgrade pip`. +# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. +# However that's the one from this RPM package (pip9) and the import in there +# fails (it tries to import from ~/.local, but pip10 is there with a bit +# different API). +# We add this patch as a dirty workaround to make /usr/bin/pip* work with +# both pip9 (from this RPM) and pip10 (from whatever). +# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, +# however others are against that and we cannot change it for existing +# installs/user homes anyway. +# https://bugzilla.redhat.com/show_bug.cgi?id=1569488 +# https://bugzilla.redhat.com/show_bug.cgi?id=1571650 +# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! +# %%patch10 doesn't work outside of %%prep, so we add it as a source +Source10: pip9-allow-pip10-import.patch + %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -270,6 +288,11 @@ install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip3.1 %endif %endif # with python2 +# before we ln -s anything, we apply Source10 patch to all pips: +for PIP in %{buildroot}%{_bindir}/pip*; do + patch -p1 $PIP < %{SOURCE10} +done + mkdir -p %{buildroot}%{bashcompdir} %if %{with python2} PYTHONPATH=%{buildroot}%{python2_sitelib} \ @@ -385,6 +408,11 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Fri May 04 2018 Miro Hrončok - 9.0.3-2 +- Allow to import pip10's main from pip9's /usr/bin/pip +Resolves: rhbz#1569488 +Resolves: rhbz#1571650 + * Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 - Update to 9.0.3 From 4b288bd347a185e125ea890d1b6f9ca5378b5206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 May 2018 14:26:11 +0200 Subject: [PATCH 080/287] When pip is run outside of venv, don't show the upgrade warning This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1573755 1. We put "rpm" inside pip's INSTALLER instead of "pip" 2. From pip, we check what's in INSTALLER and only show the warning if it's "pip". When a venv is cearted, pip is installed from wheel (trough rewheel), INSTALLER contains "pip". When virtualenv is used, pip is installed from the Interwebz via pip, so INSTALLER contains "pip". Upstream issue https://github.com/pypa/pip/issues/5346 --- pip-nowarn-upgrade.patch | 36 ++++++++++++++++++++++++++++++++++++ python-pip.spec | 17 +++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 pip-nowarn-upgrade.patch diff --git a/pip-nowarn-upgrade.patch b/pip-nowarn-upgrade.patch new file mode 100644 index 0000000..9e314a5 --- /dev/null +++ b/pip-nowarn-upgrade.patch @@ -0,0 +1,36 @@ +diff --git a/pip/utils/outdated.py b/pip/utils/outdated.py +index 2164cc3..c71539f 100644 +--- a/pip/utils/outdated.py ++++ b/pip/utils/outdated.py +@@ -92,6 +92,21 @@ def load_selfcheck_statefile(): + return GlobalSelfCheckState() + + ++def pip_installed_by_pip(): ++ """Checks whether pip was installed by pip ++ ++ This is used not to display the upgrade message when pip is in fact ++ installed by system package manager, such as dnf on Fedora. ++ """ ++ import pkg_resources ++ try: ++ dist = pkg_resources.get_distribution('pip') ++ return (dist.has_metadata('INSTALLER') and ++ 'pip' in dist.get_metadata_lines('INSTALLER')) ++ except pkg_resources.DistributionNotFound: ++ return False ++ ++ + def pip_version_check(session): + """Check for an update for pip. + +@@ -141,7 +156,8 @@ def pip_version_check(session): + + # Determine if our pypi_version is older + if (pip_version < remote_version and +- pip_version.base_version != remote_version.base_version): ++ pip_version.base_version != remote_version.base_version and ++ pip_installed_by_pip()): + # Advise "python -m pip" on Windows to avoid issues + # with overwriting pip.exe. + if WINDOWS: diff --git a/python-pip.spec b/python-pip.spec index 791ccb7..cc65ebc 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -61,6 +61,11 @@ Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch # Issue upstream: https://github.com/pypa/pip/issues/4288 Patch1: emit-a-warning-when-running-with-root-privileges.patch + +# WIP upstream patch https://github.com/pypa/pip/issues/5346 +# https://bugzilla.redhat.com/show_bug.cgi?id=1573755 +Patch2: pip-nowarn-upgrade.patch + # Downstream only patch # Users are upgrading pip9 to pip10 by various manners, # one of them is `pip install --user --upgrade pip`. @@ -223,6 +228,7 @@ tar -xf %{SOURCE1} %patch0 -p1 %patch1 -p1 +%patch2 -p1 sed -i '1d' pip/__init__.py @@ -348,6 +354,15 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 %endif +# Make sure the INSTALLER is not pip, otherwise Patch2 won't work +# TODO Maybe we should make all our python packages have this? +%if %{with python2} +echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER +%endif +%if %{with python3} +echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER +%endif + %if %{with tests} %check %if %{with python2} @@ -410,8 +425,10 @@ py.test-%{python3_version} -m 'not network' %changelog * Fri May 04 2018 Miro Hrončok - 9.0.3-2 - Allow to import pip10's main from pip9's /usr/bin/pip +- Do not show the "new version of pip" warning outside of venv Resolves: rhbz#1569488 Resolves: rhbz#1571650 +Resolves: rhbz#1573755 * Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 - Update to 9.0.3 From 0318944ef97c83d7705575d6510f51f1c0460b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 12 May 2018 01:22:06 +0200 Subject: [PATCH 081/287] Only do 4b288bd when not bootstrapping --- python-pip.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index cc65ebc..bb3468e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -295,9 +295,13 @@ install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip3.1 %endif # with python2 # before we ln -s anything, we apply Source10 patch to all pips: +# we don't do this when bootstrapping because the entrypoints look different +# this is not worth dealing with because we'll rebuild once more anyway +%if %{without bootstrap} for PIP in %{buildroot}%{_bindir}/pip*; do patch -p1 $PIP < %{SOURCE10} done +%endif mkdir -p %{buildroot}%{bashcompdir} %if %{with python2} @@ -356,12 +360,14 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 # Make sure the INSTALLER is not pip, otherwise Patch2 won't work # TODO Maybe we should make all our python packages have this? +%if %{without bootstrap} %if %{with python2} echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER %endif %if %{with python3} echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER %endif +%endif %if %{with tests} %check From 1d697f0af5cd42826e9d3e198e3ab5bf8d054063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Jun 2018 18:34:34 +0200 Subject: [PATCH 082/287] Bootstrap for Python 3.7 --- python-pip.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index bb3468e..f91f216 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,6 @@ +%global _without_doc 1 +%global _without_tests 1 +%global _with_bootstrap 1 %bcond_with bootstrap %bcond_with tests @@ -30,7 +33,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -429,6 +432,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 +- Bootstrap for Python 3.7 + * Fri May 04 2018 Miro Hrončok - 9.0.3-2 - Allow to import pip10's main from pip9's /usr/bin/pip - Do not show the "new version of pip" warning outside of venv From cc52c4fc2d3db82b9f57d3f8c6ea6d91e0bd3621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Jun 2018 18:55:50 +0200 Subject: [PATCH 083/287] Bootstrap for Python 3.7 --- python-pip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f91f216..4d3afa7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,5 @@ %global _without_doc 1 %global _without_tests 1 -%global _with_bootstrap 1 %bcond_with bootstrap %bcond_with tests @@ -33,7 +32,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -432,6 +431,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 +- Bootstrap for Python 3.7 + * Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 - Bootstrap for Python 3.7 From 2b109131d3344ca10a20d17f3b6a69e8ed63c360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 18 Jun 2018 09:25:27 +0200 Subject: [PATCH 084/287] Rebuilt for Python 3.7 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4d3afa7..48541e7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 %bcond_with bootstrap %bcond_with tests @@ -32,7 +30,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -431,6 +429,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 +- Rebuilt for Python 3.7 + * Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 - Bootstrap for Python 3.7 From ffbc804f816b0cd4bb105e529cd50a3d7d89688e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 01:25:03 +0000 Subject: [PATCH 085/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 48541e7..03081d1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -30,7 +30,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -429,6 +429,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 - Rebuilt for Python 3.7 From 2e7f501aa12ebd86a3e16c01a7a680af7fdc8f8a Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Mon, 23 Jul 2018 17:22:50 +0200 Subject: [PATCH 086/287] Update to 18.0 --- .gitignore | 6 + ...given-prefix-from-wheel-RECORD-files.patch | 120 ++++++------ ...ng-when-running-with-root-privileges.patch | 41 ++-- html_theme_path.patch | 11 ++ ...rt.patch => pip-allow-older-versions.patch | 10 +- pip-nowarn-upgrade.patch | 36 ---- python-pip.spec | 180 +++++++++++------- sources | 6 +- 8 files changed, 213 insertions(+), 197 deletions(-) create mode 100644 html_theme_path.patch rename pip9-allow-pip10-import.patch => pip-allow-older-versions.patch (81%) delete mode 100644 pip-nowarn-upgrade.patch diff --git a/.gitignore b/.gitignore index 5abdf9b..6276f03 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,9 @@ pip-0.7.2.tar.gz /pip-9.0.1-tests.tar.gz /pip-9.0.3.tar.gz /pip-9.0.3-tests.tar.gz +/pip-10.0.1.tar.gz +/pip-18.0.tar.gz +/d2e63fbfc62af3b7050f619b2f5bb8658985b931.zip +/2018.2.tar.gz +/pip-18.0-tests.tar.gz +/d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index d66b250..00de3c5 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,10 +1,11 @@ -diff -up pip-9.0.1/pip/commands/install.py.orig pip-9.0.1/pip/commands/install.py ---- pip-9.0.1/pip/commands/install.py.orig 2016-11-06 11:49:45.000000000 -0700 -+++ pip-9.0.1/pip/commands/install.py 2016-11-16 16:20:48.638906543 -0700 -@@ -151,6 +151,14 @@ class InstallCommand(RequirementCommand) - "directory.") - - cmd_opts.add_option( +diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip/_internal/commands/install.py +--- pip-18.0/src/pip/_internal/commands/install.py 2018-07-20 06:10:48.000000000 +0200 ++++ pip-18.0_patched/src/pip/_internal/commands/install.py 2018-07-23 16:49:39.085357813 +0200 +@@ -110,6 +110,14 @@ + default=None, + help="Installation prefix where lib, bin and other top-level " + "folders are placed") ++ cmd_opts.add_option( + '--strip-file-prefix', + dest='strip_file_prefix', + metavar='prefix', @@ -12,84 +13,77 @@ diff -up pip-9.0.1/pip/commands/install.py.orig pip-9.0.1/pip/commands/install.p + help="Strip given prefix from script paths in wheel RECORD." + ) + -+ cmd_opts.add_option( - '--prefix', - dest='prefix_path', - metavar='dir', -@@ -340,6 +348,7 @@ class InstallCommand(RequirementCommand) - global_options, - root=options.root_path, - prefix=options.prefix_path, -+ strip_file_prefix=options.strip_file_prefix, - ) - possible_lib_locations = get_lib_location_guesses( -diff -up pip-9.0.1/pip/req/req_install.py.orig pip-9.0.1/pip/req/req_install.py ---- pip-9.0.1/pip/req/req_install.py.orig 2016-11-06 11:49:45.000000000 -0700 -+++ pip-9.0.1/pip/req/req_install.py 2016-11-16 16:19:24.848336960 -0700 -@@ -838,8 +838,7 @@ class InstallRequirement(object): - else: - return True + cmd_opts.add_option(cmdoptions.build_dir()) -- def install(self, install_options, global_options=[], root=None, -- prefix=None): -+ def install(self, install_options, global_options=[], root=None, prefix=None, strip_file_prefix=None): - if self.editable: - self.install_editable( - install_options, global_options, prefix=prefix) -@@ -848,7 +847,12 @@ class InstallRequirement(object): - version = pip.wheel.wheel_version(self.source_dir) - pip.wheel.check_compatibility(version, self.name) +@@ -345,6 +353,7 @@ + pycompile=options.compile, + warn_script_location=warn_script_location, + use_user_site=options.use_user_site, ++ strip_file_prefix=options.strip_file_prefix, + ) -- self.move_wheel_files(self.source_dir, root=root, prefix=prefix) -+ self.move_wheel_files( -+ self.source_dir, -+ root=root, -+ prefix=prefix, -+ strip_file_prefix=strip_file_prefix -+ ) - self.install_succeeded = True - return + lib_locations = get_lib_location_guesses( +diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/_internal/req/req_install.py +--- pip-18.0/src/pip/_internal/req/req_install.py 2018-07-22 07:14:20.000000000 +0200 ++++ pip-18.0_patched/src/pip/_internal/req/req_install.py 2018-07-23 16:51:51.115943214 +0200 +@@ -514,7 +514,7 @@ -@@ -1053,7 +1057,7 @@ class InstallRequirement(object): - def is_wheel(self): - return self.link and self.link.is_wheel - -- def move_wheel_files(self, wheeldir, root=None, prefix=None): -+ def move_wheel_files(self, wheeldir, root=None, prefix=None, strip_file_prefix=None): + def move_wheel_files(self, wheeldir, root=None, home=None, prefix=None, + warn_script_location=True, use_user_site=False, +- pycompile=True): ++ pycompile=True, strip_file_prefix=None): move_wheel_files( self.name, self.req, wheeldir, - user=self.use_user_site, -@@ -1062,6 +1066,7 @@ class InstallRequirement(object): - prefix=prefix, - pycompile=self.pycompile, + user=use_user_site, +@@ -524,6 +524,7 @@ + pycompile=pycompile, isolated=self.isolated, + warn_script_location=warn_script_location, + strip_file_prefix=strip_file_prefix, ) - def get_dist(self): -diff -up pip-9.0.1/pip/wheel.py.orig pip-9.0.1/pip/wheel.py ---- pip-9.0.1/pip/wheel.py.orig 2016-11-06 11:49:45.000000000 -0700 -+++ pip-9.0.1/pip/wheel.py 2016-11-16 16:19:24.848336960 -0700 -@@ -238,7 +238,7 @@ def get_entrypoints(filename): + # Things valid for sdists +@@ -924,7 +925,7 @@ + def install(self, install_options, global_options=None, root=None, + home=None, prefix=None, warn_script_location=True, +- use_user_site=False, pycompile=True): ++ use_user_site=False, pycompile=True, strip_file_prefix=None): + global_options = global_options if global_options is not None else [] + if self.editable: + self.install_editable( +@@ -939,6 +940,7 @@ + self.source_dir, root=root, prefix=prefix, home=home, + warn_script_location=warn_script_location, + use_user_site=use_user_site, pycompile=pycompile, ++ strip_file_prefix=strip_file_prefix, + ) + self.install_succeeded = True + return +diff -ru pip-18.0/src/pip/_internal/wheel.py pip-18.0_patched/src/pip/_internal/wheel.py +--- pip-18.0/src/pip/_internal/wheel.py 2018-07-17 10:26:00.000000000 +0200 ++++ pip-18.0_patched/src/pip/_internal/wheel.py 2018-07-23 16:52:57.749238655 +0200 +@@ -206,7 +206,7 @@ def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, -- pycompile=True, scheme=None, isolated=False, prefix=None): -+ pycompile=True, scheme=None, isolated=False, prefix=None, strip_file_prefix=None): + pycompile=True, scheme=None, isolated=False, prefix=None, +- warn_script_location=True): ++ warn_script_location=True, strip_file_prefix=None): """Install a wheel""" if not scheme: -@@ -521,7 +521,11 @@ if __name__ == '__main__': +@@ -507,7 +507,12 @@ writer.writerow(row) for f in generated: - h, l = rehash(f) -- writer.writerow((normpath(f, lib_dir), h, l)) + digest, length = rehash(f) +- writer.writerow((normpath(f, lib_dir), digest, length)) + final_path = normpath(f, lib_dir) + if strip_file_prefix and final_path.startswith(strip_file_prefix): + final_path = os.path.join(os.sep, + os.path.relpath(final_path, strip_file_prefix)) -+ writer.writerow((final_path, h, l)) ++ writer.writerow((final_path, digest, length)) ++ for f in installed: writer.writerow((installed[f], '', '')) shutil.move(temp_record, record) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 644fce9..3135fc3 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,27 +1,17 @@ -From 18a617e9e0f64b727938422d4f941dfddfbf5d00 Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Tue, 14 Feb 2017 17:10:09 +0100 -Subject: [PATCH] Emit a warning when running with root privileges. - ---- - pip/commands/install.py | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/pip/commands/install.py b/pip/commands/install.py -index 227c526..277a3d1 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -6,6 +6,8 @@ import os - import tempfile +diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip/_internal/commands/install.py +--- pip-18.0/src/pip/_internal/commands/install.py 2018-07-20 06:10:48.000000000 +0200 ++++ pip-18.0_patched/src/pip/_internal/commands/install.py 2018-07-31 12:15:43.777317780 +0200 +@@ -5,6 +5,8 @@ + import operator + import os import shutil - import warnings +import sys +from os import path - try: - import wheel - except ImportError: -@@ -193,6 +195,18 @@ class InstallCommand(RequirementCommand): - cmdoptions.resolve_wheel_no_use_binary(options) + from optparse import SUPPRESS_HELP + + from pip._vendor import pkg_resources +@@ -205,6 +207,18 @@ + def run(self, options, args): cmdoptions.check_install_build_global(options) + def is_venv(): @@ -36,9 +26,6 @@ index 227c526..277a3d1 100644 + % path.basename(sys.argv[0]) + ) + - if options.as_egg: - warnings.warn( - "--egg has been deprecated and will be removed in the future. " --- -2.11.0 - + upgrade_strategy = "to-satisfy-only" + if options.upgrade: + upgrade_strategy = options.upgrade_strategy diff --git a/html_theme_path.patch b/html_theme_path.patch new file mode 100644 index 0000000..f9b2100 --- /dev/null +++ b/html_theme_path.patch @@ -0,0 +1,11 @@ +diff -ru pip-10.0.1/docs/conf.py pip-10.0.1_patched/docs/conf.py +--- pip-10.0.1/docs/conf.py 2018-04-14 13:17:31.000000000 +0200 ++++ pip-10.0.1_patched/docs/conf.py 2018-07-23 15:23:31.053267611 +0200 +@@ -134,6 +134,7 @@ + # The theme to use for HTML and HTML Help pages. Major themes that come with + # Sphinx are currently 'default' and 'sphinxdoc'. + html_theme = "pypa_theme" ++html_theme_path = ["pypa", "python-docs-theme"] + + # Theme options are theme-specific and customize the look and feel of a theme + # further. For a list of options available for each theme, see the diff --git a/pip9-allow-pip10-import.patch b/pip-allow-older-versions.patch similarity index 81% rename from pip9-allow-pip10-import.patch rename to pip-allow-older-versions.patch index 657b7b3..39a272b 100644 --- a/pip9-allow-pip10-import.patch +++ b/pip-allow-older-versions.patch @@ -4,13 +4,13 @@ import re import sys --from pip import main +-from pip._internal import main +try: -+ from pip import main -+except ImportError: -+ # user has most probably upgraded pip in their home -+ # so let them run it anyway until ~/.local/bin makes it in front of the PATH + from pip._internal import main ++except ImportError: ++ # user has most probably downgraded pip in their home ++ # so let them run it anyway until ~/.local/bin makes it in front of the PATH ++ from pip import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) diff --git a/pip-nowarn-upgrade.patch b/pip-nowarn-upgrade.patch deleted file mode 100644 index 9e314a5..0000000 --- a/pip-nowarn-upgrade.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/pip/utils/outdated.py b/pip/utils/outdated.py -index 2164cc3..c71539f 100644 ---- a/pip/utils/outdated.py -+++ b/pip/utils/outdated.py -@@ -92,6 +92,21 @@ def load_selfcheck_statefile(): - return GlobalSelfCheckState() - - -+def pip_installed_by_pip(): -+ """Checks whether pip was installed by pip -+ -+ This is used not to display the upgrade message when pip is in fact -+ installed by system package manager, such as dnf on Fedora. -+ """ -+ import pkg_resources -+ try: -+ dist = pkg_resources.get_distribution('pip') -+ return (dist.has_metadata('INSTALLER') and -+ 'pip' in dist.get_metadata_lines('INSTALLER')) -+ except pkg_resources.DistributionNotFound: -+ return False -+ -+ - def pip_version_check(session): - """Check for an update for pip. - -@@ -141,7 +156,8 @@ def pip_version_check(session): - - # Determine if our pypi_version is older - if (pip_version < remote_version and -- pip_version.base_version != remote_version.base_version): -+ pip_version.base_version != remote_version.base_version and -+ pip_installed_by_pip()): - # Advise "python -m pip" on Windows to avoid issues - # with overwriting pip.exe. - if WINDOWS: diff --git a/python-pip.spec b/python-pip.spec index 03081d1..b4064d2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -19,6 +19,9 @@ %global python3_wheelname %python_wheelname %endif %endif +%if %{with doc} +%global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931 +%endif # Note that with disabled python3, bashcomp2 will be disabled as well because # bashcompdir will point to a different path than with python3 enabled. @@ -29,12 +32,38 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! -Version: 9.0.3 -Release: 6%{?dist} +Version: 18.0 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages - Group: Development/Libraries -License: MIT + +# We bundle a lot of libraries with pip, which itself is under MIT license. +# Here is the list of the libraries with corresponding licenses: + +# appdirs: MIT +# distlib: Python +# distro: ASL 2.0 +# html5lib: MIT +# six: MIT +# colorama: BSD +# CacheControl: ASL 2.0 +# msgpack-python: ASL 2.0 +# lockfile: MIT +# progress: ISC +# ipaddress: Python +# packaging: BSD or ASL 2.0 +# pyparsing: MIT +# pytoml: MIT +# retrying: ASL 2.0 +# requests: ASL 2.0 +# chardet: LGPLv2 +# idna: BSD +# urllib3: MIT +# certifi: MPLv2.0 +# setuptools: MIT +# webencodings: BSD + +License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and Unicode and (ASL 2.0 or BSD) URL: http://www.pip-installer.org Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz @@ -47,9 +76,15 @@ BuildRequires: bzr # to get tests: # git clone https://github.com/pypa/pip && cd pip -# git checkout 9.0.1 && tar -czvf ../pip-9.0.1-tests.tar.gz tests/ +# git checkout 18.0 && tar -czvf ../pip-18.0-tests.tar.gz tests/ %if %{with tests} -Source1: pip-9.0.1-tests.tar.gz +Source1: pip-18.0-tests.tar.gz +%endif + +# Themes required to build the docs. +%if %{with doc} +Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz +Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz %endif # Patch until the following issue gets implemented upstream: @@ -61,20 +96,18 @@ Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch # Issue upstream: https://github.com/pypa/pip/issues/4288 Patch1: emit-a-warning-when-running-with-root-privileges.patch - -# WIP upstream patch https://github.com/pypa/pip/issues/5346 -# https://bugzilla.redhat.com/show_bug.cgi?id=1573755 -Patch2: pip-nowarn-upgrade.patch +# Add path to the doc themes to conf.py +Patch2: html_theme_path.patch # Downstream only patch -# Users are upgrading pip9 to pip10 by various manners, -# one of them is `pip install --user --upgrade pip`. +# Users might have local installations of pip from using +# `pip install --user --upgrade pip` on older versions. # If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. -# However that's the one from this RPM package (pip9) and the import in there -# fails (it tries to import from ~/.local, but pip10 is there with a bit +# However that's the one from this RPM package (pip10+) and the import in there +# fails (it tries to import from ~/.local, but older pip is there with a bit # different API). # We add this patch as a dirty workaround to make /usr/bin/pip* work with -# both pip9 (from this RPM) and pip10 (from whatever). +# both pip10+ (from this RPM) and older pip (from whatever). # A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, # however others are against that and we cannot change it for existing # installs/user homes anyway. @@ -82,7 +115,7 @@ Patch2: pip-nowarn-upgrade.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1571650 # WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! # %%patch10 doesn't work outside of %%prep, so we add it as a source -Source10: pip9-allow-pip10-import.patch +Source10: pip-allow-older-versions.patch %description pip is a package management system used to install and manage software packages @@ -102,9 +135,9 @@ BuildRequires: python2-mock BuildRequires: python2-pytest BuildRequires: python2-pretend BuildRequires: python2-freezegun -BuildRequires: python2-pytest-capturelog BuildRequires: python2-scripttest BuildRequires: python2-virtualenv +BuildRequires: python2-pyyaml %endif %if %{without bootstrap} BuildRequires: python2-pip @@ -115,26 +148,28 @@ Requires: python2-setuptools # Virtual provides for the packages bundled by pip. # You can find the versions in pip/_vendor/vendor.txt file. # Don't forget to update this bellow for python3 as well. -Provides: bundled(python2dist(appdirs)) = 1.4.0 -Provides: bundled(python2dist(cachecontrol)) = 0.11.7 -Provides: bundled(python2dist(colorama)) = 0.3.7 -Provides: bundled(python2dist(distlib)) = 0.2.4 -Provides: bundled(python2dist(distro)) = 1.0.1 -Provides: bundled(python2dist(html5lib)) = 1.0b10 -Provides: bundled(python2dist(ipaddress) = 1.0.17 +Provides: bundled(python2dist(appdirs)) = 1.4.3 +Provides: bundled(python2dist(distlib)) = 0.2.7 +Provides: bundled(python2dist(distro)) = 1.3.0 +Provides: bundled(python2dist(html5lib)) = 1.0.1 +Provides: bundled(python2dist(six)) = 1.11.0 +Provides: bundled(python2dist(colorama)) = 0.3.9 +Provides: bundled(python2dist(CacheControl)) = 0.12.5 +Provides: bundled(python2dist(msgpack-python)) = 0.5.6 Provides: bundled(python2dist(lockfile)) = 0.12.2 -Provides: bundled(python2dist(packaging)) = 16.8 -Provides: bundled(python2dist(setuptools)) = 28.8.0 -Provides: bundled(python2dist(progress)) = 1.2 -Provides: bundled(python2dist(pyparsing)) = 2.1.10 -Provides: bundled(python2dist(requests)) = 2.11.1 +Provides: bundled(python2dist(progress)) = 1.4 +Provides: bundled(python2dist(ipaddress)) = 1.0.22 +Provides: bundled(python2dist(packaging)) = 17.1 +Provides: bundled(python2dist(pyparsing)) = 2.2.0 +Provides: bundled(python2dist(pytoml)) = 0.1.16 Provides: bundled(python2dist(retrying)) = 1.3.3 -Provides: bundled(python2dist(six)) = 1.10.0 -Provides: bundled(python2dist(webencodings)) = 0.5 - -# Bundled within the requests bundle -Provides: bundled(python2dist(chardet)) = 2.3.0 -Provides: bundled(python2dist(urllib3)) = 1.16 +Provides: bundled(python2dist(requests)) = 2.19.1 +Provides: bundled(python2dist(idna)) = 2.7 +Provides: bundled(python2dist(certifi)) = 2018.4.16 +Provides: bundled(python2dist(setuptools)) = 39.2.0 +Provides: bundled(python2dist(webencodings)) = 0.5.1 +Provides: bundled(python2dist(chardet)) = 3.0.4 +Provides: bundled(python2dist(urllib3)) = 1.23 %{?python_provide:%python_provide python2-%{srcname}} @@ -160,9 +195,9 @@ BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-freezegun -BuildRequires: python%{python3_pkgversion}-pytest-capturelog BuildRequires: python%{python3_pkgversion}-scripttest BuildRequires: python%{python3_pkgversion}-virtualenv +BuildRequires: python%{python3_pkgversion}-pyyaml %endif %if %{without bootstrap} BuildRequires: python%{python3_pkgversion}-pip @@ -172,26 +207,28 @@ Requires: python%{python3_pkgversion}-setuptools # Virtual provides for the packages bundled by pip. # See the python2 list above for instructions. -Provides: bundled(python3dist(appdirs)) = 1.4.0 -Provides: bundled(python3dist(cachecontrol)) = 0.11.7 -Provides: bundled(python3dist(colorama)) = 0.3.7 -Provides: bundled(python3dist(distlib)) = 0.2.4 -Provides: bundled(python3dist(distro)) = 1.0.1 -Provides: bundled(python3dist(html5lib)) = 1.0b10 -Provides: bundled(python3dist(ipaddress) = 1.0.17 +Provides: bundled(python3dist(appdirs)) = 1.4.3 +Provides: bundled(python3dist(distlib)) = 0.2.7 +Provides: bundled(python3dist(distro)) = 1.3.0 +Provides: bundled(python3dist(html5lib)) = 1.0.1 +Provides: bundled(python3dist(six)) = 1.11.0 +Provides: bundled(python3dist(colorama)) = 0.3.9 +Provides: bundled(python3dist(CacheControl)) = 0.12.5 +Provides: bundled(python3dist(msgpack-python)) = 0.5.6 Provides: bundled(python3dist(lockfile)) = 0.12.2 -Provides: bundled(python3dist(packaging)) = 16.8 -Provides: bundled(python3dist(setuptools)) = 28.8.0 -Provides: bundled(python3dist(progress)) = 1.2 -Provides: bundled(python3dist(pyparsing)) = 2.1.10 -Provides: bundled(python3dist(requests)) = 2.11.1 +Provides: bundled(python3dist(progress)) = 1.4 +Provides: bundled(python3dist(ipaddress)) = 1.0.22 +Provides: bundled(python3dist(packaging)) = 17.1 +Provides: bundled(python3dist(pyparsing)) = 2.2.0 +Provides: bundled(python3dist(pytoml)) = 0.1.16 Provides: bundled(python3dist(retrying)) = 1.3.3 -Provides: bundled(python3dist(six)) = 1.10.0 -Provides: bundled(python3dist(webencodings)) = 0.5 - -# Bundled within the requests bundle -Provides: bundled(python3dist(chardet)) = 2.3.0 -Provides: bundled(python3dist(urllib3)) = 1.16 +Provides: bundled(python3dist(requests)) = 2.19.1 +Provides: bundled(python3dist(idna)) = 2.7 +Provides: bundled(python3dist(certifi)) = 2018.4.16 +Provides: bundled(python3dist(setuptools)) = 39.2.0 +Provides: bundled(python3dist(webencodings)) = 0.5.1 +Provides: bundled(python3dist(urllib3)) = 1.23 +Provides: bundled(python3dist(chardet)) = 3.0.4 %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} @@ -225,16 +262,19 @@ exit 1 %if %{with tests} tar -xf %{SOURCE1} %endif +%if %{with doc} +pushd docs +tar -xf %{SOURCE2} +mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa +tar -xf %{SOURCE3} +mv python-docs-theme-2018.2 python-docs-theme +popd +%endif %patch0 -p1 %patch1 -p1 %patch2 -p1 -sed -i '1d' pip/__init__.py - -# Remove ordereddict as it is only required for python <= 2.6 -rm pip/_vendor/ordereddict.py - %build %if %{with python2} @@ -255,9 +295,10 @@ rm pip/_vendor/ordereddict.py %if %{with doc} pushd docs +export PYTHONPATH=../src/ make html make man -rm _build/html/.buildinfo +rm build/html/.buildinfo popd %endif @@ -276,14 +317,18 @@ rm %{buildroot}%{_bindir}/pip %endif # with python3 %if %{with doc} +pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 +for MAN in *1; do %if %{with python2} -install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip.1 -install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip2.1 +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2} %endif %if %{with python3} -install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/pip3.1 +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} %endif +done +popd %endif # with doc %if %{with python2} @@ -371,6 +416,7 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER %if %{with tests} %check +export PYTHONPATH=src %if %{with python2} py.test-%{python2_version} -m 'not network' %endif @@ -387,6 +433,8 @@ py.test-%{python3_version} -m 'not network' %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip2.* +%{_mandir}/man1/pip-* +%{_mandir}/man1/pip2-* %endif %{_bindir}/pip %{_bindir}/pip2 @@ -408,6 +456,7 @@ py.test-%{python3_version} -m 'not network' %doc README.rst %if %{with doc} %{_mandir}/man1/pip3.* +%{_mandir}/man1/pip3-* %endif %{_bindir}/pip3 %{_bindir}/pip-3 @@ -424,11 +473,14 @@ py.test-%{python3_version} -m 'not network' %files doc %license LICENSE.txt %doc README.rst -%doc docs/_build/html +%doc docs/build/html %endif # with doc %endif # with python3 %changelog +* Mon Jul 23 2018 Marcel Plch - 18.0-7 +- Update to 18.0 + * Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 49c5067..5bd9ed8 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ -SHA512 (pip-9.0.3.tar.gz) = daf5bb2460787a0391400d5e074fc69c78d623445fcc6fcb12fae9a118f19692cc7ce316a7e85a04662bc82c0a0514577fa1ca8323b09be0d08c7a7bb8728e77 -SHA512 (pip-9.0.3-tests.tar.gz) = 5cc7c06b2c688307d2e081e01d750c1c462f34879ddffe204fa4523d4d4dc0afc9f584ff9bdc86768944bccd8bf79d93c87e9935b3a38e22aeb2fd839cce1447 +SHA512 (pip-18.0.tar.gz) = 51b8708756a8cbe5ca284fa09908d4acf1127493e4b645f2756ae55e4afd5dec619a017cedb695a044aa24a377909810a1caea4242bb3dc475bfe3435fcaa1bc +SHA512 (pip-18.0-tests.tar.gz) = 1ce5bc8f64e6e55e30956f607e2e6b6f8bc16bb64c6715e28bebf22c17f1b85728db5c3f481fed223bd936a0ab7d0ea526417445cf33a80db6e9250cd2838975 +SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 +SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 710463c2475ffd70c44cfe9470b898cdacbd3e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 31 Jul 2018 15:48:01 +0200 Subject: [PATCH 087/287] Remove redundant "Unicode"" from License --- python-pip.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b4064d2..97db6bc 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -33,7 +33,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 18.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -51,7 +51,7 @@ Group: Development/Libraries # lockfile: MIT # progress: ISC # ipaddress: Python -# packaging: BSD or ASL 2.0 +# packaging: ASL 2.0 or BSD # pyparsing: MIT # pytoml: MIT # retrying: ASL 2.0 @@ -63,7 +63,7 @@ Group: Development/Libraries # setuptools: MIT # webencodings: BSD -License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and Unicode and (ASL 2.0 or BSD) +License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: http://www.pip-installer.org Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz @@ -478,6 +478,9 @@ py.test-%{python3_version} -m 'not network' %endif # with python3 %changelog +* Tue Jul 31 2018 Miro Hrončok - 18.0-2 +- Remove redundant "Unicode"" from License + * Mon Jul 23 2018 Marcel Plch - 18.0-7 - Update to 18.0 From 6186a480fa97e4e45c7a867db91886b94358b443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 8 Aug 2018 14:09:36 +0200 Subject: [PATCH 088/287] Create python-pip-wheel package with the wheel --- python-pip.spec | 121 ++++++++++++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 50 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 97db6bc..e4f6c1e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -11,6 +11,7 @@ %global srcname pip %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%global python_wheeldir %{_datadir}/python-wheels %if %{without bootstrap} %if %{with python2} %global python2_wheelname %python_wheelname @@ -33,7 +34,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 18.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -124,6 +125,35 @@ written in Python. Many packages can be found in the Python Package Index Packages" or "Pip Installs Python". + +# Virtual provides for the packages bundled by pip. +# You can find the versions in pip/_vendor/vendor.txt file. +%global bundled() %{expand: +Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 +Provides: bundled(python%{1}dist(distlib)) = 0.2.7 +Provides: bundled(python%{1}dist(distro)) = 1.3.0 +Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 +Provides: bundled(python%{1}dist(six)) = 1.11.0 +Provides: bundled(python%{1}dist(colorama)) = 0.3.9 +Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 +Provides: bundled(python%{1}dist(msgpack-python)) = 0.5.6 +Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 +Provides: bundled(python%{1}dist(progress)) = 1.4 +Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 +Provides: bundled(python%{1}dist(packaging)) = 17.1 +Provides: bundled(python%{1}dist(pyparsing)) = 2.2.0 +Provides: bundled(python%{1}dist(pytoml)) = 0.1.16 +Provides: bundled(python%{1}dist(retrying)) = 1.3.3 +Provides: bundled(python%{1}dist(requests)) = 2.19.1 +Provides: bundled(python%{1}dist(idna)) = 2.7 +Provides: bundled(python%{1}dist(certifi)) = 2018.4.16 +Provides: bundled(python%{1}dist(setuptools)) = 39.2.0 +Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 +Provides: bundled(python%{1}dist(chardet)) = 3.0.4 +Provides: bundled(python%{1}dist(urllib3)) = 1.23 +} + + %if %{with python2} %package -n python2-%{srcname} Summary: A tool for installing and managing Python 2 packages @@ -145,31 +175,8 @@ BuildRequires: python2-wheel %endif Requires: python2-setuptools -# Virtual provides for the packages bundled by pip. -# You can find the versions in pip/_vendor/vendor.txt file. -# Don't forget to update this bellow for python3 as well. -Provides: bundled(python2dist(appdirs)) = 1.4.3 -Provides: bundled(python2dist(distlib)) = 0.2.7 -Provides: bundled(python2dist(distro)) = 1.3.0 -Provides: bundled(python2dist(html5lib)) = 1.0.1 -Provides: bundled(python2dist(six)) = 1.11.0 -Provides: bundled(python2dist(colorama)) = 0.3.9 -Provides: bundled(python2dist(CacheControl)) = 0.12.5 -Provides: bundled(python2dist(msgpack-python)) = 0.5.6 -Provides: bundled(python2dist(lockfile)) = 0.12.2 -Provides: bundled(python2dist(progress)) = 1.4 -Provides: bundled(python2dist(ipaddress)) = 1.0.22 -Provides: bundled(python2dist(packaging)) = 17.1 -Provides: bundled(python2dist(pyparsing)) = 2.2.0 -Provides: bundled(python2dist(pytoml)) = 0.1.16 -Provides: bundled(python2dist(retrying)) = 1.3.3 -Provides: bundled(python2dist(requests)) = 2.19.1 -Provides: bundled(python2dist(idna)) = 2.7 -Provides: bundled(python2dist(certifi)) = 2018.4.16 -Provides: bundled(python2dist(setuptools)) = 39.2.0 -Provides: bundled(python2dist(webencodings)) = 0.5.1 -Provides: bundled(python2dist(chardet)) = 3.0.4 -Provides: bundled(python2dist(urllib3)) = 1.23 +# Virtual provides for the packages bundled by pip: +%{bundled 2} %{?python_provide:%python_provide python2-%{srcname}} @@ -205,30 +212,8 @@ BuildRequires: python%{python3_pkgversion}-wheel %endif Requires: python%{python3_pkgversion}-setuptools -# Virtual provides for the packages bundled by pip. -# See the python2 list above for instructions. -Provides: bundled(python3dist(appdirs)) = 1.4.3 -Provides: bundled(python3dist(distlib)) = 0.2.7 -Provides: bundled(python3dist(distro)) = 1.3.0 -Provides: bundled(python3dist(html5lib)) = 1.0.1 -Provides: bundled(python3dist(six)) = 1.11.0 -Provides: bundled(python3dist(colorama)) = 0.3.9 -Provides: bundled(python3dist(CacheControl)) = 0.12.5 -Provides: bundled(python3dist(msgpack-python)) = 0.5.6 -Provides: bundled(python3dist(lockfile)) = 0.12.2 -Provides: bundled(python3dist(progress)) = 1.4 -Provides: bundled(python3dist(ipaddress)) = 1.0.22 -Provides: bundled(python3dist(packaging)) = 17.1 -Provides: bundled(python3dist(pyparsing)) = 2.2.0 -Provides: bundled(python3dist(pytoml)) = 0.1.16 -Provides: bundled(python3dist(retrying)) = 1.3.3 -Provides: bundled(python3dist(requests)) = 2.19.1 -Provides: bundled(python3dist(idna)) = 2.7 -Provides: bundled(python3dist(certifi)) = 2018.4.16 -Provides: bundled(python3dist(setuptools)) = 39.2.0 -Provides: bundled(python3dist(webencodings)) = 0.5.1 -Provides: bundled(python3dist(urllib3)) = 1.23 -Provides: bundled(python3dist(chardet)) = 3.0.4 +# Virtual provides for the packages bundled by pip: +%{bundled 3} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} @@ -251,6 +236,17 @@ A documentation for a tool for installing and managing Python packages %endif # with python3 +%if %{without bootstrap} +%package wheel +Summary: The pip wheel + +# Virtual provides for the packages bundled by pip: +%{bundled 2} +%{bundled 3} + +%description wheel +A Python wheel of pip to use with venv. +%endif %prep %if %{with doc} && %{without python3} @@ -414,6 +410,16 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER %endif %endif +%if %{without bootstrap} +mkdir -p %{buildroot}%{python_wheeldir} +%if %{with python3} +install -p dist/%{python3_wheelname} -t %{buildroot}%{python_wheeldir} +%else +install -p dist/%{python2_wheelname} -t %{buildroot}%{python_wheeldir} +%endif +%endif + + %if %{with tests} %check export PYTHONPATH=src @@ -477,7 +483,22 @@ py.test-%{python3_version} -m 'not network' %endif # with doc %endif # with python3 +%if %{without bootstrap} +%files wheel +%license LICENSE.txt +# we own the dir for simplicity +%dir %{python_wheeldir}/ +%if %{with python3} +%{python_wheeldir}/%{python3_wheelname} +%else +%{python_wheeldir}/%{python2_wheelname} +%endif +%endif + %changelog +* Wed Aug 08 2018 Miro Hrončok - 18.0-3 +- Create python-pip-wheel package with the wheel + * Tue Jul 31 2018 Miro Hrončok - 18.0-2 - Remove redundant "Unicode"" from License From 3e1ef986b4d6354419711400e789b1de9fa0f2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 15 Aug 2018 14:45:08 +0200 Subject: [PATCH 089/287] No more with python3 There is no point of building this without python3 and this makes the spec a bit more readable. Also: - only have one %python_wheelname (can be split in future if needed) - use pythonX -m pytest instead of py.test-X.Y --- python-pip.spec | 65 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 55 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e4f6c1e..58bad01 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -2,24 +2,12 @@ %bcond_with tests %bcond_without python2 -%bcond_without python3 -%if %{without python3} -%bcond_with doc -%else %bcond_without doc -%endif %global srcname pip %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels -%if %{without bootstrap} -%if %{with python2} -%global python2_wheelname %python_wheelname -%endif -%if %{with python3} -%global python3_wheelname %python_wheelname -%endif -%endif + %if %{with doc} %global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931 %endif @@ -189,7 +177,6 @@ Packages" or "Pip Installs Python". %endif # with python2 -%if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries @@ -234,8 +221,6 @@ A documentation for a tool for installing and managing Python packages %endif -%endif # with python3 - %if %{without bootstrap} %package wheel Summary: The pip wheel @@ -249,11 +234,6 @@ A Python wheel of pip to use with venv. %endif %prep -%if %{with doc} && %{without python3} -echo "This combination (with doc, without python3) is unsupported" -exit 1 -%endif - %setup -q -n %{srcname}-%{version} %if %{with tests} tar -xf %{SOURCE1} @@ -281,13 +261,11 @@ popd %endif %endif # with python2 -%if %{with python3} %if %{without bootstrap} %py3_build_wheel %else %py3_build %endif -%endif # with python3 %if %{with doc} pushd docs @@ -300,9 +278,8 @@ popd %install -%if %{with python3} %if %{without bootstrap} -%py3_install_wheel %{python3_wheelname} +%py3_install_wheel %{python_wheelname} %else %py3_install %endif @@ -310,7 +287,6 @@ popd # TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to # (pip install wheel doesn't overwrite) rm %{buildroot}%{_bindir}/pip -%endif # with python3 %if %{with doc} pushd docs/build/man @@ -320,16 +296,14 @@ for MAN in *1; do install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2} %endif -%if %{with python3} install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} -%endif done popd %endif # with doc %if %{with python2} %if %{without bootstrap} -%py2_install_wheel %{python2_wheelname} +%py2_install_wheel %{python_wheelname} %else %py2_install %endif @@ -350,11 +324,9 @@ PYTHONPATH=%{buildroot}%{python2_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ > %{buildroot}%{bashcompdir}/pip %endif -%if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip3 completion --bash \ > %{buildroot}%{bashcompdir}/pip3 -%endif pips2=pip pips3=pip3 for pip in %{buildroot}%{_bindir}/pip*; do @@ -368,21 +340,18 @@ for pip in %{buildroot}%{_bindir}/pip*; do %endif ;; %endif -%if %{with python3} pip3?*) pips3="$pips3 $pip" %if 0%{?bashcomp2} ln -s pip3 %{buildroot}%{bashcompdir}/$pip %endif ;; -%endif esac done -%if %{with python3} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ %{buildroot}%{bashcompdir}/pip3 -%endif + %if %{with python2} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %{buildroot}%{bashcompdir}/pip @@ -393,10 +362,9 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ ln -s ./pip%{python2_version} %{buildroot}%{_bindir}/pip-%{python2_version} ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2 %endif -%if %{with python3} + ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -%endif # Make sure the INSTALLER is not pip, otherwise Patch2 won't work @@ -405,18 +373,13 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 %if %{with python2} echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER %endif -%if %{with python3} + echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER %endif -%endif %if %{without bootstrap} mkdir -p %{buildroot}%{python_wheeldir} -%if %{with python3} -install -p dist/%{python3_wheelname} -t %{buildroot}%{python_wheeldir} -%else -install -p dist/%{python2_wheelname} -t %{buildroot}%{python_wheeldir} -%endif +install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %endif @@ -424,11 +387,9 @@ install -p dist/%{python2_wheelname} -t %{buildroot}%{python_wheeldir} %check export PYTHONPATH=src %if %{with python2} -py.test-%{python2_version} -m 'not network' -%endif -%if %{with python3} -py.test-%{python3_version} -m 'not network' +%{__python2} -m pytest -m 'not network' %endif +%{__python3} -m pytest -m 'not network' %endif @@ -456,7 +417,6 @@ py.test-%{python3_version} -m 'not network' %endif %endif # with python2 -%if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst @@ -481,18 +441,13 @@ py.test-%{python3_version} -m 'not network' %doc README.rst %doc docs/build/html %endif # with doc -%endif # with python3 %if %{without bootstrap} %files wheel %license LICENSE.txt # we own the dir for simplicity %dir %{python_wheeldir}/ -%if %{with python3} -%{python_wheeldir}/%{python3_wheelname} -%else -%{python_wheeldir}/%{python2_wheelname} -%endif +%{python_wheeldir}/%{python_wheelname} %endif %changelog From 32a574d0df02378d015ab75f24462be7b118b6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 15 Aug 2018 15:27:19 +0200 Subject: [PATCH 090/287] Only build the wheel once --- python-pip.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 58bad01..933810f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -253,13 +253,9 @@ popd %build -%if %{with python2} -%if %{without bootstrap} -%py2_build_wheel -%else +%if %{with python2} && %{with bootstrap} %py2_build %endif -%endif # with python2 %if %{without bootstrap} %py3_build_wheel From ae152c5ccfadbcdd80ab7221e2340430a260cde9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 20 Jul 2018 14:20:47 +0200 Subject: [PATCH 091/287] Enable basic venv smoke test in the CI --- tests/tests.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/tests.yml diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..676a94f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,52 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/python.git" + dest: "python" + tests: + - smoke34: + dir: python/smoke + run: VERSION=3.4 ./venv.sh + - smoke35: + dir: python/smoke + run: VERSION=3.5 ./venv.sh + - smoke36: + dir: python/smoke + run: VERSION=3.6 ./venv.sh + - smoke37: + dir: python/smoke + run: VERSION=3.7 ./venv.sh + - smoke26: + dir: python/smoke + run: VERSION=2.6 METHOD=virtualenv TOX=false ./venv.sh + - smoke27: + dir: python/smoke + run: VERSION=2.7 METHOD=virtualenv ./venv.sh + - smoke34_virtualenv: + dir: python/smoke + run: VERSION=3.4 METHOD=virtualenv ./venv.sh + - smoke35_virtualenv: + dir: python/smoke + run: VERSION=3.5 METHOD=virtualenv ./venv.sh + - smoke36_virtualenv: + dir: python/smoke + run: VERSION=3.6 METHOD=virtualenv ./venv.sh + - smoke37_virtualenv: + dir: python/smoke + run: VERSION=3.7 METHOD=virtualenv ./venv.sh + required_packages: + - gcc + - /usr/bin/virtualenv + - python26 + - python27 + - python34 + - python35 + - python36 + - python37 + - python2-devel + - python3-devel + - python3-tox From 50d9d64d9673183c2d7a7274d42f35a46e39aa95 Mon Sep 17 00:00:00 2001 From: Michal Cyprian Date: Thu, 30 Aug 2018 15:27:55 +0200 Subject: [PATCH 092/287] Subject: Prevent removing of the system packages installed under /usr/lib when pip install -U is executed. Resolves: rhbz#1550368 --- python-pip.spec | 13 ++- ...existing-dist-only-if-path-conflicts.patch | 88 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 remove-existing-dist-only-if-path-conflicts.patch diff --git a/python-pip.spec b/python-pip.spec index 933810f..999afd2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 18.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -88,6 +88,11 @@ Patch1: emit-a-warning-when-running-with-root-privileges.patch # Add path to the doc themes to conf.py Patch2: html_theme_path.patch +# Prevent removing of the system packages installed under /usr/lib +# when pip install -U is executed. +# https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 +Patch3: remove-existing-dist-only-if-path-conflicts.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -250,6 +255,7 @@ popd %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -447,6 +453,11 @@ export PYTHONPATH=src %endif %changelog +* Tue Sep 18 2018 Victor Stinner - 18.0-4 +- Prevent removing of the system packages installed under /usr/lib + when pip install -U is executed. Original patch by Michal Cyprian. + Resolves: rhbz#1550368. + * Wed Aug 08 2018 Miro Hrončok - 18.0-3 - Create python-pip-wheel package with the wheel diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch new file mode 100644 index 0000000..85438de --- /dev/null +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -0,0 +1,88 @@ +commit b6d5da6796801862eb751a93d507c343af0604d6 +Author: Victor Stinner +Date: Tue Sep 18 17:13:51 2018 +0200 + + Subject: Prevent removing of the system packages installed under /usr/lib + + when pip install -U is executed. + + Resolves: rhbz#1550368 + + Co-Authored-By: Michal Cyprian + +diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py +index 8e91ecb..9beb100 100644 +--- a/src/pip/_internal/req/req_install.py ++++ b/src/pip/_internal/req/req_install.py +@@ -36,7 +36,7 @@ from pip._internal.utils.hashes import Hashes + from pip._internal.utils.logging import indent_log + from pip._internal.utils.misc import ( + _make_build_dir, ask_path_exists, backup_dir, call_subprocess, +- display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, ++ display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, + get_installed_version, is_installable_dir, read_text_file, rmtree, + ) + from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM +@@ -503,7 +503,7 @@ class InstallRequirement(object): + "lack sys.path precedence to %s in %s" % + (existing_dist.project_name, existing_dist.location) + ) +- else: ++ elif dist_in_install_path(existing_dist): + self.conflicts_with = existing_dist + return True + +diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/resolve.py +index 8480e48..b118098 100644 +--- a/src/pip/_internal/resolve.py ++++ b/src/pip/_internal/resolve.py +@@ -20,7 +20,7 @@ from pip._internal.exceptions import ( + ) + from pip._internal.req.req_install import InstallRequirement + from pip._internal.utils.logging import indent_log +-from pip._internal.utils.misc import dist_in_usersite, ensure_dir ++from pip._internal.utils.misc import dist_in_install_path, dist_in_usersite, ensure_dir + from pip._internal.utils.packaging import check_dist_requires_python + + logger = logging.getLogger(__name__) +@@ -123,7 +123,9 @@ class Resolver(object): + """ + # Don't uninstall the conflict if doing a user install and the + # conflict is not a user install. +- if not self.use_user_site or dist_in_usersite(req.satisfied_by): ++ if ((not self.use_user_site ++ or dist_in_usersite(req.satisfied_by)) ++ and dist_in_install_path(req.satisfied_by)): + req.conflicts_with = req.satisfied_by + req.satisfied_by = None + +diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py +index 3236af6..e60287b 100644 +--- a/src/pip/_internal/utils/misc.py ++++ b/src/pip/_internal/utils/misc.py +@@ -32,7 +32,7 @@ from pip._internal.compat import ( + from pip._internal.exceptions import CommandError, InstallationError + from pip._internal.locations import ( + running_under_virtualenv, site_packages, user_site, virtualenv_no_global, +- write_delete_marker_file, ++ write_delete_marker_file, distutils_scheme, + ) + + if PY2: +@@ -324,6 +324,16 @@ def dist_in_site_packages(dist): + ).startswith(normalize_path(site_packages)) + + ++def dist_in_install_path(dist): ++ """ ++ Return True if given Distribution is installed in ++ path matching distutils_scheme layout. ++ """ ++ norm_path = normalize_path(dist_location(dist)) ++ return norm_path.startswith(normalize_path( ++ distutils_scheme("")['purelib'].split('python')[0])) ++ ++ + def dist_is_editable(dist): + """Is distribution an editable install?""" + for path_item in sys.path: From 51d3b539d48ecc3f9484eecd7b35abb36d0eb1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 7 May 2018 13:25:45 +0200 Subject: [PATCH 093/287] Add a script that makes it easier to track bundled libs (uses pyp2rpm) --- python-pip.spec | 1 + vendor_meta.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 vendor_meta.sh diff --git a/python-pip.spec b/python-pip.spec index 999afd2..a6868e9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,6 +21,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! +# You can use vendor_meta.sh in the dist git repo Version: 18.0 Release: 4%{?dist} Summary: A tool for installing and managing Python packages diff --git a/vendor_meta.sh b/vendor_meta.sh new file mode 100755 index 0000000..3ae5204 --- /dev/null +++ b/vendor_meta.sh @@ -0,0 +1,21 @@ +#!/usr/bin/bash -eu + +if [ $# -ne 1 ]; then + echo "Usage: ./vendor_meta.sh pip-10.0.0/src/pip/_vendor/vendor.txt" + exit 1 +fi + +licenses='' + +while read req; do + req=$(echo $req | cut -f1 -d' ') + name=$(echo $req | cut -f1 -d'=') + version=$(echo $req | cut -f3 -d'=' | tr -d '\r') + echo "Provides: bundled(python%{1}dist($name)) = $version" + license="$(pyp2rpm -v ${version} --no-venv ${name} | grep '^License:' | sed -e 's/License:\s*//')" + licenses="$licenses\n$name: $license" +done < $1 + +echo +echo +echo -e "$licenses" From 82235d4efa4549d0e9e44d02a028e18b77c20829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 22 Nov 2018 13:26:40 +0100 Subject: [PATCH 094/287] Update to 18.1 (#1652089) --- .gitignore | 2 + ...given-prefix-from-wheel-RECORD-files.patch | 48 ++++++++++--------- ...ng-when-running-with-root-privileges.patch | 21 ++++---- html_theme_path.patch | 4 +- python-pip.spec | 48 +++++++++---------- ...existing-dist-only-if-path-conflicts.patch | 24 +++++----- sources | 4 +- 7 files changed, 78 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index 6276f03..9609481 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ pip-0.7.2.tar.gz /2018.2.tar.gz /pip-18.0-tests.tar.gz /d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz +/pip-18.1.tar.gz +/pip-18.1-tests.tar.gz diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index 00de3c5..182f0d9 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,7 +1,8 @@ -diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip/_internal/commands/install.py ---- pip-18.0/src/pip/_internal/commands/install.py 2018-07-20 06:10:48.000000000 +0200 -+++ pip-18.0_patched/src/pip/_internal/commands/install.py 2018-07-23 16:49:39.085357813 +0200 -@@ -110,6 +110,14 @@ +diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py +index 6fc178f..1279d4a 100644 +--- a/src/pip/_internal/commands/install.py ++++ b/src/pip/_internal/commands/install.py +@@ -115,6 +115,14 @@ class InstallCommand(RequirementCommand): default=None, help="Installation prefix where lib, bin and other top-level " "folders are placed") @@ -16,7 +17,7 @@ diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip cmd_opts.add_option(cmdoptions.build_dir()) -@@ -345,6 +353,7 @@ +@@ -364,6 +372,7 @@ class InstallCommand(RequirementCommand): pycompile=options.compile, warn_script_location=warn_script_location, use_user_site=options.use_user_site, @@ -24,10 +25,11 @@ diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip ) lib_locations = get_lib_location_guesses( -diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/_internal/req/req_install.py ---- pip-18.0/src/pip/_internal/req/req_install.py 2018-07-22 07:14:20.000000000 +0200 -+++ pip-18.0_patched/src/pip/_internal/req/req_install.py 2018-07-23 16:51:51.115943214 +0200 -@@ -514,7 +514,7 @@ +diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py +index c2624fe..922d10c 100644 +--- a/src/pip/_internal/req/req_install.py ++++ b/src/pip/_internal/req/req_install.py +@@ -370,7 +370,7 @@ class InstallRequirement(object): def move_wheel_files(self, wheeldir, root=None, home=None, prefix=None, warn_script_location=True, use_user_site=False, @@ -36,7 +38,7 @@ diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/ move_wheel_files( self.name, self.req, wheeldir, user=use_user_site, -@@ -524,6 +524,7 @@ +@@ -380,6 +380,7 @@ class InstallRequirement(object): pycompile=pycompile, isolated=self.isolated, warn_script_location=warn_script_location, @@ -44,7 +46,7 @@ diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/ ) # Things valid for sdists -@@ -924,7 +925,7 @@ +@@ -743,7 +744,7 @@ class InstallRequirement(object): def install(self, install_options, global_options=None, root=None, home=None, prefix=None, warn_script_location=True, @@ -53,7 +55,7 @@ diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/ global_options = global_options if global_options is not None else [] if self.editable: self.install_editable( -@@ -939,6 +940,7 @@ +@@ -758,6 +759,7 @@ class InstallRequirement(object): self.source_dir, root=root, prefix=prefix, home=home, warn_script_location=warn_script_location, use_user_site=use_user_site, pycompile=pycompile, @@ -61,10 +63,11 @@ diff -ru pip-18.0/src/pip/_internal/req/req_install.py pip-18.0_patched/src/pip/ ) self.install_succeeded = True return -diff -ru pip-18.0/src/pip/_internal/wheel.py pip-18.0_patched/src/pip/_internal/wheel.py ---- pip-18.0/src/pip/_internal/wheel.py 2018-07-17 10:26:00.000000000 +0200 -+++ pip-18.0_patched/src/pip/_internal/wheel.py 2018-07-23 16:52:57.749238655 +0200 -@@ -206,7 +206,7 @@ +diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py +index 5ce890e..c42d77a 100644 +--- a/src/pip/_internal/wheel.py ++++ b/src/pip/_internal/wheel.py +@@ -206,7 +206,7 @@ def message_about_scripts_not_on_PATH(scripts): def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, pycompile=True, scheme=None, isolated=False, prefix=None, @@ -73,17 +76,16 @@ diff -ru pip-18.0/src/pip/_internal/wheel.py pip-18.0_patched/src/pip/_internal/ """Install a wheel""" if not scheme: -@@ -507,7 +507,12 @@ - writer.writerow(row) +@@ -508,7 +508,11 @@ if __name__ == '__main__': + outrows.append(tuple(row)) for f in generated: digest, length = rehash(f) -- writer.writerow((normpath(f, lib_dir), digest, length)) +- outrows.append((normpath(f, lib_dir), digest, length)) + final_path = normpath(f, lib_dir) + if strip_file_prefix and final_path.startswith(strip_file_prefix): + final_path = os.path.join(os.sep, + os.path.relpath(final_path, strip_file_prefix)) -+ writer.writerow((final_path, digest, length)) -+ ++ outrows.append((final_path, digest, length)) for f in installed: - writer.writerow((installed[f], '', '')) - shutil.move(temp_record, record) + outrows.append((installed[f], '', '')) + for row in sorted(outrows): diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 3135fc3..5aa0b09 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,7 +1,8 @@ -diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip/_internal/commands/install.py ---- pip-18.0/src/pip/_internal/commands/install.py 2018-07-20 06:10:48.000000000 +0200 -+++ pip-18.0_patched/src/pip/_internal/commands/install.py 2018-07-31 12:15:43.777317780 +0200 -@@ -5,6 +5,8 @@ +diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py +index 1279d4a..aeb9d26 100644 +--- a/src/pip/_internal/commands/install.py ++++ b/src/pip/_internal/commands/install.py +@@ -5,6 +5,8 @@ import logging import operator import os import shutil @@ -10,20 +11,22 @@ diff -ru pip-18.0/src/pip/_internal/commands/install.py pip-18.0_patched/src/pip from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources -@@ -205,6 +207,18 @@ +@@ -217,6 +219,20 @@ class InstallCommand(RequirementCommand): + def run(self, options, args): cmdoptions.check_install_build_global(options) - ++ + def is_venv(): -+ return hasattr(sys, 'real_prefix') or \ -+ (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix) ++ return (hasattr(sys, 'real_prefix') or ++ (hasattr(sys, 'base_prefix') and ++ sys.base_prefix != sys.prefix)) + + # Check whether we have root privileges and aren't in venv/virtualenv + if os.getuid() == 0 and not is_venv(): + logger.warning( + "WARNING: Running pip install with root privileges is " + "generally not a good idea. Try `%s install --user` instead." -+ % path.basename(sys.argv[0]) ++ % path.basename(sys.argv[0]) + ) + upgrade_strategy = "to-satisfy-only" diff --git a/html_theme_path.patch b/html_theme_path.patch index f9b2100..4209471 100644 --- a/html_theme_path.patch +++ b/html_theme_path.patch @@ -1,6 +1,6 @@ diff -ru pip-10.0.1/docs/conf.py pip-10.0.1_patched/docs/conf.py ---- pip-10.0.1/docs/conf.py 2018-04-14 13:17:31.000000000 +0200 -+++ pip-10.0.1_patched/docs/conf.py 2018-07-23 15:23:31.053267611 +0200 +--- pip-10.0.1/docs/html/conf.py 2018-04-14 13:17:31.000000000 +0200 ++++ pip-10.0.1_patched/docs/html/conf.py 2018-07-23 15:23:31.053267611 +0200 @@ -134,6 +134,7 @@ # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. diff --git a/python-pip.spec b/python-pip.spec index a6868e9..cf4b6af 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,10 +22,9 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 18.0 -Release: 4%{?dist} +Version: 18.1 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages -Group: Development/Libraries # We bundle a lot of libraries with pip, which itself is under MIT license. # Here is the list of the libraries with corresponding licenses: @@ -42,6 +41,7 @@ Group: Development/Libraries # progress: ISC # ipaddress: Python # packaging: ASL 2.0 or BSD +# pep517: MIT # pyparsing: MIT # pytoml: MIT # retrying: ASL 2.0 @@ -55,7 +55,7 @@ Group: Development/Libraries License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: http://www.pip-installer.org -Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +Source0: %pypi_source BuildArch: noarch @@ -66,9 +66,9 @@ BuildRequires: bzr # to get tests: # git clone https://github.com/pypa/pip && cd pip -# git checkout 18.0 && tar -czvf ../pip-18.0-tests.tar.gz tests/ +# git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/ %if %{with tests} -Source1: pip-18.0-tests.tar.gz +Source1: pip-%{version}-tests.tar.gz %endif # Themes required to build the docs. @@ -134,24 +134,24 @@ Provides: bundled(python%{1}dist(msgpack-python)) = 0.5.6 Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 Provides: bundled(python%{1}dist(progress)) = 1.4 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 -Provides: bundled(python%{1}dist(packaging)) = 17.1 -Provides: bundled(python%{1}dist(pyparsing)) = 2.2.0 -Provides: bundled(python%{1}dist(pytoml)) = 0.1.16 +Provides: bundled(python%{1}dist(packaging)) = 18.0 +Provides: bundled(python%{1}dist(pep517)) = 0.2 +Provides: bundled(python%{1}dist(pyparsing)) = 2.2.1 +Provides: bundled(python%{1}dist(pytoml)) = 0.1.19 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 Provides: bundled(python%{1}dist(requests)) = 2.19.1 -Provides: bundled(python%{1}dist(idna)) = 2.7 -Provides: bundled(python%{1}dist(certifi)) = 2018.4.16 -Provides: bundled(python%{1}dist(setuptools)) = 39.2.0 -Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 +Provides: bundled(python%{1}dist(idna)) = 2.7 Provides: bundled(python%{1}dist(urllib3)) = 1.23 +Provides: bundled(python%{1}dist(certifi)) = 2018.8.24 +Provides: bundled(python%{1}dist(setuptools)) = 40.4.3 +Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } %if %{with python2} %package -n python2-%{srcname} Summary: A tool for installing and managing Python 2 packages -Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python2-setuptools %if %{with tests} @@ -185,7 +185,6 @@ Packages" or "Pip Installs Python". %package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages -Group: Development/Libraries BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools @@ -245,7 +244,7 @@ A Python wheel of pip to use with venv. tar -xf %{SOURCE1} %endif %if %{with doc} -pushd docs +pushd docs/html tar -xf %{SOURCE2} mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa tar -xf %{SOURCE3} @@ -271,12 +270,11 @@ popd %endif %if %{with doc} -pushd docs -export PYTHONPATH=../src/ -make html -make man -rm build/html/.buildinfo -popd +export PYTHONPATH=./src/ +# from tox.ini +sphinx-build-3 -b html docs/html docs/build/html +sphinx-build-3 -b man docs/man docs/build/man -c docs/html +rm docs/build/html/.buildinfo %endif @@ -403,8 +401,6 @@ export PYTHONPATH=src %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip2.* -%{_mandir}/man1/pip-* -%{_mandir}/man1/pip2-* %endif %{_bindir}/pip %{_bindir}/pip2 @@ -425,7 +421,6 @@ export PYTHONPATH=src %doc README.rst %if %{with doc} %{_mandir}/man1/pip3.* -%{_mandir}/man1/pip3-* %endif %{_bindir}/pip3 %{_bindir}/pip-3 @@ -454,6 +449,9 @@ export PYTHONPATH=src %endif %changelog +* Thu Nov 22 2018 Miro Hrončok - 18.1-1 +- Update to 18.1 (#1652089) + * Tue Sep 18 2018 Victor Stinner - 18.0-4 - Prevent removing of the system packages installed under /usr/lib when pip install -U is executed. Original patch by Michal Cyprian. diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 85438de..9f85444 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -11,19 +11,19 @@ Date: Tue Sep 18 17:13:51 2018 +0200 Co-Authored-By: Michal Cyprian diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 8e91ecb..9beb100 100644 +index 922d10c..6f73f33 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -36,7 +36,7 @@ from pip._internal.utils.hashes import Hashes +@@ -29,7 +29,7 @@ from pip._internal.utils.hashes import Hashes from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import ( _make_build_dir, ask_path_exists, backup_dir, call_subprocess, - display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, + display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, - get_installed_version, is_installable_dir, read_text_file, rmtree, + get_installed_version, rmtree, ) - from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM -@@ -503,7 +503,7 @@ class InstallRequirement(object): + from pip._internal.utils.packaging import get_metadata +@@ -359,7 +359,7 @@ class InstallRequirement(object): "lack sys.path precedence to %s in %s" % (existing_dist.project_name, existing_dist.location) ) @@ -33,12 +33,12 @@ index 8e91ecb..9beb100 100644 return True diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/resolve.py -index 8480e48..b118098 100644 +index 2d9f1c5..4ad9e77 100644 --- a/src/pip/_internal/resolve.py +++ b/src/pip/_internal/resolve.py @@ -20,7 +20,7 @@ from pip._internal.exceptions import ( ) - from pip._internal.req.req_install import InstallRequirement + from pip._internal.req.constructors import install_req_from_req from pip._internal.utils.logging import indent_log -from pip._internal.utils.misc import dist_in_usersite, ensure_dir +from pip._internal.utils.misc import dist_in_install_path, dist_in_usersite, ensure_dir @@ -57,19 +57,19 @@ index 8480e48..b118098 100644 req.satisfied_by = None diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 3236af6..e60287b 100644 +index 84a421f..c879a21 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -32,7 +32,7 @@ from pip._internal.compat import ( +@@ -29,7 +29,7 @@ from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._internal.exceptions import CommandError, InstallationError from pip._internal.locations import ( running_under_virtualenv, site_packages, user_site, virtualenv_no_global, - write_delete_marker_file, + write_delete_marker_file, distutils_scheme, ) - - if PY2: -@@ -324,6 +324,16 @@ def dist_in_site_packages(dist): + from pip._internal.utils.compat import ( + WINDOWS, console_to_str, expanduser, stdlib_pkgs, +@@ -328,6 +328,16 @@ def dist_in_site_packages(dist): ).startswith(normalize_path(site_packages)) diff --git a/sources b/sources index 5bd9ed8..d779adf 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-18.0.tar.gz) = 51b8708756a8cbe5ca284fa09908d4acf1127493e4b645f2756ae55e4afd5dec619a017cedb695a044aa24a377909810a1caea4242bb3dc475bfe3435fcaa1bc -SHA512 (pip-18.0-tests.tar.gz) = 1ce5bc8f64e6e55e30956f607e2e6b6f8bc16bb64c6715e28bebf22c17f1b85728db5c3f481fed223bd936a0ab7d0ea526417445cf33a80db6e9250cd2838975 +SHA512 (pip-18.1.tar.gz) = f13c129675f2de7f8bc10cfd0d49fc5c650cf59825282c3311c15841bca904604fe78a28d9b48f1c8fa4486826ac3d7d7362cec7a4631715b71b0928b48fff1d +SHA512 (pip-18.1-tests.tar.gz) = c1afa128e883c4bf1ebe1696c81e1bc2299010e43d6be01164359ee164b2b56c787b912d923b669b0ddc5efca77d7f7956f17737d1d378d8ba571695c09082d1 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From f3b44339dbae27138779d86fa624ff9c8282a53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 22 Nov 2018 17:34:07 +0100 Subject: [PATCH 095/287] Enable most of the tests in %check --- python-pip.spec | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index cf4b6af..63490df 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,5 @@ %bcond_with bootstrap -%bcond_with tests +%bcond_without tests %bcond_without python2 %bcond_without doc @@ -60,8 +60,9 @@ Source0: %pypi_source BuildArch: noarch %if %{with tests} -BuildRequires: git -BuildRequires: bzr +BuildRequires: /usr/bin/git +BuildRequires: /usr/bin/bzr +BuildRequires: /usr/bin/svn %endif # to get tests: @@ -387,10 +388,24 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %if %{with tests} %check export PYTHONPATH=src + +mkdir _bin +export PATH="$PWD/_bin:$PATH" + + +# bash completion tests only work from installed package +# test_yaml_based, test_uninstall_non_local_distutils, test_venv_modification, test_freeze_git_clone_srcdir are failing TODO investigate +# other deselected tests download setuptools and wheel from the interwebs and are not marked as network +%global pytest_k 'not completion and not test_pep518 and not test_install_with_target_and_scripts_no_warning and not test_install_incompatible_python_requires and not test_install_compatible_python_requires and not test_wheel_exit_status_code_when_no_requirements and not test_wheel_exit_status_code_when_blank_requirements_file and not test_constraints_local_editable_install_pep518 and not test_constraints_local_editable_install_pep518 and not test_wheel_exit_status_code_when_blank_requirements_file and not test_yaml_based and not test_uninstall_non_local_distutils and not test_venv_modification and not test_freeze_git_clone_srcdir and not test_upgrade_argparse_shadowed' + %if %{with python2} -%{__python2} -m pytest -m 'not network' +ln -s %{buildroot}%{_bindir}/pip2 _bin/pip +%{__python2} -m pytest -m 'not network' -k %{pytest_k} %endif -%{__python3} -m pytest -m 'not network' + + +ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip +%{__python3} -m pytest -m 'not network' -k %{pytest_k} %endif From 1d76c3e18215f4ff6dde54a6a6c90c3a26a4c6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 29 Nov 2018 14:55:24 +0100 Subject: [PATCH 096/287] Test if pipenv work (when updating pip) --- tests/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 676a94f..c7ab9b7 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -38,6 +38,8 @@ - smoke37_virtualenv: dir: python/smoke run: VERSION=3.7 METHOD=virtualenv ./venv.sh + - pipenv: + run: pipenv --three && pipenv install six required_packages: - gcc - /usr/bin/virtualenv @@ -50,3 +52,4 @@ - python2-devel - python3-devel - python3-tox + - pipenv From c75c71ee16cf8b7b19202c8ff32edb9999904a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 3 Dec 2018 16:46:56 +0100 Subject: [PATCH 097/287] Use the system level root certificate instead of the one bundled in certifi https://bugzilla.redhat.com/show_bug.cgi?id=1655253 --- dummy-certifi.patch | 15 +++++++++++++++ python-pip.spec | 19 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 dummy-certifi.patch diff --git a/dummy-certifi.patch b/dummy-certifi.patch new file mode 100644 index 0000000..1178c76 --- /dev/null +++ b/dummy-certifi.patch @@ -0,0 +1,15 @@ +diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py +index eab9d1d..30db215 100644 +--- a/src/pip/_vendor/certifi/core.py ++++ b/src/pip/_vendor/certifi/core.py +@@ -19,9 +19,7 @@ class DeprecatedBundleWarning(DeprecationWarning): + + + def where(): +- f = os.path.dirname(__file__) +- +- return os.path.join(f, 'cacert.pem') ++ return '/etc/pki/tls/certs/ca-bundle.crt' + + + def old_where(): diff --git a/python-pip.spec b/python-pip.spec index 63490df..ae600c0 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 18.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -95,6 +95,10 @@ Patch2: html_theme_path.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 Patch3: remove-existing-dist-only-if-path-conflicts.patch +# Use the system level root certificate instead of the one bundled in certifi +# https://bugzilla.redhat.com/show_bug.cgi?id=1655253 +Patch4: dummy-certifi.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -168,6 +172,8 @@ BuildRequires: python2-pyyaml BuildRequires: python2-pip BuildRequires: python2-wheel %endif +BuildRequires: ca-certificates +Requires: ca-certificates Requires: python2-setuptools # Virtual provides for the packages bundled by pip: @@ -203,6 +209,8 @@ BuildRequires: python%{python3_pkgversion}-pyyaml BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %endif +BuildRequires: ca-certificates +Requires: ca-certificates Requires: python%{python3_pkgversion}-setuptools # Virtual provides for the packages bundled by pip: @@ -230,6 +238,7 @@ A documentation for a tool for installing and managing Python packages %if %{without bootstrap} %package wheel Summary: The pip wheel +Requires: ca-certificates # Virtual provides for the packages bundled by pip: %{bundled 2} @@ -257,6 +266,11 @@ popd %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 + +# this goes together with patch4 +rm src/pip/_vendor/certifi/*.pem +sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt %build @@ -464,6 +478,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Mon Dec 03 2018 Miro Hrončok - 18.1-2 +- Use the system level root certificate instead of the one bundled in certifi + * Thu Nov 22 2018 Miro Hrončok - 18.1-1 - Update to 18.1 (#1652089) From 047f5659ab1a1d877e281cd6ed62395f5470d059 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 08:21:07 +0000 Subject: [PATCH 098/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index ae600c0..ba54991 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 18.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -478,6 +478,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Dec 03 2018 Miro Hrončok - 18.1-2 - Use the system level root certificate instead of the one bundled in certifi From 3af98288dfc2901a68f4477cd5dd19c9c94dc91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 9 Feb 2019 20:15:59 +0100 Subject: [PATCH 099/287] Test pip on Python 3.8 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index c7ab9b7..6e23a66 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -20,6 +20,9 @@ - smoke37: dir: python/smoke run: VERSION=3.7 ./venv.sh + - smoke38: + dir: python/smoke + run: VERSION=3.8 ./venv.sh - smoke26: dir: python/smoke run: VERSION=2.6 METHOD=virtualenv TOX=false ./venv.sh @@ -38,6 +41,9 @@ - smoke37_virtualenv: dir: python/smoke run: VERSION=3.7 METHOD=virtualenv ./venv.sh + - smoke38_virtualenv: + dir: python/smoke + run: VERSION=3.8 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six required_packages: @@ -49,6 +55,7 @@ - python35 - python36 - python37 + - python38 - python2-devel - python3-devel - python3-tox From bbe9e6d297c264f1049b0614fb174be0e6786359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Feb 2019 11:56:20 +0100 Subject: [PATCH 100/287] Update to 19.0.2 (#1668492) --- .gitignore | 2 + ...given-prefix-from-wheel-RECORD-files.patch | 107 +++++++++++------- dummy-certifi.patch | 6 +- python-pip.spec | 66 ++++++----- ...existing-dist-only-if-path-conflicts.patch | 24 ++-- sources | 4 +- 6 files changed, 122 insertions(+), 87 deletions(-) diff --git a/.gitignore b/.gitignore index 9609481..5469d53 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ pip-0.7.2.tar.gz /d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz /pip-18.1.tar.gz /pip-18.1-tests.tar.gz +/pip-19.0.2.tar.gz +/pip-19.0.2-tests.tar.gz diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index 182f0d9..36ff810 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,8 +1,8 @@ diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 6fc178f..1279d4a 100644 +index 1c244d2..4b07ec0 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py -@@ -115,6 +115,14 @@ class InstallCommand(RequirementCommand): +@@ -109,6 +109,14 @@ class InstallCommand(RequirementCommand): default=None, help="Installation prefix where lib, bin and other top-level " "folders are placed") @@ -17,7 +17,7 @@ index 6fc178f..1279d4a 100644 cmd_opts.add_option(cmdoptions.build_dir()) -@@ -364,6 +372,7 @@ class InstallCommand(RequirementCommand): +@@ -391,6 +399,7 @@ class InstallCommand(RequirementCommand): pycompile=options.compile, warn_script_location=warn_script_location, use_user_site=options.use_user_site, @@ -26,19 +26,20 @@ index 6fc178f..1279d4a 100644 lib_locations = get_lib_location_guesses( diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index c2624fe..922d10c 100644 +index a4834b0..d21530a 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -370,7 +370,7 @@ class InstallRequirement(object): - - def move_wheel_files(self, wheeldir, root=None, home=None, prefix=None, - warn_script_location=True, use_user_site=False, -- pycompile=True): -+ pycompile=True, strip_file_prefix=None): +@@ -431,7 +431,8 @@ class InstallRequirement(object): + prefix=None, # type: Optional[str] + warn_script_location=True, # type: bool + use_user_site=False, # type: bool +- pycompile=True # type: bool ++ pycompile=True, # type: bool ++ strip_file_prefix=None # type: Optional[str] + ): + # type: (...) -> None move_wheel_files( - self.name, self.req, wheeldir, - user=use_user_site, -@@ -380,6 +380,7 @@ class InstallRequirement(object): +@@ -443,6 +444,7 @@ class InstallRequirement(object): pycompile=pycompile, isolated=self.isolated, warn_script_location=warn_script_location, @@ -46,16 +47,17 @@ index c2624fe..922d10c 100644 ) # Things valid for sdists -@@ -743,7 +744,7 @@ class InstallRequirement(object): - - def install(self, install_options, global_options=None, root=None, - home=None, prefix=None, warn_script_location=True, -- use_user_site=False, pycompile=True): -+ use_user_site=False, pycompile=True, strip_file_prefix=None): +@@ -894,7 +896,8 @@ class InstallRequirement(object): + prefix=None, # type: Optional[str] + warn_script_location=True, # type: bool + use_user_site=False, # type: bool +- pycompile=True # type: bool ++ pycompile=True, # type: bool ++ strip_file_prefix=None # type: Optional[str] + ): + # type: (...) -> None global_options = global_options if global_options is not None else [] - if self.editable: - self.install_editable( -@@ -758,6 +759,7 @@ class InstallRequirement(object): +@@ -911,6 +914,7 @@ class InstallRequirement(object): self.source_dir, root=root, prefix=prefix, home=home, warn_script_location=warn_script_location, use_user_site=use_user_site, pycompile=pycompile, @@ -64,28 +66,45 @@ index c2624fe..922d10c 100644 self.install_succeeded = True return diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py -index 5ce890e..c42d77a 100644 +index 700b180..3655bd4 100644 --- a/src/pip/_internal/wheel.py +++ b/src/pip/_internal/wheel.py -@@ -206,7 +206,7 @@ def message_about_scripts_not_on_PATH(scripts): - - def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, - pycompile=True, scheme=None, isolated=False, prefix=None, -- warn_script_location=True): -+ warn_script_location=True, strip_file_prefix=None): +@@ -265,6 +265,7 @@ def get_csv_rows_for_installed( + changed, # type: set + generated, # type: List[str] + lib_dir, # type: str ++ strip_file_prefix=None, # type: Optional[str] + ): + # type: (...) -> List[InstalledCSVRow] + installed_rows = [] # type: List[InstalledCSVRow] +@@ -282,7 +283,11 @@ def get_csv_rows_for_installed( + installed_rows.append(tuple(row)) + for f in generated: + digest, length = rehash(f) +- installed_rows.append((normpath(f, lib_dir), digest, str(length))) ++ final_path = normpath(f, lib_dir) ++ if strip_file_prefix and final_path.startswith(strip_file_prefix): ++ final_path = os.path.join(os.sep, ++ os.path.relpath(final_path, strip_file_prefix)) ++ installed_rows.append((final_path, digest, str(length))) + for f in installed: + installed_rows.append((installed[f], '', '')) + return installed_rows +@@ -299,7 +304,8 @@ def move_wheel_files( + scheme=None, # type: Optional[Mapping[str, str]] + isolated=False, # type: bool + prefix=None, # type: Optional[str] +- warn_script_location=True # type: bool ++ warn_script_location=True, # type: bool ++ strip_file_prefix=None # type: Optional[str] + ): + # type: (...) -> None """Install a wheel""" - - if not scheme: -@@ -508,7 +508,11 @@ if __name__ == '__main__': - outrows.append(tuple(row)) - for f in generated: - digest, length = rehash(f) -- outrows.append((normpath(f, lib_dir), digest, length)) -+ final_path = normpath(f, lib_dir) -+ if strip_file_prefix and final_path.startswith(strip_file_prefix): -+ final_path = os.path.join(os.sep, -+ os.path.relpath(final_path, strip_file_prefix)) -+ outrows.append((final_path, digest, length)) - for f in installed: - outrows.append((installed[f], '', '')) - for row in sorted(outrows): +@@ -598,6 +604,7 @@ if __name__ == '__main__': + outrows = get_csv_rows_for_installed( + reader, installed=installed, changed=changed, + generated=generated, lib_dir=lib_dir, ++ strip_file_prefix=strip_file_prefix + ) + writer = csv.writer(record_out) + # Sort to simplify testing. diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 1178c76..a9e5840 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,8 +1,8 @@ diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index eab9d1d..30db215 100644 +index 2d02ea4..b1e4975 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -19,9 +19,7 @@ class DeprecatedBundleWarning(DeprecationWarning): +@@ -11,9 +11,7 @@ import os def where(): @@ -12,4 +12,4 @@ index eab9d1d..30db215 100644 + return '/etc/pki/tls/certs/ca-bundle.crt' - def old_where(): + if __name__ == '__main__': diff --git a/python-pip.spec b/python-pip.spec index ba54991..f008664 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,8 +22,8 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 18.1 -Release: 3%{?dist} +Version: 19.0.2 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -63,6 +63,8 @@ BuildArch: noarch BuildRequires: /usr/bin/git BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/svn +BuildRequires: python-setuptools-wheel +BuildRequires: python-wheel-wheel %endif # to get tests: @@ -129,27 +131,27 @@ Packages" or "Pip Installs Python". # You can find the versions in pip/_vendor/vendor.txt file. %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 -Provides: bundled(python%{1}dist(distlib)) = 0.2.7 +Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 +Provides: bundled(python%{1}dist(certifi)) = 2018.11.29 +Provides: bundled(python%{1}dist(chardet)) = 3.0.4 +Provides: bundled(python%{1}dist(colorama)) = 0.4.1 +Provides: bundled(python%{1}dist(distlib)) = 0.2.8 Provides: bundled(python%{1}dist(distro)) = 1.3.0 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 -Provides: bundled(python%{1}dist(six)) = 1.11.0 -Provides: bundled(python%{1}dist(colorama)) = 0.3.9 -Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 -Provides: bundled(python%{1}dist(msgpack-python)) = 0.5.6 -Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 -Provides: bundled(python%{1}dist(progress)) = 1.4 +Provides: bundled(python%{1}dist(idna)) = 2.8 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 -Provides: bundled(python%{1}dist(packaging)) = 18.0 -Provides: bundled(python%{1}dist(pep517)) = 0.2 -Provides: bundled(python%{1}dist(pyparsing)) = 2.2.1 -Provides: bundled(python%{1}dist(pytoml)) = 0.1.19 +Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 +Provides: bundled(python%{1}dist(msgpack)) = 0.5.6 +Provides: bundled(python%{1}dist(packaging)) = 19.0 +Provides: bundled(python%{1}dist(pep517)) = 0.5.0 +Provides: bundled(python%{1}dist(progress)) = 1.4 +Provides: bundled(python%{1}dist(pyparsing)) = 2.3.1 +Provides: bundled(python%{1}dist(pytoml)) = 0.1.20 +Provides: bundled(python%{1}dist(requests)) = 2.21.0 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 -Provides: bundled(python%{1}dist(requests)) = 2.19.1 -Provides: bundled(python%{1}dist(chardet)) = 3.0.4 -Provides: bundled(python%{1}dist(idna)) = 2.7 -Provides: bundled(python%{1}dist(urllib3)) = 1.23 -Provides: bundled(python%{1}dist(certifi)) = 2018.8.24 -Provides: bundled(python%{1}dist(setuptools)) = 40.4.3 +Provides: bundled(python%{1}dist(setuptools)) = 40.6.3 +Provides: bundled(python%{1}dist(six)) = 1.12.0 +Provides: bundled(python%{1}dist(urllib3)) = 1.24.1 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -272,6 +274,11 @@ popd rm src/pip/_vendor/certifi/*.pem sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt +%if %{with tests} +# tests expect wheels in here +ln -s %{python_wheeldir} tests/data/common_wheels +%endif + %build %if %{with python2} && %{with bootstrap} @@ -401,23 +408,27 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %if %{with tests} %check -export PYTHONPATH=src +# bash completion tests only work from installed package +# needs network https://github.com/pypa/pip/pull/6263 +# test_constraints_local_editable_install_pep518 +# test_pep517_wheels_are_not_confused_with_other_files +# test_upgrade_argparse_shadowed +# TODO investigate failures +# test_uninstall_non_local_distutils +# test_venv_modification +%global pytest_k 'not completion and not test_constraints_local_editable_install_pep518 and not test_pep517_wheels_are_not_confused_with_other_files and not test_upgrade_argparse_shadowed and not test_uninstall_non_local_distutils and not test_venv_modification' mkdir _bin export PATH="$PWD/_bin:$PATH" - -# bash completion tests only work from installed package -# test_yaml_based, test_uninstall_non_local_distutils, test_venv_modification, test_freeze_git_clone_srcdir are failing TODO investigate -# other deselected tests download setuptools and wheel from the interwebs and are not marked as network -%global pytest_k 'not completion and not test_pep518 and not test_install_with_target_and_scripts_no_warning and not test_install_incompatible_python_requires and not test_install_compatible_python_requires and not test_wheel_exit_status_code_when_no_requirements and not test_wheel_exit_status_code_when_blank_requirements_file and not test_constraints_local_editable_install_pep518 and not test_constraints_local_editable_install_pep518 and not test_wheel_exit_status_code_when_blank_requirements_file and not test_yaml_based and not test_uninstall_non_local_distutils and not test_venv_modification and not test_freeze_git_clone_srcdir and not test_upgrade_argparse_shadowed' - %if %{with python2} +export PYTHONPATH=%{buildroot}%{python2_sitelib} ln -s %{buildroot}%{_bindir}/pip2 _bin/pip %{__python2} -m pytest -m 'not network' -k %{pytest_k} %endif +export PYTHONPATH=%{buildroot}%{python3_sitelib} ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{__python3} -m pytest -m 'not network' -k %{pytest_k} %endif @@ -478,6 +489,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 +- Update to 19.0.2 (#1668492) + * Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 9f85444..e8fbe93 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -11,7 +11,7 @@ Date: Tue Sep 18 17:13:51 2018 +0200 Co-Authored-By: Michal Cyprian diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 922d10c..6f73f33 100644 +index d21530a..0023a35 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -29,7 +29,7 @@ from pip._internal.utils.hashes import Hashes @@ -20,10 +20,10 @@ index 922d10c..6f73f33 100644 _make_build_dir, ask_path_exists, backup_dir, call_subprocess, - display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, + display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, - get_installed_version, rmtree, + get_installed_version, redact_password_from_url, rmtree, ) from pip._internal.utils.packaging import get_metadata -@@ -359,7 +359,7 @@ class InstallRequirement(object): +@@ -411,7 +411,7 @@ class InstallRequirement(object): "lack sys.path precedence to %s in %s" % (existing_dist.project_name, existing_dist.location) ) @@ -33,19 +33,19 @@ index 922d10c..6f73f33 100644 return True diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/resolve.py -index 2d9f1c5..4ad9e77 100644 +index 33f572f..88b68e1 100644 --- a/src/pip/_internal/resolve.py +++ b/src/pip/_internal/resolve.py @@ -20,7 +20,7 @@ from pip._internal.exceptions import ( ) - from pip._internal.req.constructors import install_req_from_req + from pip._internal.req.constructors import install_req_from_req_string from pip._internal.utils.logging import indent_log -from pip._internal.utils.misc import dist_in_usersite, ensure_dir +from pip._internal.utils.misc import dist_in_install_path, dist_in_usersite, ensure_dir from pip._internal.utils.packaging import check_dist_requires_python + from pip._internal.utils.typing import MYPY_CHECK_RUNNING - logger = logging.getLogger(__name__) -@@ -123,7 +123,9 @@ class Resolver(object): +@@ -154,7 +154,9 @@ class Resolver(object): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -57,10 +57,10 @@ index 2d9f1c5..4ad9e77 100644 req.satisfied_by = None diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 84a421f..c879a21 100644 +index 84605ee..0e4ba93 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -29,7 +29,7 @@ from pip._vendor.six.moves.urllib import parse as urllib_parse +@@ -30,7 +30,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote from pip._internal.exceptions import CommandError, InstallationError from pip._internal.locations import ( running_under_virtualenv, site_packages, user_site, virtualenv_no_global, @@ -69,7 +69,7 @@ index 84a421f..c879a21 100644 ) from pip._internal.utils.compat import ( WINDOWS, console_to_str, expanduser, stdlib_pkgs, -@@ -328,6 +328,16 @@ def dist_in_site_packages(dist): +@@ -355,6 +355,16 @@ def dist_in_site_packages(dist): ).startswith(normalize_path(site_packages)) @@ -84,5 +84,5 @@ index 84a421f..c879a21 100644 + + def dist_is_editable(dist): - """Is distribution an editable install?""" - for path_item in sys.path: + # type: (Distribution) -> bool + """ diff --git a/sources b/sources index d779adf..23db2b5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-18.1.tar.gz) = f13c129675f2de7f8bc10cfd0d49fc5c650cf59825282c3311c15841bca904604fe78a28d9b48f1c8fa4486826ac3d7d7362cec7a4631715b71b0928b48fff1d -SHA512 (pip-18.1-tests.tar.gz) = c1afa128e883c4bf1ebe1696c81e1bc2299010e43d6be01164359ee164b2b56c787b912d923b669b0ddc5efca77d7f7956f17737d1d378d8ba571695c09082d1 +SHA512 (pip-19.0.2.tar.gz) = c6e13da3a57462371d32982c80575c5181592f5c6a8e70d60ec879e689442f4ad468e7aef97eb58c9da50a5a770385aa35e701eefd713a8e9fafeb12e11d956b +SHA512 (pip-19.0.2-tests.tar.gz) = 069464b9a99d487e6eaca9cc77e012f6850da81395191eeffd33b007f6de248e14db6c6105f643d7afa0737f4f00e48e183cae6b3f931a1b9e2cb3e2c57b7fb6 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 038fce3b5d5f6417b6263b90985335faa5a87521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 28 Feb 2019 11:46:10 +0100 Subject: [PATCH 101/287] FTBFS fix: Avoid creating .orig files in /usr/bin --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index f008664..ab13f0f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -337,7 +337,7 @@ popd # this is not worth dealing with because we'll rebuild once more anyway %if %{without bootstrap} for PIP in %{buildroot}%{_bindir}/pip*; do - patch -p1 $PIP < %{SOURCE10} + patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} done %endif From 85a78b8c133174cb0e96bd04b5f55c68e564e6ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 1 Mar 2019 11:15:05 +0100 Subject: [PATCH 102/287] Fedora CI: Workaround for fedora-ci/general #31 https://pagure.io/fedora-ci/general/issue/31 --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 6e23a66..a98b11e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -48,7 +48,7 @@ run: pipenv --three && pipenv install six required_packages: - gcc - - /usr/bin/virtualenv + - virtualenv - python26 - python27 - python34 From 53928d9a4a830eba2a240254e3004528fefb678b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Mar 2019 11:04:14 +0100 Subject: [PATCH 103/287] Update to 19.0.3 (#1679277) No vendored libraries changed. --- .gitignore | 2 ++ ...ping-given-prefix-from-wheel-RECORD-files.patch | 14 +++++++------- python-pip.spec | 5 ++++- sources | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 5469d53..32022db 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ pip-0.7.2.tar.gz /pip-18.1-tests.tar.gz /pip-19.0.2.tar.gz /pip-19.0.2-tests.tar.gz +/pip-19.0.3.tar.gz +/pip-19.0.3-tests.tar.gz diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch index 36ff810..8bf2735 100644 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -1,5 +1,5 @@ diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 1c244d2..4b07ec0 100644 +index 1c244d23..4b07ec0f 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -109,6 +109,14 @@ class InstallCommand(RequirementCommand): @@ -26,7 +26,7 @@ index 1c244d2..4b07ec0 100644 lib_locations = get_lib_location_guesses( diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index a4834b0..d21530a 100644 +index a4834b00..d21530ac 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -431,7 +431,8 @@ class InstallRequirement(object): @@ -66,7 +66,7 @@ index a4834b0..d21530a 100644 self.install_succeeded = True return diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py -index 700b180..3655bd4 100644 +index 67bcc7f7..6470576b 100644 --- a/src/pip/_internal/wheel.py +++ b/src/pip/_internal/wheel.py @@ -265,6 +265,7 @@ def get_csv_rows_for_installed( @@ -76,8 +76,8 @@ index 700b180..3655bd4 100644 + strip_file_prefix=None, # type: Optional[str] ): # type: (...) -> List[InstalledCSVRow] - installed_rows = [] # type: List[InstalledCSVRow] -@@ -282,7 +283,11 @@ def get_csv_rows_for_installed( + """ +@@ -289,7 +290,11 @@ def get_csv_rows_for_installed( installed_rows.append(tuple(row)) for f in generated: digest, length = rehash(f) @@ -90,7 +90,7 @@ index 700b180..3655bd4 100644 for f in installed: installed_rows.append((installed[f], '', '')) return installed_rows -@@ -299,7 +304,8 @@ def move_wheel_files( +@@ -306,7 +311,8 @@ def move_wheel_files( scheme=None, # type: Optional[Mapping[str, str]] isolated=False, # type: bool prefix=None, # type: Optional[str] @@ -100,7 +100,7 @@ index 700b180..3655bd4 100644 ): # type: (...) -> None """Install a wheel""" -@@ -598,6 +604,7 @@ if __name__ == '__main__': +@@ -605,6 +611,7 @@ if __name__ == '__main__': outrows = get_csv_rows_for_installed( reader, installed=installed, changed=changed, generated=generated, lib_dir=lib_dir, diff --git a/python-pip.spec b/python-pip.spec index ab13f0f..c02f8ac 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.0.2 +Version: 19.0.3 Release: 1%{?dist} Summary: A tool for installing and managing Python packages @@ -489,6 +489,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 +- Update to 19.0.3 (#1679277) + * Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 - Update to 19.0.2 (#1668492) diff --git a/sources b/sources index 23db2b5..3ef723d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.0.2.tar.gz) = c6e13da3a57462371d32982c80575c5181592f5c6a8e70d60ec879e689442f4ad468e7aef97eb58c9da50a5a770385aa35e701eefd713a8e9fafeb12e11d956b -SHA512 (pip-19.0.2-tests.tar.gz) = 069464b9a99d487e6eaca9cc77e012f6850da81395191eeffd33b007f6de248e14db6c6105f643d7afa0737f4f00e48e183cae6b3f931a1b9e2cb3e2c57b7fb6 +SHA512 (pip-19.0.3.tar.gz) = 71562800d5e52e7eb9a49ebb77ac7d2ec2b2a3ef464c9f67a4a76ed1123dce57c59c422ac91dc688f91bf9e84ad13d6547ff3cb61ac4bec54ca9428512b83163 +SHA512 (pip-19.0.3-tests.tar.gz) = 7708661ffa529da3d96734f6659b6a0ae6d53d896ac0513cf18fb153f8bc53737f4548f87f58f27e67633cc5fc521a04bc2f96fa4dd892e12dd7f6109b44d2b8 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 7093fad249c1ace774e88400e3471a39445dbd8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 10 Mar 2019 19:51:41 +0100 Subject: [PATCH 104/287] BR python3-rpm-generators manually --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index c02f8ac..45106d4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -196,6 +196,9 @@ Packages" or "Pip Installs Python". Summary: A tool for installing and managing Python3 packages BuildRequires: python%{python3_pkgversion}-devel +# python3 bootstrap: this is rebuilt before the final build of python3, which +# adds the dependency on python3-rpm-generators, so we require it manually +BuildRequires: python%{python3_pkgversion}-rpm-generators BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if %{with tests} From 9f86bca8b18880ad75fc82819bf97b303d329ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 15 Apr 2019 17:56:04 +0200 Subject: [PATCH 105/287] Pytest 4 compatibility Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1694177 --- ...4dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch | 34 +++++++++++++++++++ python-pip.spec | 4 +++ 2 files changed, 38 insertions(+) create mode 100644 d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch diff --git a/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch b/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch new file mode 100644 index 0000000..75310f3 --- /dev/null +++ b/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch @@ -0,0 +1,34 @@ +From d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Fri, 29 Mar 2019 18:36:45 +0100 +Subject: [PATCH] Pytest: Use get_closest_marker + +See https://github.com/pytest-dev/pytest/pull/4564 +--- + tests/conftest.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 6b2f3e3291..aed2f5a5ec 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -32,15 +32,16 @@ def pytest_collection_modifyitems(config, items): + continue + + # Mark network tests as flaky +- if item.get_marker('network') is not None and "CI" in os.environ: ++ if (item.get_closest_marker('network') is not None and ++ "CI" in os.environ): + item.add_marker(pytest.mark.flaky(reruns=3)) + + if six.PY3: +- if (item.get_marker('incompatible_with_test_venv') and ++ if (item.get_closest_marker('incompatible_with_test_venv') and + config.getoption("--use-venv")): + item.add_marker(pytest.mark.skip( + 'Incompatible with test venv')) +- if (item.get_marker('incompatible_with_venv') and ++ if (item.get_closest_marker('incompatible_with_venv') and + sys.prefix != sys.base_prefix): + item.add_marker(pytest.mark.skip( + 'Incompatible with venv')) diff --git a/python-pip.spec b/python-pip.spec index 45106d4..b160585 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -101,6 +101,9 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch +# pytest 4 support +Patch5: https://github.com/pypa/pip/commit/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -272,6 +275,7 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem From a2422cfdac55d85282fead11787a0ac4f6ad3bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Apr 2019 15:32:31 +0200 Subject: [PATCH 106/287] Update to 19.1 (#1702525) --- .gitignore | 2 + ...4dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch | 34 ----------------- dummy-certifi.patch | 7 +--- python-pip.spec | 38 +++++++++---------- sources | 4 +- 5 files changed, 25 insertions(+), 60 deletions(-) delete mode 100644 d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch diff --git a/.gitignore b/.gitignore index 32022db..e2d25f3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ pip-0.7.2.tar.gz /pip-19.0.2-tests.tar.gz /pip-19.0.3.tar.gz /pip-19.0.3-tests.tar.gz +/pip-19.1.tar.gz +/pip-19.1-tests.tar.gz diff --git a/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch b/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch deleted file mode 100644 index 75310f3..0000000 --- a/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Fri, 29 Mar 2019 18:36:45 +0100 -Subject: [PATCH] Pytest: Use get_closest_marker - -See https://github.com/pytest-dev/pytest/pull/4564 ---- - tests/conftest.py | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/tests/conftest.py b/tests/conftest.py -index 6b2f3e3291..aed2f5a5ec 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -32,15 +32,16 @@ def pytest_collection_modifyitems(config, items): - continue - - # Mark network tests as flaky -- if item.get_marker('network') is not None and "CI" in os.environ: -+ if (item.get_closest_marker('network') is not None and -+ "CI" in os.environ): - item.add_marker(pytest.mark.flaky(reruns=3)) - - if six.PY3: -- if (item.get_marker('incompatible_with_test_venv') and -+ if (item.get_closest_marker('incompatible_with_test_venv') and - config.getoption("--use-venv")): - item.add_marker(pytest.mark.skip( - 'Incompatible with test venv')) -- if (item.get_marker('incompatible_with_venv') and -+ if (item.get_closest_marker('incompatible_with_venv') and - sys.prefix != sys.base_prefix): - item.add_marker(pytest.mark.skip( - 'Incompatible with venv')) diff --git a/dummy-certifi.patch b/dummy-certifi.patch index a9e5840..6e02685 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,8 +1,8 @@ diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 2d02ea4..b1e4975 100644 +index 7271acf..9f0dc20 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -11,9 +11,7 @@ import os +@@ -10,6 +10,4 @@ import os def where(): @@ -10,6 +10,3 @@ index 2d02ea4..b1e4975 100644 - - return os.path.join(f, 'cacert.pem') + return '/etc/pki/tls/certs/ca-bundle.crt' - - - if __name__ == '__main__': diff --git a/python-pip.spec b/python-pip.spec index b160585..a9a2a82 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.0.3 +Version: 19.1 Release: 1%{?dist} Summary: A tool for installing and managing Python packages @@ -101,9 +101,6 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch -# pytest 4 support -Patch5: https://github.com/pypa/pip/commit/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -131,15 +128,15 @@ Packages" or "Pip Installs Python". # Virtual provides for the packages bundled by pip. -# You can find the versions in pip/_vendor/vendor.txt file. +# You can find the versions in src/pip/_vendor/vendor.txt file. %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 -Provides: bundled(python%{1}dist(certifi)) = 2018.11.29 +Provides: bundled(python%{1}dist(certifi)) = 2019.3.9 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 Provides: bundled(python%{1}dist(colorama)) = 0.4.1 Provides: bundled(python%{1}dist(distlib)) = 0.2.8 -Provides: bundled(python%{1}dist(distro)) = 1.3.0 +Provides: bundled(python%{1}dist(distro)) = 1.4.0 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 Provides: bundled(python%{1}dist(idna)) = 2.8 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 @@ -147,12 +144,12 @@ Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 Provides: bundled(python%{1}dist(msgpack)) = 0.5.6 Provides: bundled(python%{1}dist(packaging)) = 19.0 Provides: bundled(python%{1}dist(pep517)) = 0.5.0 -Provides: bundled(python%{1}dist(progress)) = 1.4 -Provides: bundled(python%{1}dist(pyparsing)) = 2.3.1 +Provides: bundled(python%{1}dist(progress)) = 1.5 +Provides: bundled(python%{1}dist(pyparsing)) = 2.4.0 Provides: bundled(python%{1}dist(pytoml)) = 0.1.20 Provides: bundled(python%{1}dist(requests)) = 2.21.0 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 40.6.3 +Provides: bundled(python%{1}dist(setuptools)) = 41.0.1 Provides: bundled(python%{1}dist(six)) = 1.12.0 Provides: bundled(python%{1}dist(urllib3)) = 1.24.1 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 @@ -275,7 +272,6 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -416,14 +412,15 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %if %{with tests} %check # bash completion tests only work from installed package -# needs network https://github.com/pypa/pip/pull/6263 -# test_constraints_local_editable_install_pep518 -# test_pep517_wheels_are_not_confused_with_other_files -# test_upgrade_argparse_shadowed +# needs unaltered sys.path and we cannot do that in %%check +# test_pep517_and_build_options +# test_config_file_venv_option # TODO investigate failures # test_uninstall_non_local_distutils -# test_venv_modification -%global pytest_k 'not completion and not test_constraints_local_editable_install_pep518 and not test_pep517_wheels_are_not_confused_with_other_files and not test_upgrade_argparse_shadowed and not test_uninstall_non_local_distutils and not test_venv_modification' +pytest_k='not completion and + not test_pep517_and_build_options and + not test_config_file_venv_option and + not test_uninstall_non_local_distutils' mkdir _bin export PATH="$PWD/_bin:$PATH" @@ -431,13 +428,13 @@ export PATH="$PWD/_bin:$PATH" %if %{with python2} export PYTHONPATH=%{buildroot}%{python2_sitelib} ln -s %{buildroot}%{_bindir}/pip2 _bin/pip -%{__python2} -m pytest -m 'not network' -k %{pytest_k} +%{__python2} -m pytest -m 'not network' -k "$(echo $pytest_k)" %endif export PYTHONPATH=%{buildroot}%{python3_sitelib} ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip -%{__python3} -m pytest -m 'not network' -k %{pytest_k} +%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" %endif @@ -496,6 +493,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Thu Apr 25 2019 Miro Hrončok - 19.1-1 +- Update to 19.1 (#1702525) + * Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 - Update to 19.0.3 (#1679277) diff --git a/sources b/sources index 3ef723d..bee6bec 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.0.3.tar.gz) = 71562800d5e52e7eb9a49ebb77ac7d2ec2b2a3ef464c9f67a4a76ed1123dce57c59c422ac91dc688f91bf9e84ad13d6547ff3cb61ac4bec54ca9428512b83163 -SHA512 (pip-19.0.3-tests.tar.gz) = 7708661ffa529da3d96734f6659b6a0ae6d53d896ac0513cf18fb153f8bc53737f4548f87f58f27e67633cc5fc521a04bc2f96fa4dd892e12dd7f6109b44d2b8 +SHA512 (pip-19.1.tar.gz) = b10f6a8e0cc71b4987657acb90e677217a485f3605cca3ac9fe946102a8b6e07346d69952469db264e9aa7753015695818f107e361beab8a9fd0fbd5410900df +SHA512 (pip-19.1-tests.tar.gz) = 9891c29522137ef0bbc49e8b3f18220ac1c784f4a91300d917b4e369b3d86e321b59877baa2a6af8c911b6dad3bdfbe031848fd7de093ed80208885dfe2a2c75 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From fa2f84fe5ba0a59c4cc50b3225d7b48cbd311bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 15 May 2019 16:47:48 +0200 Subject: [PATCH 107/287] Update to 19.1.1 (#1706995) --- .gitignore | 2 ++ python-pip.spec | 5 ++++- sources | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e2d25f3..e46e276 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ pip-0.7.2.tar.gz /pip-19.0.3-tests.tar.gz /pip-19.1.tar.gz /pip-19.1-tests.tar.gz +/pip-19.1.1.tar.gz +/pip-19.1.1-tests.tar.gz diff --git a/python-pip.spec b/python-pip.spec index a9a2a82..7b884f7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.1 +Version: 19.1.1 Release: 1%{?dist} Summary: A tool for installing and managing Python packages @@ -493,6 +493,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Wed May 15 2019 Miro Hrončok - 19.1.1-1 +- Update to 19.1.1 (#1706995) + * Thu Apr 25 2019 Miro Hrončok - 19.1-1 - Update to 19.1 (#1702525) diff --git a/sources b/sources index bee6bec..a898220 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.1.tar.gz) = b10f6a8e0cc71b4987657acb90e677217a485f3605cca3ac9fe946102a8b6e07346d69952469db264e9aa7753015695818f107e361beab8a9fd0fbd5410900df -SHA512 (pip-19.1-tests.tar.gz) = 9891c29522137ef0bbc49e8b3f18220ac1c784f4a91300d917b4e369b3d86e321b59877baa2a6af8c911b6dad3bdfbe031848fd7de093ed80208885dfe2a2c75 +SHA512 (pip-19.1.1.tar.gz) = b35598fc6077af44d69f32bc3bc4b28630b1761a31b6b814c59069adbea98bdd68071471bf5ebd28551aae8e970b882200938f6751135f246dc8228f799604a3 +SHA512 (pip-19.1.1-tests.tar.gz) = e67d49c87dc06ef1c45733623280571089307f2e4151c6e189d2f286c154c59d0c83e6a252ac5bd677ece0ce03294f909aa9eed128f0795f062224fcbf21c5d7 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From de5ce176742606bc9e622fa589a61a95662d995d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 10 Jun 2019 13:09:38 +0200 Subject: [PATCH 108/287] Fix root warning when pip is invoked via python -m pip Fixes https://github.com/pypa/pip/issues/6576 --- emit-a-warning-when-running-with-root-privileges.patch | 7 +++++-- python-pip.spec | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 5aa0b09..9692abc 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -11,7 +11,7 @@ index 1279d4a..aeb9d26 100644 from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources -@@ -217,6 +219,20 @@ class InstallCommand(RequirementCommand): +@@ -217,6 +219,23 @@ class InstallCommand(RequirementCommand): def run(self, options, args): cmdoptions.check_install_build_global(options) @@ -23,10 +23,13 @@ index 1279d4a..aeb9d26 100644 + + # Check whether we have root privileges and aren't in venv/virtualenv + if os.getuid() == 0 and not is_venv(): ++ command = path.basename(sys.argv[0]) ++ if command == "__main__.py": ++ command = path.basename(sys.executable) + " -m pip" + logger.warning( + "WARNING: Running pip install with root privileges is " + "generally not a good idea. Try `%s install --user` instead." -+ % path.basename(sys.argv[0]) ++ % command + ) + upgrade_strategy = "to-satisfy-only" diff --git a/python-pip.spec b/python-pip.spec index 7b884f7..f9b44c1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -493,6 +493,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 +- Fix root warning when pip is invoked via python -m pip + * Wed May 15 2019 Miro Hrončok - 19.1.1-1 - Update to 19.1.1 (#1706995) From 853f763a7e0b9779cd01cc3def726780a9ca94d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 10 Jun 2019 14:50:04 +0200 Subject: [PATCH 109/287] Remove a redundant second WARNING prefix form the root warning It is added automatically since 19.1. --- emit-a-warning-when-running-with-root-privileges.patch | 2 +- python-pip.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 9692abc..0c61734 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -27,7 +27,7 @@ index 1279d4a..aeb9d26 100644 + if command == "__main__.py": + command = path.basename(sys.executable) + " -m pip" + logger.warning( -+ "WARNING: Running pip install with root privileges is " ++ "Running pip install with root privileges is " + "generally not a good idea. Try `%s install --user` instead." + % command + ) diff --git a/python-pip.spec b/python-pip.spec index f9b44c1..dfdf6a7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -495,6 +495,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %changelog * Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 - Fix root warning when pip is invoked via python -m pip +- Remove a redundant second WARNING prefix form the abovementioned warning * Wed May 15 2019 Miro Hrončok - 19.1.1-1 - Update to 19.1.1 (#1706995) From 23345c5b9c778f910df3f4b2e9c26ca9e80d406f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 15 Jul 2019 17:09:43 +0200 Subject: [PATCH 110/287] Recommend libcrypt.so.1 for manylinux1 compatibility --- python-pip.spec | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index dfdf6a7..442f41b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -155,6 +155,22 @@ Provides: bundled(python%{1}dist(urllib3)) = 1.24.1 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } +# Some manylinux1 wheels need libcrypt.so.1. +# Manylinux1, a common (as of 2019) platform tag for binary wheels, relies +# on a glibc version that included ancient crypto functions, which were +# moved to libxcrypt and then removed in: +# https://fedoraproject.org/wiki/Changes/FullyRemoveDeprecatedAndUnsafeFunctionsFromLibcrypt +# The manylinux1 standard assumed glibc would keep ABI compatibility, +# but that's only the case if libcrypt.so.1 (libxcrypt-compat) is around. +# This should be solved in the next manylinux standard (but it may be +# a long time until manylinux1 is phased out). +# See: https://github.com/pypa/manylinux/issues/305 +# Note that manylinux is only applicable to x86 (both 32 and 64 bits) +%global crypt_compat_recommends() %{expand: +Recommends: (libcrypt.so.1()(64bit) if python3(x86-64)) +Recommends: (libcrypt.so.1 if python3(x86-32)) +} + %if %{with python2} %package -n python2-%{srcname} @@ -183,6 +199,8 @@ Requires: python2-setuptools %{?python_provide:%python_provide python2-%{srcname}} +%{crypt_compat_recommends} + %description -n python2-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -223,6 +241,8 @@ Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +%{crypt_compat_recommends} + %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -249,6 +269,8 @@ Requires: ca-certificates %{bundled 2} %{bundled 3} +%{crypt_compat_recommends} + %description wheel A Python wheel of pip to use with venv. %endif @@ -493,6 +515,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 +- Recommend libcrypt.so.1 for manylinux1 compatibility + * Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 - Fix root warning when pip is invoked via python -m pip - Remove a redundant second WARNING prefix form the abovementioned warning From 5813f49ff170af1fa870b3be545d47819a7f5d9c Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 15 Jul 2019 18:06:26 +0200 Subject: [PATCH 111/287] Use correct Python versions --- python-pip.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 442f41b..11f1b52 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -167,8 +167,8 @@ Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 # See: https://github.com/pypa/manylinux/issues/305 # Note that manylinux is only applicable to x86 (both 32 and 64 bits) %global crypt_compat_recommends() %{expand: -Recommends: (libcrypt.so.1()(64bit) if python3(x86-64)) -Recommends: (libcrypt.so.1 if python3(x86-32)) +Recommends: (libcrypt.so.1()(64bit) if python%{1}(x86-64)) +Recommends: (libcrypt.so.1 if python%{1}(x86-32)) } @@ -199,7 +199,7 @@ Requires: python2-setuptools %{?python_provide:%python_provide python2-%{srcname}} -%{crypt_compat_recommends} +%{crypt_compat_recommends 2} %description -n python2-%{srcname} pip is a package management system used to install and manage software packages @@ -241,7 +241,7 @@ Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -%{crypt_compat_recommends} +%{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages @@ -269,7 +269,8 @@ Requires: ca-certificates %{bundled 2} %{bundled 3} -%{crypt_compat_recommends} +%{crypt_compat_recommends 2} +%{crypt_compat_recommends 3} %description wheel A Python wheel of pip to use with venv. From 8fc8d4526b983a243a54117ba0f70408cc88d4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 16 Jul 2019 10:35:04 +0200 Subject: [PATCH 112/287] Make /usr/bin/pip Python 3 --- python-pip.spec | 85 +++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 11f1b52..6139aca 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -240,6 +240,8 @@ Requires: python%{python3_pkgversion}-setuptools %{bundled 3} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +Provides: pip = %{version}-%{release} +Conflicts: python-pip < %{version}-%{release} %{crypt_compat_recommends 3} @@ -327,37 +329,37 @@ rm docs/build/html/.buildinfo %install -%if %{without bootstrap} -%py3_install_wheel %{python_wheelname} -%else -%py3_install -%endif - -# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to -# (pip install wheel doesn't overwrite) -rm %{buildroot}%{_bindir}/pip - -%if %{with doc} -pushd docs/build/man -install -d %{buildroot}%{_mandir}/man1 -for MAN in *1; do -%if %{with python2} -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2} -%endif -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} -done -popd -%endif # with doc - %if %{with python2} %if %{without bootstrap} %py2_install_wheel %{python_wheelname} %else %py2_install %endif + +# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to +# (pip install wheel doesn't overwrite) +rm %{buildroot}%{_bindir}/pip %endif # with python2 +%if %{without bootstrap} +%py3_install_wheel %{python_wheelname} +%else +%py3_install +%endif + +%if %{with doc} +pushd docs/build/man +install -d %{buildroot}%{_mandir}/man1 +for MAN in *1; do +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN +%if %{with python2} +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2} +%endif +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} +done +popd +%endif # with doc + # before we ln -s anything, we apply Source10 patch to all pips: # we don't do this when bootstrapping because the entrypoints look different # this is not worth dealing with because we'll rebuild once more anyway @@ -370,40 +372,40 @@ done mkdir -p %{buildroot}%{bashcompdir} %if %{with python2} PYTHONPATH=%{buildroot}%{python2_sitelib} \ - %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bashcompdir}/pip + %{buildroot}%{_bindir}/pip2 completion --bash \ + > %{buildroot}%{bashcompdir}/pip2 %endif PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{buildroot}%{_bindir}/pip3 completion --bash \ - > %{buildroot}%{bashcompdir}/pip3 -pips2=pip -pips3=pip3 + %{buildroot}%{_bindir}/pip completion --bash \ + > %{buildroot}%{bashcompdir}/pip +pips2=pip2 +pips3=pip for pip in %{buildroot}%{_bindir}/pip*; do pip=$(basename $pip) case $pip in -%if %{with python2} - pip2*) - pips2="$pips2 $pip" + pip3*) + pips3="$pips3 $pip" %if 0%{?bashcomp2} ln -s pip %{buildroot}%{bashcompdir}/$pip %endif ;; -%endif - pip3?*) - pips3="$pips3 $pip" +%if %{with python2} + pip2?*) + pips2="$pips2 $pip" %if 0%{?bashcomp2} - ln -s pip3 %{buildroot}%{bashcompdir}/$pip + ln -s pip2 %{buildroot}%{bashcompdir}/$pip %endif ;; +%endif esac done sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bashcompdir}/pip3 + %{buildroot}%{bashcompdir}/pip %if %{with python2} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ - %{buildroot}%{bashcompdir}/pip + %{buildroot}%{bashcompdir}/pip2 %endif # Provide symlinks to executables to comply with Fedora guidelines for Python @@ -466,17 +468,14 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %license LICENSE.txt %doc README.rst %if %{with doc} -%{_mandir}/man1/pip.* %{_mandir}/man1/pip2.* %endif -%{_bindir}/pip %{_bindir}/pip2 %{_bindir}/pip-2 %{_bindir}/pip%{python2_version} %{_bindir}/pip-%{python2_version} %{python2_sitelib}/pip* %dir %{bashcompdir} -%{bashcompdir}/pip %if 0%{?bashcomp2} %{bashcompdir}/pip2* %dir %(dirname %{bashcompdir}) @@ -487,14 +486,17 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %license LICENSE.txt %doc README.rst %if %{with doc} +%{_mandir}/man1/pip.* %{_mandir}/man1/pip3.* %endif +%{_bindir}/pip %{_bindir}/pip3 %{_bindir}/pip-3 %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* %dir %{bashcompdir} +%{bashcompdir}/pip %{bashcompdir}/pip3* %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) @@ -518,6 +520,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %changelog * Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 - Recommend libcrypt.so.1 for manylinux1 compatibility +- Make /usr/bin/pip Python 3 * Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 - Fix root warning when pip is invoked via python -m pip From 776d4ae9a3984977fa051f52a7cecc6bd092b15d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 15:12:09 +0000 Subject: [PATCH 113/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 6139aca..be8c530 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -518,6 +518,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 - Recommend libcrypt.so.1 for manylinux1 compatibility - Make /usr/bin/pip Python 3 From b5e9f715611ced273652af737d27aac056a4e5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 29 Jul 2019 11:59:42 +0200 Subject: [PATCH 114/287] Fedora CI: Stop testing on Python 2.6 --- tests/tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index a98b11e..43aa64b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -23,9 +23,6 @@ - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh - - smoke26: - dir: python/smoke - run: VERSION=2.6 METHOD=virtualenv TOX=false ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -49,7 +46,6 @@ required_packages: - gcc - virtualenv - - python26 - python27 - python34 - python35 From 36d098078cca36edc0c703b00f30c4c453e4a2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jul 2019 18:06:41 +0200 Subject: [PATCH 115/287] Skip python2-virtualenv tests --- python-pip.spec | 9 +++++++-- skip-virtualenv-tests.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 skip-virtualenv-tests.patch diff --git a/python-pip.spec b/python-pip.spec index be8c530..f1098c2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -101,6 +101,10 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch +# When virtualenv is not available, skip the tests instead of failing +# Once we no longer ship or test python2-pip, remove this patch +Patch5: skip-virtualenv-tests.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -183,7 +187,6 @@ BuildRequires: python2-pytest BuildRequires: python2-pretend BuildRequires: python2-freezegun BuildRequires: python2-scripttest -BuildRequires: python2-virtualenv BuildRequires: python2-pyyaml %endif %if %{without bootstrap} @@ -297,6 +300,7 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -453,7 +457,8 @@ export PATH="$PWD/_bin:$PATH" %if %{with python2} export PYTHONPATH=%{buildroot}%{python2_sitelib} ln -s %{buildroot}%{_bindir}/pip2 _bin/pip -%{__python2} -m pytest -m 'not network' -k "$(echo $pytest_k)" +# test_more_than_one_package assumes virtualenv is present +%{__python2} -m pytest -m 'not network' -k "$(echo $pytest_k) and not test_more_than_one_package" %endif diff --git a/skip-virtualenv-tests.patch b/skip-virtualenv-tests.patch new file mode 100644 index 0000000..fb3f41f --- /dev/null +++ b/skip-virtualenv-tests.patch @@ -0,0 +1,27 @@ +diff --git a/tests/lib/venv.py b/tests/lib/venv.py +index 6b63391..126db5b 100644 +--- a/tests/lib/venv.py ++++ b/tests/lib/venv.py +@@ -4,8 +4,12 @@ import compileall + import sys + import textwrap + ++import pytest + import six +-import virtualenv as _virtualenv ++try: ++ import virtualenv as _virtualenv ++except ImportError: ++ _virtualenv = None + + from .path import Path + +@@ -20,6 +24,8 @@ class VirtualEnvironment(object): + """ + + def __init__(self, location, template=None, venv_type=None): ++ if _virtualenv is None: ++ pytest.skip('virtualenv not available') + assert template is None or venv_type is None + assert venv_type in (None, 'virtualenv', 'venv') + self.location = Path(location) From 30557cd2a511928c4166d817307404a24d282fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 14 Aug 2019 22:15:12 +0200 Subject: [PATCH 116/287] Bootstrap for Python 3.8 --- python-pip.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index f1098c2..7632d81 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,6 @@ +%global _without_doc 1 +%global _without_tests 1 +%global _with_bootstrap 1 %bcond_with bootstrap %bcond_without tests @@ -23,7 +26,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -523,6 +526,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 +- Bootstrap for Python 3.8 + * Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 07e4cb7088cc5241763fcf8b5ff592384bb76907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 14 Aug 2019 22:20:49 +0200 Subject: [PATCH 117/287] Only apply Patch 5 with tests --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 7632d81..2d26253 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -303,7 +303,10 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 + +%if %{with tests} %patch5 -p1 +%endif # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem From 0f902d1fc07ec0c00bbba51e0bd85d1a6e600463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 14 Aug 2019 23:02:14 +0200 Subject: [PATCH 118/287] Bootstrap for Python 3.8 --- python-pip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 2d26253..baf9ba9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,5 @@ %global _without_doc 1 %global _without_tests 1 -%global _with_bootstrap 1 %bcond_with bootstrap %bcond_without tests @@ -26,7 +25,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -529,6 +528,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 +- Bootstrap for Python 3.8 + * Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 - Bootstrap for Python 3.8 From 1e1292bcb175826bf20f805e3ce86c906ccfaa5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 17 Aug 2019 12:49:08 +0200 Subject: [PATCH 119/287] Rebuilt for Python 3.8 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index baf9ba9..c1c2f5d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 %bcond_with bootstrap %bcond_without tests @@ -25,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -528,6 +526,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 +- Rebuilt for Python 3.8 + * Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 - Bootstrap for Python 3.8 From ef07805c26a4a81be2d1ea8d262a962d98a08150 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 21 Aug 2019 17:11:03 +0200 Subject: [PATCH 120/287] Make pip bootstrap itself, rather than with an extra bootstrap RPM build --- python-pip.spec | 57 +++++++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index c1c2f5d..e06e3d8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,4 +1,3 @@ -%bcond_with bootstrap %bcond_without tests %bcond_without python2 @@ -189,10 +188,6 @@ BuildRequires: python2-freezegun BuildRequires: python2-scripttest BuildRequires: python2-pyyaml %endif -%if %{without bootstrap} -BuildRequires: python2-pip -BuildRequires: python2-wheel -%endif BuildRequires: ca-certificates Requires: ca-certificates Requires: python2-setuptools @@ -231,10 +226,7 @@ BuildRequires: python%{python3_pkgversion}-scripttest BuildRequires: python%{python3_pkgversion}-virtualenv BuildRequires: python%{python3_pkgversion}-pyyaml %endif -%if %{without bootstrap} -BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel -%endif BuildRequires: ca-certificates Requires: ca-certificates Requires: python%{python3_pkgversion}-setuptools @@ -265,7 +257,6 @@ A documentation for a tool for installing and managing Python packages %endif -%if %{without bootstrap} %package wheel Summary: The pip wheel Requires: ca-certificates @@ -279,7 +270,6 @@ Requires: ca-certificates %description wheel A Python wheel of pip to use with venv. -%endif %prep %setup -q -n %{srcname}-%{version} @@ -316,15 +306,7 @@ ln -s %{python_wheeldir} tests/data/common_wheels %build -%if %{with python2} && %{with bootstrap} -%py2_build -%endif - -%if %{without bootstrap} %py3_build_wheel -%else -%py3_build -%endif %if %{with doc} export PYTHONPATH=./src/ @@ -337,22 +319,28 @@ rm docs/build/html/.buildinfo %install %if %{with python2} -%if %{without bootstrap} -%py2_install_wheel %{python_wheelname} -%else -%py2_install -%endif +# The following is similar to %%py2_install_wheel, but we don't have +# /usr/bin/pip2 yet, so we install using the wheel directly. +# (This is not standard wheel usage, but the pip wheel supports it -- see +# pip/__main__.py) +%{__python2} dist/%{python_wheelname}/pip install \ + -I 'dist/%{python_wheelname}' \ + --root %{buildroot} \ + --no-deps # TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to # (pip install wheel doesn't overwrite) rm %{buildroot}%{_bindir}/pip %endif # with python2 -%if %{without bootstrap} -%py3_install_wheel %{python_wheelname} -%else -%py3_install -%endif +# The following is similar to %%py3_install_wheel, but we don't have +# /usr/bin/pip yet, so we install using the wheel directly. +# (This is not standard wheel usage, but the pip wheel supports it -- see +# pip/__main__.py) +%{__python3} dist/%{python_wheelname}/pip install \ + -I 'dist/%{python_wheelname}' \ + --root %{buildroot} \ + --no-deps %if %{with doc} pushd docs/build/man @@ -368,13 +356,9 @@ popd %endif # with doc # before we ln -s anything, we apply Source10 patch to all pips: -# we don't do this when bootstrapping because the entrypoints look different -# this is not worth dealing with because we'll rebuild once more anyway -%if %{without bootstrap} for PIP in %{buildroot}%{_bindir}/pip*; do patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} done -%endif mkdir -p %{buildroot}%{bashcompdir} %if %{with python2} @@ -427,18 +411,14 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 # Make sure the INSTALLER is not pip, otherwise Patch2 won't work # TODO Maybe we should make all our python packages have this? -%if %{without bootstrap} %if %{with python2} echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER %endif echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER -%endif -%if %{without bootstrap} mkdir -p %{buildroot}%{python_wheeldir} install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} -%endif %if %{with tests} @@ -517,15 +497,16 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %doc docs/build/html %endif # with doc -%if %{without bootstrap} %files wheel %license LICENSE.txt # we own the dir for simplicity %dir %{python_wheeldir}/ %{python_wheeldir}/%{python_wheelname} -%endif %changelog +* Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 +- Make pip bootstrap itself, rather than with an extra bootstrap RPM build + * Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 - Rebuilt for Python 3.8 From 9a8a1ef98e99671ce1082828b32db8b3bb79e3f1 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 21 Aug 2019 17:39:35 +0200 Subject: [PATCH 121/287] Remove python2-pip --- python-pip.spec | 120 ++---------------------------------- skip-virtualenv-tests.patch | 27 -------- 2 files changed, 5 insertions(+), 142 deletions(-) delete mode 100644 skip-virtualenv-tests.patch diff --git a/python-pip.spec b/python-pip.spec index e06e3d8..281d996 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,5 @@ %bcond_without tests -%bcond_without python2 %bcond_without doc %global srcname pip @@ -22,7 +21,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -100,10 +99,6 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch -# When virtualenv is not available, skip the tests instead of failing -# Once we no longer ship or test python2-pip, remove this patch -Patch5: skip-virtualenv-tests.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -175,38 +170,6 @@ Recommends: (libcrypt.so.1 if python%{1}(x86-32)) } -%if %{with python2} -%package -n python2-%{srcname} -Summary: A tool for installing and managing Python 2 packages -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%if %{with tests} -BuildRequires: python2-mock -BuildRequires: python2-pytest -BuildRequires: python2-pretend -BuildRequires: python2-freezegun -BuildRequires: python2-scripttest -BuildRequires: python2-pyyaml -%endif -BuildRequires: ca-certificates -Requires: ca-certificates -Requires: python2-setuptools - -# Virtual provides for the packages bundled by pip: -%{bundled 2} - -%{?python_provide:%python_provide python2-%{srcname}} - -%{crypt_compat_recommends 2} - -%description -n python2-%{srcname} -pip is a package management system used to install and manage software packages -written in Python. Many packages can be found in the Python Package Index -(PyPI). pip is a recursive acronym that can stand for either "Pip Installs -Packages" or "Pip Installs Python". - -%endif # with python2 - %package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages @@ -291,10 +254,6 @@ popd %patch3 -p1 %patch4 -p1 -%if %{with tests} -%patch5 -p1 -%endif - # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt @@ -318,20 +277,6 @@ rm docs/build/html/.buildinfo %install -%if %{with python2} -# The following is similar to %%py2_install_wheel, but we don't have -# /usr/bin/pip2 yet, so we install using the wheel directly. -# (This is not standard wheel usage, but the pip wheel supports it -- see -# pip/__main__.py) -%{__python2} dist/%{python_wheelname}/pip install \ - -I 'dist/%{python_wheelname}' \ - --root %{buildroot} \ - --no-deps - -# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to -# (pip install wheel doesn't overwrite) -rm %{buildroot}%{_bindir}/pip -%endif # with python2 # The following is similar to %%py3_install_wheel, but we don't have # /usr/bin/pip yet, so we install using the wheel directly. @@ -347,29 +292,21 @@ pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN -%if %{with python2} -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2} -%endif install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} done popd -%endif # with doc +%endif # before we ln -s anything, we apply Source10 patch to all pips: for PIP in %{buildroot}%{_bindir}/pip*; do patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} done + mkdir -p %{buildroot}%{bashcompdir} -%if %{with python2} -PYTHONPATH=%{buildroot}%{python2_sitelib} \ - %{buildroot}%{_bindir}/pip2 completion --bash \ - > %{buildroot}%{bashcompdir}/pip2 -%endif PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ > %{buildroot}%{bashcompdir}/pip -pips2=pip2 pips3=pip for pip in %{buildroot}%{_bindir}/pip*; do pip=$(basename $pip) @@ -380,41 +317,20 @@ for pip in %{buildroot}%{_bindir}/pip*; do ln -s pip %{buildroot}%{bashcompdir}/$pip %endif ;; -%if %{with python2} - pip2?*) - pips2="$pips2 $pip" -%if 0%{?bashcomp2} - ln -s pip2 %{buildroot}%{bashcompdir}/$pip -%endif - ;; -%endif esac done sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ %{buildroot}%{bashcompdir}/pip -%if %{with python2} -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ - %{buildroot}%{bashcompdir}/pip2 -%endif # Provide symlinks to executables to comply with Fedora guidelines for Python -%if %{with python2} -ln -s ./pip%{python2_version} %{buildroot}%{_bindir}/pip-%{python2_version} -ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2 -%endif - ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 # Make sure the INSTALLER is not pip, otherwise Patch2 won't work # TODO Maybe we should make all our python packages have this? -%if %{with python2} -echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER -%endif - echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER mkdir -p %{buildroot}%{python_wheeldir} @@ -437,39 +353,12 @@ pytest_k='not completion and mkdir _bin export PATH="$PWD/_bin:$PATH" -%if %{with python2} -export PYTHONPATH=%{buildroot}%{python2_sitelib} -ln -s %{buildroot}%{_bindir}/pip2 _bin/pip -# test_more_than_one_package assumes virtualenv is present -%{__python2} -m pytest -m 'not network' -k "$(echo $pytest_k) and not test_more_than_one_package" -%endif - - export PYTHONPATH=%{buildroot}%{python3_sitelib} ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" %endif -%if %{with python2} -%files -n python2-%{srcname} -%license LICENSE.txt -%doc README.rst -%if %{with doc} -%{_mandir}/man1/pip2.* -%endif -%{_bindir}/pip2 -%{_bindir}/pip-2 -%{_bindir}/pip%{python2_version} -%{_bindir}/pip-%{python2_version} -%{python2_sitelib}/pip* -%dir %{bashcompdir} -%if 0%{?bashcomp2} -%{bashcompdir}/pip2* -%dir %(dirname %{bashcompdir}) -%endif -%endif # with python2 - %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst @@ -495,7 +384,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %license LICENSE.txt %doc README.rst %doc docs/build/html -%endif # with doc +%endif %files wheel %license LICENSE.txt @@ -505,6 +394,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %changelog * Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 +- Remove python2-pip - Make pip bootstrap itself, rather than with an extra bootstrap RPM build * Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 diff --git a/skip-virtualenv-tests.patch b/skip-virtualenv-tests.patch deleted file mode 100644 index fb3f41f..0000000 --- a/skip-virtualenv-tests.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/tests/lib/venv.py b/tests/lib/venv.py -index 6b63391..126db5b 100644 ---- a/tests/lib/venv.py -+++ b/tests/lib/venv.py -@@ -4,8 +4,12 @@ import compileall - import sys - import textwrap - -+import pytest - import six --import virtualenv as _virtualenv -+try: -+ import virtualenv as _virtualenv -+except ImportError: -+ _virtualenv = None - - from .path import Path - -@@ -20,6 +24,8 @@ class VirtualEnvironment(object): - """ - - def __init__(self, location, template=None, venv_type=None): -+ if _virtualenv is None: -+ pytest.skip('virtualenv not available') - assert template is None or venv_type is None - assert venv_type in (None, 'virtualenv', 'venv') - self.location = Path(location) From a0ac853b8c1f4a73424169ce3fcb71cb943506fc Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 28 Aug 2019 16:24:13 +0200 Subject: [PATCH 122/287] Simplify bash completion Bash reads all the completion files at start, so we don't need additional symlinks. Register completions for all the pip3 symliks at once. --- python-pip.spec | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 281d996..3269433 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -10,12 +10,7 @@ %global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931 %endif -# Note that with disabled python3, bashcomp2 will be disabled as well because -# bashcompdir will point to a different path than with python3 enabled. -%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) -%if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d" -%global bashcomp2 1 -%endif +%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! @@ -306,22 +301,12 @@ done mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bashcompdir}/pip -pips3=pip -for pip in %{buildroot}%{_bindir}/pip*; do - pip=$(basename $pip) - case $pip in - pip3*) - pips3="$pips3 $pip" -%if 0%{?bashcomp2} - ln -s pip %{buildroot}%{bashcompdir}/$pip -%endif - ;; - esac -done -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ + > %{buildroot}%{bashcompdir}/pip3 + +# Make bash completion apply to all the 5 symlinks we install +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bashcompdir}/pip + %{buildroot}%{bashcompdir}/pip3 # Provide symlinks to executables to comply with Fedora guidelines for Python @@ -373,11 +358,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* %dir %{bashcompdir} -%{bashcompdir}/pip -%{bashcompdir}/pip3* -%if 0%{?bashcomp2} -%dir %(dirname %{bashcompdir}) -%endif +%{bashcompdir}/pip3 %if %{with doc} %files doc From add791f1d562981f07349cb0a1d4978012dd1a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 2 Sep 2019 10:28:45 +0200 Subject: [PATCH 123/287] Update to 19.2.3 (#1742230) --- .gitignore | 2 + 6788.patch | 22 ++++ ...given-prefix-from-wheel-RECORD-files.patch | 110 ------------------ python-pip.spec | 25 ++-- ...existing-dist-only-if-path-conflicts.patch | 84 ++++++------- sources | 4 +- 6 files changed, 83 insertions(+), 164 deletions(-) create mode 100644 6788.patch delete mode 100644 allow-stripping-given-prefix-from-wheel-RECORD-files.patch diff --git a/.gitignore b/.gitignore index e46e276..c6378ff 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ pip-0.7.2.tar.gz /pip-19.1-tests.tar.gz /pip-19.1.1.tar.gz /pip-19.1.1-tests.tar.gz +/pip-19.2.3.tar.gz +/pip-19.2.3-tests.tar.gz diff --git a/6788.patch b/6788.patch new file mode 100644 index 0000000..f5d06fd --- /dev/null +++ b/6788.patch @@ -0,0 +1,22 @@ +From bbbbe07aab24ebaec228624cf6d0100ebe58b00a Mon Sep 17 00:00:00 2001 +From: Hugo +Date: Thu, 25 Jul 2019 10:47:05 +0300 +Subject: [PATCH] Consistently get version string, ignoring alpha/beta + +--- + tests/functional/test_install.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py +index 96b780f3c..9481cfd08 100644 +--- a/tests/functional/test_install.py ++++ b/tests/functional/test_install.py +@@ -1306,7 +1306,7 @@ def test_double_install_fail(script): + def _get_expected_error_text(): + return ( + "Package 'pkga' requires a different Python: {} not in '<1.0'" +- ).format(sys.version.split()[0]) ++ ).format('.'.join(map(str, sys.version_info[:3]))) + + + def test_install_incompatible_python_requires(script): diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch deleted file mode 100644 index 8bf2735..0000000 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 1c244d23..4b07ec0f 100644 ---- a/src/pip/_internal/commands/install.py -+++ b/src/pip/_internal/commands/install.py -@@ -109,6 +109,14 @@ class InstallCommand(RequirementCommand): - default=None, - help="Installation prefix where lib, bin and other top-level " - "folders are placed") -+ cmd_opts.add_option( -+ '--strip-file-prefix', -+ dest='strip_file_prefix', -+ metavar='prefix', -+ default=None, -+ help="Strip given prefix from script paths in wheel RECORD." -+ ) -+ - - cmd_opts.add_option(cmdoptions.build_dir()) - -@@ -391,6 +399,7 @@ class InstallCommand(RequirementCommand): - pycompile=options.compile, - warn_script_location=warn_script_location, - use_user_site=options.use_user_site, -+ strip_file_prefix=options.strip_file_prefix, - ) - - lib_locations = get_lib_location_guesses( -diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index a4834b00..d21530ac 100644 ---- a/src/pip/_internal/req/req_install.py -+++ b/src/pip/_internal/req/req_install.py -@@ -431,7 +431,8 @@ class InstallRequirement(object): - prefix=None, # type: Optional[str] - warn_script_location=True, # type: bool - use_user_site=False, # type: bool -- pycompile=True # type: bool -+ pycompile=True, # type: bool -+ strip_file_prefix=None # type: Optional[str] - ): - # type: (...) -> None - move_wheel_files( -@@ -443,6 +444,7 @@ class InstallRequirement(object): - pycompile=pycompile, - isolated=self.isolated, - warn_script_location=warn_script_location, -+ strip_file_prefix=strip_file_prefix, - ) - - # Things valid for sdists -@@ -894,7 +896,8 @@ class InstallRequirement(object): - prefix=None, # type: Optional[str] - warn_script_location=True, # type: bool - use_user_site=False, # type: bool -- pycompile=True # type: bool -+ pycompile=True, # type: bool -+ strip_file_prefix=None # type: Optional[str] - ): - # type: (...) -> None - global_options = global_options if global_options is not None else [] -@@ -911,6 +914,7 @@ class InstallRequirement(object): - self.source_dir, root=root, prefix=prefix, home=home, - warn_script_location=warn_script_location, - use_user_site=use_user_site, pycompile=pycompile, -+ strip_file_prefix=strip_file_prefix, - ) - self.install_succeeded = True - return -diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py -index 67bcc7f7..6470576b 100644 ---- a/src/pip/_internal/wheel.py -+++ b/src/pip/_internal/wheel.py -@@ -265,6 +265,7 @@ def get_csv_rows_for_installed( - changed, # type: set - generated, # type: List[str] - lib_dir, # type: str -+ strip_file_prefix=None, # type: Optional[str] - ): - # type: (...) -> List[InstalledCSVRow] - """ -@@ -289,7 +290,11 @@ def get_csv_rows_for_installed( - installed_rows.append(tuple(row)) - for f in generated: - digest, length = rehash(f) -- installed_rows.append((normpath(f, lib_dir), digest, str(length))) -+ final_path = normpath(f, lib_dir) -+ if strip_file_prefix and final_path.startswith(strip_file_prefix): -+ final_path = os.path.join(os.sep, -+ os.path.relpath(final_path, strip_file_prefix)) -+ installed_rows.append((final_path, digest, str(length))) - for f in installed: - installed_rows.append((installed[f], '', '')) - return installed_rows -@@ -306,7 +311,8 @@ def move_wheel_files( - scheme=None, # type: Optional[Mapping[str, str]] - isolated=False, # type: bool - prefix=None, # type: Optional[str] -- warn_script_location=True # type: bool -+ warn_script_location=True, # type: bool -+ strip_file_prefix=None # type: Optional[str] - ): - # type: (...) -> None - """Install a wheel""" -@@ -605,6 +611,7 @@ if __name__ == '__main__': - outrows = get_csv_rows_for_installed( - reader, installed=installed, changed=changed, - generated=generated, lib_dir=lib_dir, -+ strip_file_prefix=strip_file_prefix - ) - writer = csv.writer(record_out) - # Sort to simplify testing. diff --git a/python-pip.spec b/python-pip.spec index 3269433..f20831f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,8 +15,8 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.1.1 -Release: 8%{?dist} +Version: 19.2.3 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -73,9 +73,8 @@ Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_com Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz %endif -# Patch until the following issue gets implemented upstream: -# https://github.com/pypa/pip/issues/1351 -Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch +# Fix expected output in test to not break with alpha/beta/rc Python versions +Patch0: https://github.com/pypa/pip/pull/6788.patch # Downstream only patch # Emit a warning to the user if pip install is run with root privileges @@ -125,26 +124,26 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 -Provides: bundled(python%{1}dist(certifi)) = 2019.3.9 +Provides: bundled(python%{1}dist(certifi)) = 2019.6.16 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 Provides: bundled(python%{1}dist(colorama)) = 0.4.1 -Provides: bundled(python%{1}dist(distlib)) = 0.2.8 +Provides: bundled(python%{1}dist(distlib)) = 0.2.9.post0 Provides: bundled(python%{1}dist(distro)) = 1.4.0 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 Provides: bundled(python%{1}dist(idna)) = 2.8 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 -Provides: bundled(python%{1}dist(msgpack)) = 0.5.6 +Provides: bundled(python%{1}dist(msgpack)) = 0.6.1 Provides: bundled(python%{1}dist(packaging)) = 19.0 Provides: bundled(python%{1}dist(pep517)) = 0.5.0 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.0 Provides: bundled(python%{1}dist(pytoml)) = 0.1.20 -Provides: bundled(python%{1}dist(requests)) = 2.21.0 +Provides: bundled(python%{1}dist(requests)) = 2.22.0 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 Provides: bundled(python%{1}dist(setuptools)) = 41.0.1 Provides: bundled(python%{1}dist(six)) = 1.12.0 -Provides: bundled(python%{1}dist(urllib3)) = 1.24.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.25.3 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -349,7 +348,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %doc README.rst %if %{with doc} %{_mandir}/man1/pip.* +%{_mandir}/man1/pip-*.* %{_mandir}/man1/pip3.* +%{_mandir}/man1/pip3-*.* %endif %{_bindir}/pip %{_bindir}/pip3 @@ -374,6 +375,10 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 +- Update to 19.2.3 (#1742230) +- Drop patch that should strip path prefixes from RECORD files, the paths are relative + * Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 - Remove python2-pip - Make pip bootstrap itself, rather than with an extra bootstrap RPM build diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index e8fbe93..c93a887 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -10,42 +10,20 @@ Date: Tue Sep 18 17:13:51 2018 +0200 Co-Authored-By: Michal Cyprian -diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index d21530a..0023a35 100644 ---- a/src/pip/_internal/req/req_install.py -+++ b/src/pip/_internal/req/req_install.py -@@ -29,7 +29,7 @@ from pip._internal.utils.hashes import Hashes - from pip._internal.utils.logging import indent_log - from pip._internal.utils.misc import ( - _make_build_dir, ask_path_exists, backup_dir, call_subprocess, -- display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, -+ display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, - get_installed_version, redact_password_from_url, rmtree, - ) - from pip._internal.utils.packaging import get_metadata -@@ -411,7 +411,7 @@ class InstallRequirement(object): - "lack sys.path precedence to %s in %s" % - (existing_dist.project_name, existing_dist.location) - ) -- else: -+ elif dist_in_install_path(existing_dist): - self.conflicts_with = existing_dist - return True - -diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/resolve.py -index 33f572f..88b68e1 100644 ---- a/src/pip/_internal/resolve.py -+++ b/src/pip/_internal/resolve.py -@@ -20,7 +20,7 @@ from pip._internal.exceptions import ( - ) +diff --git a/src/pip/_internal/legacy_resolve.py b/src/pip/_internal/legacy_resolve.py +index 1d9229cb..3088d22d 100644 +--- a/src/pip/_internal/legacy_resolve.py ++++ b/src/pip/_internal/legacy_resolve.py +@@ -24,7 +24,7 @@ from pip._internal.exceptions import ( from pip._internal.req.constructors import install_req_from_req_string from pip._internal.utils.logging import indent_log --from pip._internal.utils.misc import dist_in_usersite, ensure_dir -+from pip._internal.utils.misc import dist_in_install_path, dist_in_usersite, ensure_dir - from pip._internal.utils.packaging import check_dist_requires_python - from pip._internal.utils.typing import MYPY_CHECK_RUNNING - -@@ -154,7 +154,9 @@ class Resolver(object): + from pip._internal.utils.misc import ( +- dist_in_usersite, ensure_dir, normalize_version_info, ++ dist_in_install_path, dist_in_usersite, ensure_dir, normalize_version_info, + ) + from pip._internal.utils.packaging import ( + check_requires_python, get_requires_python, +@@ -219,7 +219,9 @@ class Resolver(object): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -56,20 +34,42 @@ index 33f572f..88b68e1 100644 req.conflicts_with = req.satisfied_by req.satisfied_by = None +diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py +index f5c93504..1096c397 100644 +--- a/src/pip/_internal/req/req_install.py ++++ b/src/pip/_internal/req/req_install.py +@@ -27,7 +27,7 @@ from pip._internal.utils.logging import indent_log + from pip._internal.utils.marker_files import PIP_DELETE_MARKER_FILENAME + from pip._internal.utils.misc import ( + _make_build_dir, ask_path_exists, backup_dir, call_subprocess, +- display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, ++ display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, + get_installed_version, redact_password_from_url, rmtree, + ) + from pip._internal.utils.packaging import get_metadata +@@ -427,7 +427,7 @@ class InstallRequirement(object): + "lack sys.path precedence to %s in %s" % + (existing_dist.project_name, existing_dist.location) + ) +- else: ++ elif dist_in_install_path(existing_dist): + self.conflicts_with = existing_dist + return True + diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 84605ee..0e4ba93 100644 +index 61f74dc8..ffa8042c 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -30,7 +30,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote + + from pip import __version__ from pip._internal.exceptions import CommandError, InstallationError - from pip._internal.locations import ( - running_under_virtualenv, site_packages, user_site, virtualenv_no_global, -- write_delete_marker_file, -+ write_delete_marker_file, distutils_scheme, - ) +-from pip._internal.locations import site_packages, user_site ++from pip._internal.locations import distutils_scheme, site_packages, user_site from pip._internal.utils.compat import ( - WINDOWS, console_to_str, expanduser, stdlib_pkgs, -@@ -355,6 +355,16 @@ def dist_in_site_packages(dist): + WINDOWS, console_to_str, expanduser, stdlib_pkgs, str_to_display, + ) +@@ -454,6 +454,16 @@ def dist_in_site_packages(dist): ).startswith(normalize_path(site_packages)) diff --git a/sources b/sources index a898220..bac5521 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.1.1.tar.gz) = b35598fc6077af44d69f32bc3bc4b28630b1761a31b6b814c59069adbea98bdd68071471bf5ebd28551aae8e970b882200938f6751135f246dc8228f799604a3 -SHA512 (pip-19.1.1-tests.tar.gz) = e67d49c87dc06ef1c45733623280571089307f2e4151c6e189d2f286c154c59d0c83e6a252ac5bd677ece0ce03294f909aa9eed128f0795f062224fcbf21c5d7 +SHA512 (pip-19.2.3.tar.gz) = 64ab4ece6da526c9d1b24e73a9c0ca0a38d0fb1525bf9981177342a8b0902ae825ec8f3dabd9ce00dcf0f010aaabf4177c9146084668ce505e0c382c322948c8 +SHA512 (pip-19.2.3-tests.tar.gz) = d4052d83e20fe276d251a80d8d33c33568570d5f26038847f0e5fba34a48ae3d5318b31439f8582d337245f38472495db221d7f4bf39eb9c98181f2f8aecad36 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 3bced42530d39ff3ce8aff3a330c827196df2add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 31 Oct 2019 00:50:36 +0100 Subject: [PATCH 124/287] Make /usr/bin/pip(3) work with user-installed pip 19.3+ Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1767212 == Before: $ rpm -q python3-pip python3-pip-19.2.3-1.fc32.noarch $ /usr/bin/pip --version pip 19.2.3 from /usr/lib/python3.8/site-packages/pip (python 3.8) $ pip install --user --upgrade pip ... Successfully installed pip-19.3.1 $ /usr/bin/pip --version Traceback (most recent call last): File "/usr/bin/pip", line 15, in sys.exit(main()) TypeError: 'module' object is not callable $ rm .local/ -rf $ pip install --user --upgrade 'pip<10' ... Successfully installed pip-9.0.3 $ /usr/bin/pip --version pip 9.0.3 from /home/pythonista/.local/lib/python3.8/site-packages (python 3.8) $ pip install --user --upgrade 'pip<9' ... Successfully installed pip-8.1.2 $ /usr/bin/pip --version pip 8.1.2 from /home/pythonista/.local/lib/python3.8/site-packages (python 3.8) == After $ rpm -q python3-pip python3-pip-19.2.3-2.fc32.noarch $ /usr/bin/pip --version pip 19.2.3 from /usr/lib/python3.8/site-packages/pip (python 3.8) $ pip install --user --upgrade pip ... Successfully installed pip-19.3.1 $ /usr/bin/pip --version pip 19.3.1 from /home/pythonista/.local/lib/python3.8/site-packages/pip (python 3.8) $ pip install --user --upgrade 'pip<10' ... Successfully installed pip-9.0.3 $ /usr/bin/pip --version pip 9.0.3 from /home/pythonista/.local/lib/python3.8/site-packages (python 3.8) $ pip install --user --upgrade 'pip<9' ... Successfully installed pip-8.1.2 $ /usr/bin/pip --version pip 8.1.2 from /home/pythonista/.local/lib/python3.8/site-packages (python 3.8) --- ...patch => pip-allow-different-versions.patch | 6 +++++- python-pip.spec | 18 +++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) rename pip-allow-older-versions.patch => pip-allow-different-versions.patch (80%) diff --git a/pip-allow-older-versions.patch b/pip-allow-different-versions.patch similarity index 80% rename from pip-allow-older-versions.patch rename to pip-allow-different-versions.patch index 39a272b..5b7075d 100644 --- a/pip-allow-older-versions.patch +++ b/pip-allow-different-versions.patch @@ -1,6 +1,6 @@ --- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200 +++ pip3 2018-05-04 11:49:08.098821010 +0200 -@@ -4,7 +4,12 @@ +@@ -4,7 +4,16 @@ import re import sys @@ -11,6 +11,10 @@ + # user has most probably downgraded pip in their home + # so let them run it anyway until ~/.local/bin makes it in front of the PATH + from pip import main ++else: ++ # user might also upgraded pip... ++ if hasattr(main, 'main'): ++ main = main.main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) diff --git a/python-pip.spec b/python-pip.spec index f20831f..8979134 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -95,21 +95,22 @@ Patch4: dummy-certifi.patch # Downstream only patch # Users might have local installations of pip from using -# `pip install --user --upgrade pip` on older versions. +# `pip install --user --upgrade pip` on older/newer versions. # If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. -# However that's the one from this RPM package (pip10+) and the import in there -# fails (it tries to import from ~/.local, but older pip is there with a bit -# different API). +# However that's the one from this RPM package and the import in there might +# fail (it tries to import from ~/.local, but older or newer pip is there with +# a bit different API). # We add this patch as a dirty workaround to make /usr/bin/pip* work with -# both pip10+ (from this RPM) and older pip (from whatever). +# both pip10+ (from this RPM) and older or newer (19.3+) pip (from whatever). # A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, # however others are against that and we cannot change it for existing # installs/user homes anyway. # https://bugzilla.redhat.com/show_bug.cgi?id=1569488 # https://bugzilla.redhat.com/show_bug.cgi?id=1571650 +# https://bugzilla.redhat.com/show_bug.cgi?id=1767212 # WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! # %%patch10 doesn't work outside of %%prep, so we add it as a source -Source10: pip-allow-older-versions.patch +Source10: pip-allow-different-versions.patch %description pip is a package management system used to install and manage software packages @@ -375,6 +376,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 +- Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) + * Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 - Update to 19.2.3 (#1742230) - Drop patch that should strip path prefixes from RECORD files, the paths are relative From f6e9c0640b36d2501f3ff6cbfac7210c765dbf20 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 12 Nov 2019 17:31:50 +0100 Subject: [PATCH 125/287] Update to 19.3.1 (#1761508) Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions --- .gitignore | 2 + 6788.patch | 22 - ...ng-when-running-with-root-privileges.patch | 22 +- network-tests.patch | 683 ++++++++++++++++++ pip-allow-different-versions.patch | 33 +- python-pip.spec | 62 +- ...existing-dist-only-if-path-conflicts.patch | 88 +-- sources | 4 +- 8 files changed, 806 insertions(+), 110 deletions(-) delete mode 100644 6788.patch create mode 100644 network-tests.patch diff --git a/.gitignore b/.gitignore index c6378ff..d3d7fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ pip-0.7.2.tar.gz /pip-19.1.1-tests.tar.gz /pip-19.2.3.tar.gz /pip-19.2.3-tests.tar.gz +/pip-19.3.1.tar.gz +/pip-19.3.1-tests.tar.gz diff --git a/6788.patch b/6788.patch deleted file mode 100644 index f5d06fd..0000000 --- a/6788.patch +++ /dev/null @@ -1,22 +0,0 @@ -From bbbbe07aab24ebaec228624cf6d0100ebe58b00a Mon Sep 17 00:00:00 2001 -From: Hugo -Date: Thu, 25 Jul 2019 10:47:05 +0300 -Subject: [PATCH] Consistently get version string, ignoring alpha/beta - ---- - tests/functional/test_install.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py -index 96b780f3c..9481cfd08 100644 ---- a/tests/functional/test_install.py -+++ b/tests/functional/test_install.py -@@ -1306,7 +1306,7 @@ def test_double_install_fail(script): - def _get_expected_error_text(): - return ( - "Package 'pkga' requires a different Python: {} not in '<1.0'" -- ).format(sys.version.split()[0]) -+ ).format('.'.join(map(str, sys.version_info[:3]))) - - - def test_install_incompatible_python_requires(script): diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 0c61734..c782610 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,8 +1,19 @@ +From aab24967a03bda3b0999d80562a6064c27d1e0e0 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 12 Nov 2019 17:15:08 +0100 +Subject: [PATCH] Downstream only patch + +Emit a warning to the user if pip install is run with root privileges +Issue upstream: https://github.com/pypa/pip/issues/4288 +--- + src/pip/_internal/commands/install.py | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 1279d4a..aeb9d26 100644 +index 5842d18..a6104b4 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py -@@ -5,6 +5,8 @@ import logging +@@ -12,6 +12,8 @@ import logging import operator import os import shutil @@ -11,9 +22,9 @@ index 1279d4a..aeb9d26 100644 from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources -@@ -217,6 +219,23 @@ class InstallCommand(RequirementCommand): - +@@ -281,6 +283,23 @@ class InstallCommand(RequirementCommand): def run(self, options, args): + # type: (Values, List[Any]) -> int cmdoptions.check_install_build_global(options) + + def is_venv(): @@ -35,3 +46,6 @@ index 1279d4a..aeb9d26 100644 upgrade_strategy = "to-satisfy-only" if options.upgrade: upgrade_strategy = options.upgrade_strategy +-- +2.20.1 + diff --git a/network-tests.patch b/network-tests.patch new file mode 100644 index 0000000..8acf694 --- /dev/null +++ b/network-tests.patch @@ -0,0 +1,683 @@ +From 621800d5c65aea36c6a1d9b685ff88f35cfce476 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Fri, 15 Nov 2019 19:44:54 +0100 +Subject: [PATCH] Mark 6 tests as network tests + +=================================== FAILURES =================================== +_______________________________ test_freeze_path _______________________________ +tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0') +script = +data = + def test_freeze_path(tmpdir, script, data): + """ + Test freeze with --path. + """ +> script.pip('install', '--find-links', data.find_links, + '--target', tmpdir, 'simple==2.0') +tests/functional/test_freeze.py:712: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +tests/lib/__init__.py:593: in run + _check_stderr( +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" +allow_stderr_warning = False, allow_stderr_error = False + def _check_stderr( + stderr, allow_stderr_warning, allow_stderr_error, + ): + """ + Check the given stderr for logged warnings and errors. + + :param stderr: stderr output as a string. + :param allow_stderr_warning: whether a logged warning (or deprecation + message) is allowed. Must be True if allow_stderr_error is True. + :param allow_stderr_error: whether a logged error is allowed. + """ + assert not (allow_stderr_error and not allow_stderr_warning) + + lines = stderr.splitlines() + for line in lines: + # First check for logging errors, which we don't allow during + # tests even if allow_stderr_error=True (since a logging error + # would signal a bug in pip's code). + # Unlike errors logged with logger.error(), these errors are + # sent directly to stderr and so bypass any configured log formatter. + # The "--- Logging error ---" string is used in Python 3.4+, and + # "Logged from file " is used in Python 2. + if (line.startswith('--- Logging error ---') or + line.startswith('Logged from file ')): + reason = 'stderr has a logging error, which is never allowed' + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_error: + continue + + if line.startswith('ERROR: '): + reason = ( + 'stderr has an unexpected error ' + '(pass allow_stderr_error=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_warning: + continue + + if (line.startswith('WARNING: ') or + line.startswith(DEPRECATION_MSG_PREFIX)): + reason = ( + 'stderr has an unexpected warning ' + '(pass allow_stderr_warning=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) +> raise RuntimeError(msg) +E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): +E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" +E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +tests/lib/__init__.py:404: RuntimeError +________________________ test_freeze_path_exclude_user _________________________ +tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0') +script = +data = + def test_freeze_path_exclude_user(tmpdir, script, data): + """ + Test freeze with --path and make sure packages from --user are not picked + up. + """ + script.pip_install_local('--find-links', data.find_links, + '--user', 'simple2') +> script.pip('install', '--find-links', data.find_links, + '--target', tmpdir, 'simple==1.0') +tests/functional/test_freeze.py:728: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +tests/lib/__init__.py:593: in run + _check_stderr( +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" +allow_stderr_warning = False, allow_stderr_error = False + def _check_stderr( + stderr, allow_stderr_warning, allow_stderr_error, + ): + """ + Check the given stderr for logged warnings and errors. + + :param stderr: stderr output as a string. + :param allow_stderr_warning: whether a logged warning (or deprecation + message) is allowed. Must be True if allow_stderr_error is True. + :param allow_stderr_error: whether a logged error is allowed. + """ + assert not (allow_stderr_error and not allow_stderr_warning) + + lines = stderr.splitlines() + for line in lines: + # First check for logging errors, which we don't allow during + # tests even if allow_stderr_error=True (since a logging error + # would signal a bug in pip's code). + # Unlike errors logged with logger.error(), these errors are + # sent directly to stderr and so bypass any configured log formatter. + # The "--- Logging error ---" string is used in Python 3.4+, and + # "Logged from file " is used in Python 2. + if (line.startswith('--- Logging error ---') or + line.startswith('Logged from file ')): + reason = 'stderr has a logging error, which is never allowed' + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_error: + continue + + if line.startswith('ERROR: '): + reason = ( + 'stderr has an unexpected error ' + '(pass allow_stderr_error=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_warning: + continue + + if (line.startswith('WARNING: ') or + line.startswith(DEPRECATION_MSG_PREFIX)): + reason = ( + 'stderr has an unexpected warning ' + '(pass allow_stderr_warning=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) +> raise RuntimeError(msg) +E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): +E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" +E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +tests/lib/__init__.py:404: RuntimeError +__________________________ test_freeze_path_multiple ___________________________ +tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0') +script = +data = + def test_freeze_path_multiple(tmpdir, script, data): + """ + Test freeze with multiple --path arguments. + """ + path1 = tmpdir / "path1" + os.mkdir(path1) + path2 = tmpdir / "path2" + os.mkdir(path2) +> script.pip('install', '--find-links', data.find_links, + '--target', path1, 'simple==2.0') +tests/functional/test_freeze.py:750: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +tests/lib/__init__.py:593: in run + _check_stderr( +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" +allow_stderr_warning = False, allow_stderr_error = False + def _check_stderr( + stderr, allow_stderr_warning, allow_stderr_error, + ): + """ + Check the given stderr for logged warnings and errors. + + :param stderr: stderr output as a string. + :param allow_stderr_warning: whether a logged warning (or deprecation + message) is allowed. Must be True if allow_stderr_error is True. + :param allow_stderr_error: whether a logged error is allowed. + """ + assert not (allow_stderr_error and not allow_stderr_warning) + + lines = stderr.splitlines() + for line in lines: + # First check for logging errors, which we don't allow during + # tests even if allow_stderr_error=True (since a logging error + # would signal a bug in pip's code). + # Unlike errors logged with logger.error(), these errors are + # sent directly to stderr and so bypass any configured log formatter. + # The "--- Logging error ---" string is used in Python 3.4+, and + # "Logged from file " is used in Python 2. + if (line.startswith('--- Logging error ---') or + line.startswith('Logged from file ')): + reason = 'stderr has a logging error, which is never allowed' + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_error: + continue + + if line.startswith('ERROR: '): + reason = ( + 'stderr has an unexpected error ' + '(pass allow_stderr_error=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) + raise RuntimeError(msg) + if allow_stderr_warning: + continue + + if (line.startswith('WARNING: ') or + line.startswith(DEPRECATION_MSG_PREFIX)): + reason = ( + 'stderr has an unexpected warning ' + '(pass allow_stderr_warning=True to permit this)' + ) + msg = make_check_stderr_message(stderr, line=line, reason=reason) +> raise RuntimeError(msg) +E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): +E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" +E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ +tests/lib/__init__.py:404: RuntimeError +_________________ test_install_no_binary_builds_pep_517_wheel __________________ +script = +data = , with_wheel = None + def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): + to_install = data.packages.joinpath('pep517_setup_and_pyproject') +> res = script.pip( + 'install', '--no-binary=:all:', '-f', data.find_links, to_install + ) +tests/functional/test_install.py:1279: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +self = +args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...) +kw = {'expect_stderr': True} +cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch') +run_from = None, allow_stderr_error = False, allow_stderr_warning = False +expect_error = None + def run(self, *args, **kw): + """ + :param allow_stderr_error: whether a logged error is allowed in + stderr. Passing True for this argument implies + `allow_stderr_warning` since warnings are weaker than errors. + :param allow_stderr_warning: whether a logged warning (or + deprecation message) is allowed in stderr. + :param expect_error: if False (the default), asserts that the command + exits with 0. Otherwise, asserts that the command exits with a + non-zero exit code. Passing True also implies allow_stderr_error + and allow_stderr_warning. + :param expect_stderr: whether to allow warnings in stderr (equivalent + to `allow_stderr_warning`). This argument is an abbreviated + version of `allow_stderr_warning` and is also kept for backwards + compatibility. + """ + if self.verbose: + print('>> running %s %s' % (args, kw)) + + cwd = kw.pop('cwd', None) + run_from = kw.pop('run_from', None) + assert not cwd or not run_from, "Don't use run_from; it's going away" + cwd = cwd or run_from or self.cwd + if sys.platform == 'win32': + # Partial fix for ScriptTest.run using `shell=True` on Windows. + args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] + + # Remove `allow_stderr_error` and `allow_stderr_warning` before + # calling run() because PipTestEnvironment doesn't support them. + allow_stderr_error = kw.pop('allow_stderr_error', None) + allow_stderr_warning = kw.pop('allow_stderr_warning', None) + + # Propagate default values. + expect_error = kw.get('expect_error') + if expect_error: + # Then default to allowing logged errors. + if allow_stderr_error is not None and not allow_stderr_error: + raise RuntimeError( + 'cannot pass allow_stderr_error=False with ' + 'expect_error=True' + ) + allow_stderr_error = True + + elif kw.get('expect_stderr'): + # Then default to allowing logged warnings. + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'expect_stderr=True' + ) + allow_stderr_warning = True + + if allow_stderr_error: + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'allow_stderr_error=True' + ) + + # Default values if not set. + if allow_stderr_error is None: + allow_stderr_error = False + if allow_stderr_warning is None: + allow_stderr_warning = allow_stderr_error + + # Pass expect_stderr=True to allow any stderr. We do this because + # we do our checking of stderr further on in check_stderr(). + kw['expect_stderr'] = True +> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) +E AssertionError: Script returned code: 1 +tests/lib/__init__.py:586: AssertionError +----------------------------- Captured stdout call ----------------------------- +Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject + return code: 1 +-- stderr: -------------------- + ERROR: Command errored out with exit status 1: + command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools + cwd: None + Complete output (28 lines): + Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages + WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ + WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ + WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ + WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ + WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ + Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz + ERROR: Command errored out with exit status 1: + command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info + cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/ + Complete output (15 lines): + Traceback (most recent call last): + File "", line 1, in + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in + from setuptools.extension import Extension, Library + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in + from setuptools.dist import _get_unpatched + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in + from setuptools.command.install import install + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in + from setuptools.command import install_scripts + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in + from pkg_resources import Distribution, PathMetadata, ensure_directory + File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in + register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) + AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' + ---------------------------------------- + ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. + ---------------------------------------- +ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output. +-- stdout: -------------------- +Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages +Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject + Installing build dependencies: started + Installing build dependencies: finished with status 'error' +_______________________ test_config_file_override_stack ________________________ +script = +virtualenv = + def test_config_file_override_stack(script, virtualenv): + """ + Test config files (global, overriding a global config with a + local, overriding all with a command line flag). + + """ + fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-') + try: +> _test_config_file_override_stack(script, virtualenv, config_file) +tests/functional/test_install_config.py:144: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +tests/functional/test_install_config.py:172: in _test_config_file_override_stack + result = script.pip( +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +self = +args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...) +kw = {'expect_stderr': True} +cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch') +run_from = None, allow_stderr_error = False, allow_stderr_warning = False +expect_error = None + def run(self, *args, **kw): + """ + :param allow_stderr_error: whether a logged error is allowed in + stderr. Passing True for this argument implies + `allow_stderr_warning` since warnings are weaker than errors. + :param allow_stderr_warning: whether a logged warning (or + deprecation message) is allowed in stderr. + :param expect_error: if False (the default), asserts that the command + exits with 0. Otherwise, asserts that the command exits with a + non-zero exit code. Passing True also implies allow_stderr_error + and allow_stderr_warning. + :param expect_stderr: whether to allow warnings in stderr (equivalent + to `allow_stderr_warning`). This argument is an abbreviated + version of `allow_stderr_warning` and is also kept for backwards + compatibility. + """ + if self.verbose: + print('>> running %s %s' % (args, kw)) + + cwd = kw.pop('cwd', None) + run_from = kw.pop('run_from', None) + assert not cwd or not run_from, "Don't use run_from; it's going away" + cwd = cwd or run_from or self.cwd + if sys.platform == 'win32': + # Partial fix for ScriptTest.run using `shell=True` on Windows. + args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] + + # Remove `allow_stderr_error` and `allow_stderr_warning` before + # calling run() because PipTestEnvironment doesn't support them. + allow_stderr_error = kw.pop('allow_stderr_error', None) + allow_stderr_warning = kw.pop('allow_stderr_warning', None) + + # Propagate default values. + expect_error = kw.get('expect_error') + if expect_error: + # Then default to allowing logged errors. + if allow_stderr_error is not None and not allow_stderr_error: + raise RuntimeError( + 'cannot pass allow_stderr_error=False with ' + 'expect_error=True' + ) + allow_stderr_error = True + + elif kw.get('expect_stderr'): + # Then default to allowing logged warnings. + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'expect_stderr=True' + ) + allow_stderr_warning = True + + if allow_stderr_error: + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'allow_stderr_error=True' + ) + + # Default values if not set. + if allow_stderr_error is None: + allow_stderr_error = False + if allow_stderr_warning is None: + allow_stderr_warning = allow_stderr_error + + # Pass expect_stderr=True to allow any stderr. We do this because + # we do our checking of stderr further on in check_stderr(). + kw['expect_stderr'] = True +> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) +E AssertionError: Script returned code: 1 +tests/lib/__init__.py:586: AssertionError +----------------------------- Captured stdout call ----------------------------- +Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools + return code: 1 +-- stderr: -------------------- +WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +ERROR: Could not find a version that satisfies the requirement INITools (from versions: none) +ERROR: No matching distribution found for INITools +-- stdout: -------------------- +Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens +Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc +Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' +Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df +Looking in indexes: https://pypi.org/simple/ +1 location(s) to search for versions of INITools: +* https://pypi.org/simple/initools/ +Getting page https://pypi.org/simple/initools/ +Found index url https://pypi.org/simple/ +Looking up "https://pypi.org/simple/initools/" in the cache +Request header has "max_age" as 0, cache bypassed +Starting new HTTPS connection (1): pypi.org:443 +Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None) +Starting new HTTPS connection (2): pypi.org:443 +Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None) +Starting new HTTPS connection (3): pypi.org:443 +Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) +Starting new HTTPS connection (4): pypi.org:443 +Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) +Starting new HTTPS connection (5): pypi.org:443 +Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) +Starting new HTTPS connection (6): pypi.org:443 +Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping +Given no hashes to check 0 links for project 'INITools': discarding no candidates +Cleaning up... +Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' +Exception information: +Traceback (most recent call last): + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main + status = self.run(options, args) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run + resolver.resolve(requirement_set) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve + self._resolve_one(requirement_set, req) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one + abstract_dist = self._get_abstract_dist_for(req_to_install) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for + req.populate_link(self.finder, upgrade_allowed, self.require_hashes) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link + self.link = finder.find_requirement(self, upgrade) + File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement + raise DistributionNotFound( +pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools +_______________________ test_no_upgrade_unless_requested _______________________ +script = + def test_no_upgrade_unless_requested(script): + """ + No upgrade if not specifically requested. + + """ +> script.pip('install', 'INITools==0.1') +tests/functional/test_install_upgrade.py:16: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +self = +args = ('python', '-m', 'pip', 'install', 'INITools==0.1') +kw = {'expect_stderr': True} +cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch') +run_from = None, allow_stderr_error = False, allow_stderr_warning = False +expect_error = None + def run(self, *args, **kw): + """ + :param allow_stderr_error: whether a logged error is allowed in + stderr. Passing True for this argument implies + `allow_stderr_warning` since warnings are weaker than errors. + :param allow_stderr_warning: whether a logged warning (or + deprecation message) is allowed in stderr. + :param expect_error: if False (the default), asserts that the command + exits with 0. Otherwise, asserts that the command exits with a + non-zero exit code. Passing True also implies allow_stderr_error + and allow_stderr_warning. + :param expect_stderr: whether to allow warnings in stderr (equivalent + to `allow_stderr_warning`). This argument is an abbreviated + version of `allow_stderr_warning` and is also kept for backwards + compatibility. + """ + if self.verbose: + print('>> running %s %s' % (args, kw)) + + cwd = kw.pop('cwd', None) + run_from = kw.pop('run_from', None) + assert not cwd or not run_from, "Don't use run_from; it's going away" + cwd = cwd or run_from or self.cwd + if sys.platform == 'win32': + # Partial fix for ScriptTest.run using `shell=True` on Windows. + args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] + + # Remove `allow_stderr_error` and `allow_stderr_warning` before + # calling run() because PipTestEnvironment doesn't support them. + allow_stderr_error = kw.pop('allow_stderr_error', None) + allow_stderr_warning = kw.pop('allow_stderr_warning', None) + + # Propagate default values. + expect_error = kw.get('expect_error') + if expect_error: + # Then default to allowing logged errors. + if allow_stderr_error is not None and not allow_stderr_error: + raise RuntimeError( + 'cannot pass allow_stderr_error=False with ' + 'expect_error=True' + ) + allow_stderr_error = True + + elif kw.get('expect_stderr'): + # Then default to allowing logged warnings. + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'expect_stderr=True' + ) + allow_stderr_warning = True + + if allow_stderr_error: + if allow_stderr_warning is not None and not allow_stderr_warning: + raise RuntimeError( + 'cannot pass allow_stderr_warning=False with ' + 'allow_stderr_error=True' + ) + + # Default values if not set. + if allow_stderr_error is None: + allow_stderr_error = False + if allow_stderr_warning is None: + allow_stderr_warning = allow_stderr_error + + # Pass expect_stderr=True to allow any stderr. We do this because + # we do our checking of stderr further on in check_stderr(). + kw['expect_stderr'] = True +> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) +E AssertionError: Script returned code: 1 +tests/lib/__init__.py:586: AssertionError +----------------------------- Captured stdout call ----------------------------- +Script result: python -m pip install INITools==0.1 + return code: 1 +-- stderr: -------------------- +WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ +ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none) +ERROR: No matching distribution found for INITools==0.1 +--- + tests/functional/test_freeze.py | 3 +++ + tests/functional/test_install.py | 1 + + tests/functional/test_install_config.py | 1 + + tests/functional/test_install_upgrade.py | 1 + + 4 files changed, 6 insertions(+) + +diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py +index 546a482..aabb0ca 100644 +--- a/tests/functional/test_freeze.py ++++ b/tests/functional/test_freeze.py +@@ -705,6 +705,7 @@ def test_freeze_user(script, virtualenv, data): + assert 'simple2' not in result.stdout + + ++@pytest.mark.network + def test_freeze_path(tmpdir, script, data): + """ + Test freeze with --path. +@@ -718,6 +719,7 @@ def test_freeze_path(tmpdir, script, data): + _check_output(result.stdout, expected) + + ++@pytest.mark.network + def test_freeze_path_exclude_user(tmpdir, script, data): + """ + Test freeze with --path and make sure packages from --user are not picked +@@ -739,6 +741,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data): + _check_output(result.stdout, expected) + + ++@pytest.mark.network + def test_freeze_path_multiple(tmpdir, script, data): + """ + Test freeze with multiple --path arguments. +diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py +index 0bea054..b816df6 100644 +--- a/tests/functional/test_install.py ++++ b/tests/functional/test_install.py +@@ -1274,6 +1274,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel): + assert "Running setup.py install for upper" in str(res), str(res) + + ++@pytest.mark.network + def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): + to_install = data.packages.joinpath('pep517_setup_and_pyproject') + res = script.pip( +diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py +index bcf83f1..c9c60a2 100644 +--- a/tests/functional/test_install_config.py ++++ b/tests/functional/test_install_config.py +@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data): + ), 'stdout: {}'.format(result.stdout) + + ++@pytest.mark.network + def test_config_file_override_stack(script, virtualenv): + """ + Test config files (global, overriding a global config with a +diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py +index 36b518b..c34a961 100644 +--- a/tests/functional/test_install_upgrade.py ++++ b/tests/functional/test_install_upgrade.py +@@ -8,6 +8,7 @@ from tests.lib import assert_all_changes, pyversion + from tests.lib.local_repos import local_checkout + + ++@pytest.mark.network + def test_no_upgrade_unless_requested(script): + """ + No upgrade if not specifically requested. +-- +2.20.1 + diff --git a/pip-allow-different-versions.patch b/pip-allow-different-versions.patch index 5b7075d..8b8fa47 100644 --- a/pip-allow-different-versions.patch +++ b/pip-allow-different-versions.patch @@ -1,20 +1,23 @@ ---- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200 -+++ pip3 2018-05-04 11:49:08.098821010 +0200 -@@ -4,7 +4,16 @@ +--- /usr/bin/pip3 2019-11-12 17:37:34.793131862 +0100 ++++ pip3 2019-11-12 17:40:42.014107134 +0100 +@@ -2,7 +2,19 @@ + # -*- coding: utf-8 -*- import re import sys - --from pip._internal import main +-from pip._internal.main import main +try: -+ from pip._internal import main ++ from pip._internal.main import main +except ImportError: -+ # user has most probably downgraded pip in their home -+ # so let them run it anyway until ~/.local/bin makes it in front of the PATH -+ from pip import main -+else: -+ # user might also upgraded pip... -+ if hasattr(main, 'main'): -+ main = main.main - ++ try: ++ # If the user has downgraded pip, the above import will fail. ++ # Let's try older methods of invoking it: ++ ++ # pip 19 uses this ++ from pip._internal import main ++ except ImportError: ++ # older pip versions use this ++ from pip import main ++ if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/python-pip.spec b/python-pip.spec index 8979134..e51a78c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,35 +15,35 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.2.3 -Release: 2%{?dist} +Version: 19.3.1 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. # Here is the list of the libraries with corresponding licenses: # appdirs: MIT +# certifi: MPLv2.0 +# chardet: LGPLv2 +# colorama: BSD +# CacheControl: ASL 2.0 +# contextlib2: Python # distlib: Python # distro: ASL 2.0 # html5lib: MIT -# six: MIT -# colorama: BSD -# CacheControl: ASL 2.0 -# msgpack-python: ASL 2.0 -# lockfile: MIT -# progress: ISC +# idna: BSD # ipaddress: Python +# msgpack: ASL 2.0 # packaging: ASL 2.0 or BSD # pep517: MIT +# progress: ISC # pyparsing: MIT # pytoml: MIT -# retrying: ASL 2.0 # requests: ASL 2.0 -# chardet: LGPLv2 -# idna: BSD -# urllib3: MIT -# certifi: MPLv2.0 +# retrying: ASL 2.0 # setuptools: MIT +# six: MIT +# urllib3: MIT # webencodings: BSD License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) @@ -62,6 +62,7 @@ BuildRequires: python-wheel-wheel # to get tests: # git clone https://github.com/pypa/pip && cd pip +# VERSION= # define the version you want # git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/ %if %{with tests} Source1: pip-%{version}-tests.tar.gz @@ -73,9 +74,6 @@ Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_com Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz %endif -# Fix expected output in test to not break with alpha/beta/rc Python versions -Patch0: https://github.com/pypa/pip/pull/6788.patch - # Downstream only patch # Emit a warning to the user if pip install is run with root privileges # Issue upstream: https://github.com/pypa/pip/issues/4288 @@ -93,6 +91,12 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch +%if %{with tests} +# Mark tests that need the Internet as network tests so we can skip them +# https://github.com/pypa/pip/pull/7359 +Patch5: network-tests.patch +%endif + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -125,26 +129,26 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 -Provides: bundled(python%{1}dist(certifi)) = 2019.6.16 +Provides: bundled(python%{1}dist(certifi)) = 2019.9.11 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 Provides: bundled(python%{1}dist(colorama)) = 0.4.1 +Provides: bundled(python%{1}dist(contextlib2)) = 0.6.0 Provides: bundled(python%{1}dist(distlib)) = 0.2.9.post0 Provides: bundled(python%{1}dist(distro)) = 1.4.0 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 Provides: bundled(python%{1}dist(idna)) = 2.8 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 -Provides: bundled(python%{1}dist(lockfile)) = 0.12.2 -Provides: bundled(python%{1}dist(msgpack)) = 0.6.1 -Provides: bundled(python%{1}dist(packaging)) = 19.0 -Provides: bundled(python%{1}dist(pep517)) = 0.5.0 +Provides: bundled(python%{1}dist(msgpack)) = 0.6.2 +Provides: bundled(python%{1}dist(packaging)) = 19.2 +Provides: bundled(python%{1}dist(pep517)) = 0.7.0 Provides: bundled(python%{1}dist(progress)) = 1.5 -Provides: bundled(python%{1}dist(pyparsing)) = 2.4.0 -Provides: bundled(python%{1}dist(pytoml)) = 0.1.20 +Provides: bundled(python%{1}dist(pyparsing)) = 2.4.2 +Provides: bundled(python%{1}dist(pytoml)) = 0.1.21 Provides: bundled(python%{1}dist(requests)) = 2.22.0 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 41.0.1 +Provides: bundled(python%{1}dist(setuptools)) = 41.4.0 Provides: bundled(python%{1}dist(six)) = 1.12.0 -Provides: bundled(python%{1}dist(urllib3)) = 1.25.3 +Provides: bundled(python%{1}dist(urllib3)) = 1.25.6 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -243,11 +247,13 @@ mv python-docs-theme-2018.2 python-docs-theme popd %endif -%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 +%if %{with tests} +%patch5 -p1 +%endif # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -376,6 +382,10 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 +- Update to 19.3.1 (#1761508) +- Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions + * Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 - Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index c93a887..ec44270 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,29 +1,34 @@ -commit b6d5da6796801862eb751a93d507c343af0604d6 -Author: Victor Stinner -Date: Tue Sep 18 17:13:51 2018 +0200 +From 8c58a99221415ca7c3d5ce50dcffefa14e421928 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 12 Nov 2019 17:24:20 +0100 +Subject: [PATCH] Subject: Prevent removing of the system packages installed + under /usr/lib - Subject: Prevent removing of the system packages installed under /usr/lib - - when pip install -U is executed. - - Resolves: rhbz#1550368 - - Co-Authored-By: Michal Cyprian +when pip install -U is executed. + +Resolves: rhbz#1550368 + +Co-Authored-By: Michal Cyprian +Co-Authored-By: Victor Stinner +--- + src/pip/_internal/legacy_resolve.py | 5 ++++- + src/pip/_internal/req/req_install.py | 3 ++- + src/pip/_internal/utils/misc.py | 11 +++++++++++ + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/legacy_resolve.py b/src/pip/_internal/legacy_resolve.py -index 1d9229cb..3088d22d 100644 +index c24158f..bd92287 100644 --- a/src/pip/_internal/legacy_resolve.py +++ b/src/pip/_internal/legacy_resolve.py -@@ -24,7 +24,7 @@ from pip._internal.exceptions import ( - from pip._internal.req.constructors import install_req_from_req_string +@@ -30,6 +30,7 @@ from pip._internal.exceptions import ( + ) from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import ( -- dist_in_usersite, ensure_dir, normalize_version_info, -+ dist_in_install_path, dist_in_usersite, ensure_dir, normalize_version_info, - ) - from pip._internal.utils.packaging import ( - check_requires_python, get_requires_python, -@@ -219,7 +219,9 @@ class Resolver(object): ++ dist_in_install_path, + dist_in_usersite, + ensure_dir, + normalize_version_info, +@@ -224,7 +225,9 @@ class Resolver(object): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -35,19 +40,18 @@ index 1d9229cb..3088d22d 100644 req.satisfied_by = None diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index f5c93504..1096c397 100644 +index 5a8c0dc..f80ba87 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -27,7 +27,7 @@ from pip._internal.utils.logging import indent_log - from pip._internal.utils.marker_files import PIP_DELETE_MARKER_FILENAME - from pip._internal.utils.misc import ( - _make_build_dir, ask_path_exists, backup_dir, call_subprocess, -- display_path, dist_in_site_packages, dist_in_usersite, ensure_dir, -+ display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir, - get_installed_version, redact_password_from_url, rmtree, - ) - from pip._internal.utils.packaging import get_metadata -@@ -427,7 +427,7 @@ class InstallRequirement(object): +@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( + ask_path_exists, + backup_dir, + display_path, ++ dist_in_install_path, + dist_in_site_packages, + dist_in_usersite, + ensure_dir, +@@ -461,7 +462,7 @@ class InstallRequirement(object): "lack sys.path precedence to %s in %s" % (existing_dist.project_name, existing_dist.location) ) @@ -57,20 +61,19 @@ index f5c93504..1096c397 100644 return True diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 61f74dc8..ffa8042c 100644 +index b848263..5b75fed 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -30,7 +30,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote - +@@ -28,6 +28,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote from pip import __version__ - from pip._internal.exceptions import CommandError, InstallationError --from pip._internal.locations import site_packages, user_site -+from pip._internal.locations import distutils_scheme, site_packages, user_site - from pip._internal.utils.compat import ( - WINDOWS, console_to_str, expanduser, stdlib_pkgs, str_to_display, - ) -@@ -454,6 +454,16 @@ def dist_in_site_packages(dist): - ).startswith(normalize_path(site_packages)) + from pip._internal.exceptions import CommandError + from pip._internal.locations import ( ++ distutils_scheme, + get_major_minor_version, + site_packages, + user_site, +@@ -389,6 +390,16 @@ def dist_in_site_packages(dist): + return dist_location(dist).startswith(normalize_path(site_packages)) +def dist_in_install_path(dist): @@ -86,3 +89,6 @@ index 61f74dc8..ffa8042c 100644 def dist_is_editable(dist): # type: (Distribution) -> bool """ +-- +2.20.1 + diff --git a/sources b/sources index bac5521..e005a9b 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.2.3.tar.gz) = 64ab4ece6da526c9d1b24e73a9c0ca0a38d0fb1525bf9981177342a8b0902ae825ec8f3dabd9ce00dcf0f010aaabf4177c9146084668ce505e0c382c322948c8 -SHA512 (pip-19.2.3-tests.tar.gz) = d4052d83e20fe276d251a80d8d33c33568570d5f26038847f0e5fba34a48ae3d5318b31439f8582d337245f38472495db221d7f4bf39eb9c98181f2f8aecad36 +SHA512 (pip-19.3.1.tar.gz) = 954b390580e23d0a85d1fa4cbd2f35171df7930fbe346f9a809477fe133e95f7d30208d79b5d07f30c81ab1b0a9b52f36f3ff6c77dc81a1c9ab9beb2bd8e0aa1 +SHA512 (pip-19.3.1-tests.tar.gz) = fb058fcaaff3325341af5f4746be0c7943953c43fb721124758320363532911ca399f254a58e347c72795adc41764600bc6d02efce0e1e27d4b6d130efad9945 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From af087f805400df26520119d1343ecd6f9ef6ed35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 11 Dec 2019 16:10:22 +0100 Subject: [PATCH 126/287] Patch new pip to make it support the old private API of main() This is needed to be able to use pip 19.3+ in ensurepip of older Pythons without patching all the Pythons. --- callable-main.patch | 28 ++++++++++++++++++++++++++++ python-pip.spec | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 callable-main.patch diff --git a/callable-main.patch b/callable-main.patch new file mode 100644 index 0000000..c58c8b3 --- /dev/null +++ b/callable-main.patch @@ -0,0 +1,28 @@ +diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py +index 8c0e4c58..76e280e5 100755 +--- a/src/pip/_internal/__init__.py ++++ b/src/pip/_internal/__init__.py +@@ -1,2 +1,3 @@ + #!/usr/bin/env python + import pip._internal.utils.inject_securetransport # noqa ++from pip._internal import main # noqa +diff --git a/src/pip/_internal/main.py b/src/pip/_internal/main.py +index 1e922402..e52e04d8 100644 +--- a/src/pip/_internal/main.py ++++ b/src/pip/_internal/main.py +@@ -45,3 +45,15 @@ def main(args=None): + command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) + + return command.main(cmd_args) ++ ++ ++# Dark magic to make the main module itself callable. ++# This is needed to be able to use this pip in ensurepip of older Pythons ++# without patching all the Pythons. ++ ++class _CallableModule(sys.modules[__name__].__class__): ++ def __call__(self, *args, **kwargs): ++ return main(*args, **kwargs) ++ ++ ++sys.modules[__name__].__class__ = _CallableModule diff --git a/python-pip.spec b/python-pip.spec index e51a78c..743e3ab 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -97,6 +97,15 @@ Patch4: dummy-certifi.patch Patch5: network-tests.patch %endif +# Dark magic to make pip 19.3+ support the old private API of main() +# This is needed to be able to use pip 19.3+ in ensurepip of older Pythons +# without patching all the Pythons +# A proper fix is discussed in: +# https://discuss.python.org/t/can-we-finally-add-a-minimal-api-to-pip/2833/3 +# https://github.com/pypa/pip/pull/7061 +# https://github.com/python/cpython/pull/16782 +Patch6: callable-main.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -254,6 +263,7 @@ popd %if %{with tests} %patch5 -p1 %endif +%patch6 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem From 184dcf3cac6ddc9a3a50f2cf30b09ae4ac0c2c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 11 Dec 2019 17:30:22 +0100 Subject: [PATCH 127/287] Callable main module patch: Support Python 2.7 Intentionally left out as a separate commit, so it can be reverted once Python 2 support is dropped. --- callable-main.patch | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/callable-main.patch b/callable-main.patch index c58c8b3..9a4cdf4 100644 --- a/callable-main.patch +++ b/callable-main.patch @@ -7,10 +7,10 @@ index 8c0e4c58..76e280e5 100755 import pip._internal.utils.inject_securetransport # noqa +from pip._internal import main # noqa diff --git a/src/pip/_internal/main.py b/src/pip/_internal/main.py -index 1e922402..e52e04d8 100644 +index 1e922402..d3df58b3 100644 --- a/src/pip/_internal/main.py +++ b/src/pip/_internal/main.py -@@ -45,3 +45,15 @@ def main(args=None): +@@ -45,3 +45,30 @@ def main(args=None): command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) return command.main(cmd_args) @@ -20,9 +20,24 @@ index 1e922402..e52e04d8 100644 +# This is needed to be able to use this pip in ensurepip of older Pythons +# without patching all the Pythons. + -+class _CallableModule(sys.modules[__name__].__class__): ++# In Python 3.5+, we can just inherit, define __call__ and override ++# sys.modules[__name__].__class__, however, that is not possible in 2.7. ++ ++class _CallableModule(type(sys.modules[__name__])): ++ def __init__(self): ++ super(_CallableModule, self).__init__(__name__) ++ self._main = sys.modules[__name__] ++ sys.modules[__name__] = self ++ self.__doc__ = self._main.__doc__ ++ + def __call__(self, *args, **kwargs): + return main(*args, **kwargs) + ++ def __dir__(self): ++ return dir(self._main) + -+sys.modules[__name__].__class__ = _CallableModule ++ def __getattr__(self, attr): ++ return getattr(self._main, attr) ++ ++ ++_CallableModule() From c9ae8104833d8d8efb492182445fd1dbac4e6716 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 14:04:40 +0000 Subject: [PATCH 128/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 743e3ab..9aad3fa 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -392,6 +392,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 - Update to 19.3.1 (#1761508) - Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions From f994ff1cc7e27341709628dd70f16662d678cf27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 4 Mar 2020 12:20:06 +0100 Subject: [PATCH 129/287] Update to 20.0.2 Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1793456 The main() wrapper moved the import path again, this time with compatibility shim: - we still need pip-allow-different-versions.patch to support older pips installed by users - we dropped callable-main.patch - the shim is provided by pip for all previous paths - no need to patch older pips to support user installed pip 20+ - no need to patch Pythons (or virtualenv) to support pip 20+ wheel in ensurepip --- .gitignore | 49 +- callable-main.patch | 43 - ...ng-when-running-with-root-privileges.patch | 8 +- pip-allow-different-versions.patch | 24 +- python-pip.spec | 53 +- ...existing-dist-only-if-path-conflicts.patch | 40 +- skip-network-tests.patch | 1055 ----------------- sources | 4 +- 8 files changed, 68 insertions(+), 1208 deletions(-) delete mode 100644 callable-main.patch delete mode 100644 skip-network-tests.patch diff --git a/.gitignore b/.gitignore index d3d7fdd..8e24ed4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,7 @@ -pip-0.7.2.tar.gz -/pip-0.8.tar.gz -/pip-0.8.2.tar.gz -/pip-0.8.3.tar.gz -/pip-1.0.2.tar.gz -/pip-1.1.tar.gz -/pip-1.3.1.tar.gz -/pip-1.4.1.tar.gz -/pip-1.5.4.tar.gz -/pip-1.5.6.tar.gz -/pip-1.5.6-tests.tar.gz -/pip-6.0.8.tar.gz -/pip-7.0.3.tar.gz -/pip-7.1.0.tar.gz -/pip-7.1.0-tests.tar.gz -/pip-8.0.2.tar.gz -/pip-8.1.2.tar.gz -/pip-8.1.2-tests.tar.gz -/pip-9.0.1.tar.gz -/pip-9.0.1-tests.tar.gz -/pip-9.0.3.tar.gz -/pip-9.0.3-tests.tar.gz -/pip-10.0.1.tar.gz -/pip-18.0.tar.gz -/d2e63fbfc62af3b7050f619b2f5bb8658985b931.zip -/2018.2.tar.gz -/pip-18.0-tests.tar.gz -/d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz -/pip-18.1.tar.gz -/pip-18.1-tests.tar.gz -/pip-19.0.2.tar.gz -/pip-19.0.2-tests.tar.gz -/pip-19.0.3.tar.gz -/pip-19.0.3-tests.tar.gz -/pip-19.1.tar.gz -/pip-19.1-tests.tar.gz -/pip-19.1.1.tar.gz -/pip-19.1.1-tests.tar.gz -/pip-19.2.3.tar.gz -/pip-19.2.3-tests.tar.gz -/pip-19.3.1.tar.gz -/pip-19.3.1-tests.tar.gz +/*.tar.gz +/*.zip +/pip-*/ +/pip/ +/results_python-pip/ +*.rpm + diff --git a/callable-main.patch b/callable-main.patch deleted file mode 100644 index 9a4cdf4..0000000 --- a/callable-main.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 8c0e4c58..76e280e5 100755 ---- a/src/pip/_internal/__init__.py -+++ b/src/pip/_internal/__init__.py -@@ -1,2 +1,3 @@ - #!/usr/bin/env python - import pip._internal.utils.inject_securetransport # noqa -+from pip._internal import main # noqa -diff --git a/src/pip/_internal/main.py b/src/pip/_internal/main.py -index 1e922402..d3df58b3 100644 ---- a/src/pip/_internal/main.py -+++ b/src/pip/_internal/main.py -@@ -45,3 +45,30 @@ def main(args=None): - command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) - - return command.main(cmd_args) -+ -+ -+# Dark magic to make the main module itself callable. -+# This is needed to be able to use this pip in ensurepip of older Pythons -+# without patching all the Pythons. -+ -+# In Python 3.5+, we can just inherit, define __call__ and override -+# sys.modules[__name__].__class__, however, that is not possible in 2.7. -+ -+class _CallableModule(type(sys.modules[__name__])): -+ def __init__(self): -+ super(_CallableModule, self).__init__(__name__) -+ self._main = sys.modules[__name__] -+ sys.modules[__name__] = self -+ self.__doc__ = self._main.__doc__ -+ -+ def __call__(self, *args, **kwargs): -+ return main(*args, **kwargs) -+ -+ def __dir__(self): -+ return dir(self._main) -+ -+ def __getattr__(self, attr): -+ return getattr(self._main, attr) -+ -+ -+_CallableModule() diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index c782610..ded5884 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -10,19 +10,19 @@ Issue upstream: https://github.com/pypa/pip/issues/4288 1 file changed, 19 insertions(+) diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 5842d18..a6104b4 100644 +index 02a187c..8037ffb 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py -@@ -12,6 +12,8 @@ import logging - import operator +@@ -13,6 +13,8 @@ import operator import os import shutil + import site +import sys +from os import path from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources -@@ -281,6 +283,23 @@ class InstallCommand(RequirementCommand): +@@ -242,6 +244,23 @@ class InstallCommand(RequirementCommand): def run(self, options, args): # type: (Values, List[Any]) -> int cmdoptions.check_install_build_global(options) diff --git a/pip-allow-different-versions.patch b/pip-allow-different-versions.patch index 8b8fa47..4a11517 100644 --- a/pip-allow-different-versions.patch +++ b/pip-allow-different-versions.patch @@ -1,22 +1,26 @@ --- /usr/bin/pip3 2019-11-12 17:37:34.793131862 +0100 +++ pip3 2019-11-12 17:40:42.014107134 +0100 -@@ -2,7 +2,19 @@ +@@ -2,7 +2,23 @@ # -*- coding: utf-8 -*- import re import sys --from pip._internal.main import main +-from pip._internal.cli.main import main ++ +try: -+ from pip._internal.main import main ++ from pip._internal.cli.main import main +except ImportError: + try: -+ # If the user has downgraded pip, the above import will fail. -+ # Let's try older methods of invoking it: -+ -+ # pip 19 uses this -+ from pip._internal import main ++ from pip._internal.main import main + except ImportError: -+ # older pip versions use this -+ from pip import main ++ try: ++ # If the user has downgraded pip, the above import will fail. ++ # Let's try older methods of invoking it: ++ ++ # pip 19 uses this ++ from pip._internal import main ++ except ImportError: ++ # older pip versions use this ++ from pip import main + if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) diff --git a/python-pip.spec b/python-pip.spec index 9aad3fa..4aaea41 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,8 +15,8 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 19.3.1 -Release: 2%{?dist} +Version: 20.0.2 +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -91,21 +91,6 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch -%if %{with tests} -# Mark tests that need the Internet as network tests so we can skip them -# https://github.com/pypa/pip/pull/7359 -Patch5: network-tests.patch -%endif - -# Dark magic to make pip 19.3+ support the old private API of main() -# This is needed to be able to use pip 19.3+ in ensurepip of older Pythons -# without patching all the Pythons -# A proper fix is discussed in: -# https://discuss.python.org/t/can-we-finally-add-a-minimal-api-to-pip/2833/3 -# https://github.com/pypa/pip/pull/7061 -# https://github.com/python/cpython/pull/16782 -Patch6: callable-main.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -123,6 +108,10 @@ Patch6: callable-main.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1767212 # WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! # %%patch10 doesn't work outside of %%prep, so we add it as a source +# Note that since pip 20, old main() import paths are preserved for backwards +# compatibility: https://github.com/pypa/pip/issues/7498 +# Meaning we don't need to update any of the older pips to support 20+ +# We also don't need to update Pythons to use new import path in ensurepip Source10: pip-allow-different-versions.patch %description @@ -137,27 +126,27 @@ Packages" or "Pip Installs Python". # You can find the versions in src/pip/_vendor/vendor.txt file. %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 -Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5 -Provides: bundled(python%{1}dist(certifi)) = 2019.9.11 +Provides: bundled(python%{1}dist(CacheControl)) = 0.12.6 +Provides: bundled(python%{1}dist(certifi)) = 2019.11.28 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 -Provides: bundled(python%{1}dist(colorama)) = 0.4.1 +Provides: bundled(python%{1}dist(colorama)) = 0.4.3 Provides: bundled(python%{1}dist(contextlib2)) = 0.6.0 -Provides: bundled(python%{1}dist(distlib)) = 0.2.9.post0 +Provides: bundled(python%{1}dist(distlib)) = 0.3.0 Provides: bundled(python%{1}dist(distro)) = 1.4.0 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 Provides: bundled(python%{1}dist(idna)) = 2.8 -Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22 +Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 Provides: bundled(python%{1}dist(msgpack)) = 0.6.2 -Provides: bundled(python%{1}dist(packaging)) = 19.2 +Provides: bundled(python%{1}dist(packaging)) = 20.1 Provides: bundled(python%{1}dist(pep517)) = 0.7.0 Provides: bundled(python%{1}dist(progress)) = 1.5 -Provides: bundled(python%{1}dist(pyparsing)) = 2.4.2 +Provides: bundled(python%{1}dist(pyparsing)) = 2.4.6 Provides: bundled(python%{1}dist(pytoml)) = 0.1.21 Provides: bundled(python%{1}dist(requests)) = 2.22.0 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 41.4.0 -Provides: bundled(python%{1}dist(six)) = 1.12.0 -Provides: bundled(python%{1}dist(urllib3)) = 1.25.6 +Provides: bundled(python%{1}dist(setuptools)) = 44.0.0 +Provides: bundled(python%{1}dist(six)) = 1.14.0 +Provides: bundled(python%{1}dist(urllib3)) = 1.25.7 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -195,6 +184,7 @@ BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-freezegun BuildRequires: python%{python3_pkgversion}-scripttest BuildRequires: python%{python3_pkgversion}-virtualenv +BuildRequires: python%{python3_pkgversion}-werkzeug BuildRequires: python%{python3_pkgversion}-pyyaml %endif BuildRequires: python%{python3_pkgversion}-wheel @@ -260,10 +250,6 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 -%if %{with tests} -%patch5 -p1 -%endif -%patch6 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -331,7 +317,7 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 # Make sure the INSTALLER is not pip, otherwise Patch2 won't work -# TODO Maybe we should make all our python packages have this? +# %%pyproject macros do this for all packages echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER mkdir -p %{buildroot}%{python_wheeldir} @@ -392,6 +378,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 +- Update to 20.0.2 (#1793456) + * Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index ec44270..eb7b622 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From 8c58a99221415ca7c3d5ce50dcffefa14e421928 Mon Sep 17 00:00:00 2001 +From b46ec3663c0535fc40503fe9a78b1b7733281bdf Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 12 Nov 2019 17:24:20 +0100 Subject: [PATCH] Subject: Prevent removing of the system packages installed @@ -17,18 +17,18 @@ Co-Authored-By: Victor Stinner 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/legacy_resolve.py b/src/pip/_internal/legacy_resolve.py -index c24158f..bd92287 100644 +index ca269121..e8d939bf 100644 --- a/src/pip/_internal/legacy_resolve.py +++ b/src/pip/_internal/legacy_resolve.py @@ -30,6 +30,7 @@ from pip._internal.exceptions import ( ) from pip._internal.utils.logging import indent_log - from pip._internal.utils.misc import ( -+ dist_in_install_path, - dist_in_usersite, - ensure_dir, - normalize_version_info, -@@ -224,7 +225,9 @@ class Resolver(object): + from pip._internal.utils.misc import dist_in_usersite, normalize_version_info ++from pip._internal.utils.misc import dist_in_install_path + from pip._internal.utils.packaging import ( + check_requires_python, + get_requires_python, +@@ -199,7 +200,9 @@ class Resolver(object): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -36,35 +36,35 @@ index c24158f..bd92287 100644 + if ((not self.use_user_site + or dist_in_usersite(req.satisfied_by)) + and dist_in_install_path(req.satisfied_by)): - req.conflicts_with = req.satisfied_by + req.should_reinstall = True req.satisfied_by = None diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 5a8c0dc..f80ba87 100644 +index 22ac24b9..8a461b95 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( +@@ -42,6 +42,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, + dist_in_install_path, dist_in_site_packages, dist_in_usersite, - ensure_dir, -@@ -461,7 +462,7 @@ class InstallRequirement(object): + get_installed_version, +@@ -457,7 +458,7 @@ class InstallRequirement(object): "lack sys.path precedence to %s in %s" % (existing_dist.project_name, existing_dist.location) ) - else: + elif dist_in_install_path(existing_dist): - self.conflicts_with = existing_dist - return True - + self.should_reinstall = True + else: + if self.editable and self.satisfied_by: diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index b848263..5b75fed 100644 +index 4a581601..2617ad33 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -28,6 +28,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote +@@ -29,6 +29,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote from pip import __version__ from pip._internal.exceptions import CommandError from pip._internal.locations import ( @@ -72,7 +72,7 @@ index b848263..5b75fed 100644 get_major_minor_version, site_packages, user_site, -@@ -389,6 +390,16 @@ def dist_in_site_packages(dist): +@@ -385,6 +386,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) @@ -90,5 +90,5 @@ index b848263..5b75fed 100644 # type: (Distribution) -> bool """ -- -2.20.1 +2.24.1 diff --git a/skip-network-tests.patch b/skip-network-tests.patch deleted file mode 100644 index 9dec67e..0000000 --- a/skip-network-tests.patch +++ /dev/null @@ -1,1055 +0,0 @@ -diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py ---- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 -+++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 -@@ -1,6 +1,7 @@ - import sys - import re - import textwrap -+import pytest - from doctest import OutputChecker, ELLIPSIS - - from tests.lib.local_repos import local_checkout, local_repo -@@ -58,6 +59,7 @@ def test_freeze_basic(script): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_svn(script, tmpdir): - """Test freezing a svn checkout""" - -@@ -79,6 +81,7 @@ def test_freeze_svn(script, tmpdir): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_git_clone(script, tmpdir): - """ - Test freezing a Git clone. -@@ -109,6 +112,7 @@ def test_freeze_git_clone(script, tmpdir - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_mercurial_clone(script, tmpdir): - """ - Test freezing a Mercurial clone. -@@ -140,6 +144,7 @@ def test_freeze_mercurial_clone(script, - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_bazaar_clone(script, tmpdir): - """ - Test freezing a Bazaar clone. -@@ -175,6 +180,7 @@ def test_freeze_bazaar_clone(script, tmp - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_local_option(script): - """ - Test that wsgiref (from global site-packages) is reported normally, but not with --local. -@@ -205,6 +211,7 @@ def test_freeze_with_local_option(script - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_requirement_option(script): - """ - Test that new requirements are created correctly with --requirement hints -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-11-27 11:23:20.863671103 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-11-27 14:25:05.086297126 +0100 -@@ -1,4 +1,5 @@ - import os -+import pytest - - from os.path import abspath, exists, join - -@@ -20,6 +21,7 @@ def test_cleanup_after_install(script, d - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_install(script, data): - """ - Test --no-clean option blocks cleaning after install -@@ -29,6 +31,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_after_install_editable_from_hg(script, tmpdir): - """ - Test clean up after cloning from Mercurial. -@@ -87,6 +90,7 @@ def test_cleanup_req_satisifed_no_name(s - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_not_delete_existing_build_dir(script): - """ - It should not delete build/ if existing before run the command -@@ -123,6 +127,7 @@ def test_cleanup_after_egg_info_exceptio - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_prevented_upon_build_dir_exception(script, data): - """ - Test no cleanup occurs after a PreviousBuildDirError -diff -up pip-1.5.6/tests/functional/test_install_compat.py.orig pip-1.5.6/tests/functional/test_install_compat.py ---- pip-1.5.6/tests/functional/test_install_compat.py.orig 2014-11-27 11:23:20.912671389 +0100 -+++ pip-1.5.6/tests/functional/test_install_compat.py 2014-11-27 11:30:36.533251976 +0100 -@@ -3,9 +3,11 @@ Tests for compatibility workarounds. - - """ - import os -+import pytest - from tests.lib import pyversion, assert_all_changes - - -+@pytest.mark.skipif(True, reason='No network') - def test_debian_egg_name_workaround(script): - """ - We can uninstall packages installed with the pyversion removed from the -diff -up pip-1.5.6/tests/functional/test_install_config.py.orig pip-1.5.6/tests/functional/test_install_config.py ---- pip-1.5.6/tests/functional/test_install_config.py.orig 2014-11-27 11:23:20.920671436 +0100 -+++ pip-1.5.6/tests/functional/test_install_config.py 2014-11-27 11:30:03.530051860 +0100 -@@ -1,7 +1,7 @@ - import os - import tempfile - import textwrap -- -+import pytest - - def test_options_from_env_vars(script): - """ -@@ -28,6 +28,7 @@ def test_command_line_options_override_e - assert "Getting page http://download.zope.org/ppix" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_env_vars_override_config_file(script, virtualenv): - """ - Test that environmental variables override settings in config files. -@@ -62,6 +63,7 @@ def _test_env_vars_override_config_file( - assert "Successfully installed INITools" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_append_flags(script, virtualenv, data): - """ - Test command line flags that append to defaults set by environmental variables. -@@ -76,6 +78,7 @@ def test_command_line_append_flags(scrip - assert "Skipping link %s" % data.find_links in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_appends_correctly(script, data): - """ - Test multiple appending options set by environmental variables. -diff -up pip-1.5.6/tests/functional/test_install_download.py.orig pip-1.5.6/tests/functional/test_install_download.py ---- pip-1.5.6/tests/functional/test_install_download.py.orig 2014-11-27 11:23:20.970671729 +0100 -+++ pip-1.5.6/tests/functional/test_install_download.py 2014-11-27 11:29:42.503924368 +0100 -@@ -1,9 +1,11 @@ - import os - import textwrap -+import pytest - - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_if_requested(script): - """ - It should download (in the scratch path) and not install if requested. -@@ -13,6 +15,7 @@ def test_download_if_requested(script): - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_wheel(script): - """ - Test using "pip install --download" to download a *.whl archive. -@@ -26,6 +29,7 @@ def test_download_wheel(script): - assert script.site_packages/ 'piptestpackage' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_single_download_from_requirements_file(script): - """ - It should support download (in the scratch path) from PyPi from a requirements file -@@ -38,6 +42,7 @@ def test_single_download_from_requiremen - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_download_dependencies(script): - """ - It should download dependencies (in the scratch path) -@@ -77,6 +82,7 @@ def test_download_should_download_wheel_ - assert Path('scratch') / dep_filename in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_skip_existing_files(script): - """ - It should not download files already existing in the scratch dir -diff -up pip-1.5.6/tests/functional/test_install_extras.py.orig pip-1.5.6/tests/functional/test_install_extras.py ---- pip-1.5.6/tests/functional/test_install_extras.py.orig 2014-11-27 11:23:21.066672291 +0100 -+++ pip-1.5.6/tests/functional/test_install_extras.py 2014-11-27 11:31:01.854405511 +0100 -@@ -1,6 +1,8 @@ -+import pytest - from os.path import join - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_extras_install_from_pypi(script): - """ - Test installing a package from PyPI using extras dependency Paste[openid]. -@@ -10,6 +12,7 @@ def test_simple_extras_install_from_pypi - assert initools_folder in result.files_created, result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_extras_uninstall(script): - """ - No extras dependency gets uninstalled when the root package is uninstalled -diff -up pip-1.5.6/tests/functional/test_install.py.orig pip-1.5.6/tests/functional/test_install.py ---- pip-1.5.6/tests/functional/test_install.py.orig 2014-11-27 11:23:20.227667380 +0100 -+++ pip-1.5.6/tests/functional/test_install.py 2014-11-27 11:23:20.825670880 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_without_setuptools(script): - script.run("pip", "uninstall", "setuptools", "-y") - result = script.run( -@@ -26,6 +27,7 @@ def test_without_setuptools(script): - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_second_command_line_interface_works(script): - """ - Check if ``pip`` commands behaves equally -@@ -39,6 +41,7 @@ def test_pip_second_command_line_interfa - assert initools_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_from_pypi(script): - """ - Test installing a package from PyPI. -@@ -60,6 +63,7 @@ def test_editable_install(script): - assert not result.files_updated, result.files_updated - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_svn(script, tmpdir): - """ - Test checking out from svn. -@@ -71,6 +75,7 @@ def test_install_editable_from_svn(scrip - result.assert_installed('INITools', with_files=['.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_editable_to_custom_path(script, tmpdir): - """ - Test downloading an editable using a relative custom src folder. -@@ -94,6 +99,7 @@ def test_download_editable_to_custom_pat - assert customdl_files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_editable_no_install_followed_by_no_download(script, tmpdir): - """ - Test installing an editable in two steps (first with --no-install, then with --no-download). -@@ -113,6 +119,7 @@ def test_editable_no_install_followed_by - result.assert_installed('INITools', without_files=[curdir, '.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_followed_by_no_download(script): - """ - Test installing in two steps (first with --no-install, then with --no-download). -@@ -143,6 +150,7 @@ def test_bad_install_with_no_download(sc - "an equivalent install with --no-install?" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_dev_version_from_pypi(script): - """ - Test using package==dev. -@@ -154,6 +162,7 @@ def test_install_dev_version_from_pypi(s - assert (script.site_packages / 'initools') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git(script, tmpdir): - """ - Test cloning from Git. -@@ -166,6 +175,7 @@ def test_install_editable_from_git(scrip - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_hg(script, tmpdir): - """ - Test cloning from Mercurial. -@@ -177,6 +187,7 @@ def test_install_editable_from_hg(script - result.assert_installed('ScriptTest', with_files=['.hg']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_final_slash_normalization(script, tmpdir): - """ - Test that presence or absence of final slash in VCS URL is normalized. -@@ -188,6 +199,7 @@ def test_vcs_url_final_slash_normalizati - assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_bazaar(script, tmpdir): - """ - Test checking out from Bazaar. -@@ -199,6 +211,7 @@ def test_install_editable_from_bazaar(sc - result.assert_installed('django-wikiapp', with_files=['.bzr']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_urlquote_normalization(script, tmpdir): - """ - Test that urlquoted characters are normalized for repo URL comparison. -@@ -295,6 +308,7 @@ def test_install_pardir(script, data): - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option(script): - """ - Test using global distutils options. -@@ -320,6 +334,7 @@ def test_install_with_hacked_egg_info(sc - assert 'Successfully installed hackedegginfo\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_using_install_option_and_editable(script, tmpdir): - """ - Test installing a tool using -e and --install-option -@@ -334,6 +349,7 @@ def test_install_using_install_option_an - assert virtualenv_bin in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option_using_editable(script, tmpdir): - """ - Test using global distutils options, but in an editable installation -@@ -345,6 +361,7 @@ def test_install_global_option_using_edi - assert '0.2.5\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_same_name_in_curdir(script): - """ - Test installing a package with the same name of a local folder -@@ -398,6 +415,7 @@ def test_install_folder_using_relative_p - assert egg_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_which_contains_dev_in_name(script): - """ - Test installing package from pypi which contains 'dev' in name -@@ -409,6 +427,7 @@ def test_install_package_which_contains_ - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_target(script): - """ - Test installing a package using pip install --target -@@ -481,6 +500,7 @@ def test_url_req_case_mismatch(script, d - assert egg_folder not in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_compiles_pyc(script): - """ - Test installing with --compile on -@@ -501,6 +521,7 @@ def test_compiles_pyc(script): - assert any(exists) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_compiles_pyc(script, data): - """ - Test installing from wheel with --compile on -diff -up pip-1.5.6/tests/functional/test_install_reqs.py.orig pip-1.5.6/tests/functional/test_install_reqs.py ---- pip-1.5.6/tests/functional/test_install_reqs.py.orig 2014-11-27 11:23:21.114672571 +0100 -+++ pip-1.5.6/tests/functional/test_install_reqs.py 2014-11-27 14:25:42.443560282 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_requirements_file(script): - """ - Test installing from a requirements file. -@@ -59,6 +60,7 @@ def test_relative_requirements_file(scri - assert (script.site_packages/'fspkg') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_requirements_files(script, tmpdir): - """ - Test installing from multiple nested requirements files. -@@ -110,6 +112,7 @@ def test_install_local_editable_with_ext - assert script.site_packages/'simple' in res.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_local_editable_with_subdirectory(script): - version_pkg_path = _create_test_package_with_subdirectory(script, - 'version_subpkg') -diff -up pip-1.5.6/tests/functional/test_install_upgrade.py.orig pip-1.5.6/tests/functional/test_install_upgrade.py ---- pip-1.5.6/tests/functional/test_install_upgrade.py.orig 2014-11-27 11:23:21.159672835 +0100 -+++ pip-1.5.6/tests/functional/test_install_upgrade.py 2014-11-27 11:23:21.743676253 +0100 -@@ -22,6 +22,7 @@ def test_no_upgrade_unless_requested(scr - assert not result.files_created, 'pip install INITools upgraded when it should not have' - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_specific_version(script): - """ - It does upgrade to specific version requested. -@@ -34,6 +35,7 @@ def test_upgrade_to_specific_version(scr - assert script.site_packages/'INITools-0.2-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_if_requested(script): - """ - And it does upgrade if requested. -@@ -56,6 +58,7 @@ def test_upgrade_with_newest_already_ins - assert 'already up-to-date' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_force_reinstall_newest(script): - """ - Force reinstallation of a package even if it is already at its newest -@@ -69,6 +72,7 @@ def test_upgrade_force_reinstall_newest( - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade(script): - """ - Automatic uninstall-before-upgrade. -@@ -82,6 +86,7 @@ def test_uninstall_before_upgrade(script - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade_from_url(script): - """ - Automatic uninstall-before-upgrade from URL. -@@ -95,6 +100,7 @@ def test_uninstall_before_upgrade_from_u - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_same_version_from_url(script): - """ - When installing from a URL the same version that is already installed, no -@@ -109,6 +115,7 @@ def test_upgrade_to_same_version_from_ur - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_from_reqs_file(script): - """ - Upgrade from a requirements file. -@@ -161,6 +168,7 @@ def test_editable_git_upgrade(script): - assert 'some different version' in version2.stdout, "Output: %s" % (version2.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_should_not_install_always_from_cache(script): - """ - If there is an old cached package, pip should download the newer version -@@ -173,6 +181,7 @@ def test_should_not_install_always_from_ - assert script.site_packages/'INITools-0.1-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_with_ignoreinstalled_requested(script): - """ - Test old conflicting package is completely ignored -@@ -185,6 +194,7 @@ def test_install_with_ignoreinstalled_re - assert os.path.exists(script.site_packages_path/'INITools-0.3-py%s.egg-info' % pyversion) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_no_dists_found(script, tmpdir): - """It can upgrade a VCS requirement that has no distributions otherwise.""" - req = "%s#egg=pip-test-package" % local_checkout( -@@ -194,6 +204,7 @@ def test_upgrade_vcs_req_with_no_dists_f - assert not result.returncode - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_dist_found(script): - """It can upgrade a VCS requirement that has distributions on the index.""" - # TODO(pnasrat) Using local_checkout fails on windows - oddness with the test path urls/git. -diff -up pip-1.5.6/tests/functional/test_install_user.py.orig pip-1.5.6/tests/functional/test_install_user.py ---- pip-1.5.6/tests/functional/test_install_user.py.orig 2014-11-27 11:23:21.750676293 +0100 -+++ pip-1.5.6/tests/functional/test_install_user.py 2014-11-27 11:23:22.157678676 +0100 -@@ -42,7 +42,8 @@ def _patch_dist_in_site_packages(script) - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UserSite: - -- def test_reset_env_system_site_packages_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_reset_env_system_site_packages_usersite(self, script, virtualenv): - """ - reset_env(system_site_packages=True) produces env where a --user install can be found using pkg_resources - """ -@@ -53,7 +54,8 @@ class Tests_UserSite: - assert 'INITools'== project_name, "'%s' should be 'INITools'" %project_name - - -- def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): - """ - Test installing current directory ('.') into usersite after installing distribute - """ -@@ -85,7 +87,8 @@ class Tests_UserSite: - result = script.pip('install', '--user', curdir, cwd=run_from, expect_error=True) - assert "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." in result.stdout - -- def test_install_user_conflict_in_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_usersite(self, script, virtualenv): - """ - Test user install with conflict in usersite updates usersite. - """ -@@ -99,7 +102,8 @@ class Tests_UserSite: - assert egg_info_folder in result2.files_created, str(result2) - assert not isfile(initools_v3_file), initools_v3_file - -- def test_install_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install with conflict in global site ignores site and installs to usersite - """ -@@ -129,7 +133,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install/upgrade with conflict in global site ignores site and installs to usersite - """ -@@ -159,7 +164,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder), result2.stdout - assert isdir(initools_folder) - -- def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): - """ - Test user install with conflict in globalsite and usersite ignores global site and updates usersite. - """ -@@ -190,7 +196,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): - """ - Test user install in --system-site-packages virtualenv with conflict in site fails. - """ -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-11-27 14:27:33.238340755 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-11-27 14:28:28.154727603 +0100 -@@ -36,6 +36,7 @@ def test_get_refs_should_return_branch_n - assert result['branch0.1'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_ignore_no_branch(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) -@@ -79,6 +80,7 @@ def test_check_rev_options_should_handle - - # TODO(pnasrat) fix all helpers to do right things with paths on windows. - @pytest.mark.skipif("sys.platform == 'win32'") -+@pytest.mark.skipif(True, reason='No network') - def test_check_submodule_addition(script): - """ - Submodules are pulled in on install and updated on upgrade. -diff -up pip-1.5.6/tests/functional/test_install_vcs.py.orig pip-1.5.6/tests/functional/test_install_vcs.py ---- pip-1.5.6/tests/functional/test_install_vcs.py.orig 2014-11-27 11:23:22.169678746 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs.py 2014-11-27 14:27:14.133206173 +0100 -@@ -1,7 +1,9 @@ -+import pytest - from tests.lib import _create_test_package, _change_test_package_version - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git_with_https(script, tmpdir): - """ - Test cloning from Git with https. -@@ -13,6 +15,7 @@ def test_install_editable_from_git_with_ - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_sha1_revisions(script): - """ - Git backend should be able to install from SHA1 revisions -@@ -25,6 +28,7 @@ def test_git_with_sha1_revisions(script) - assert '0.1' in version.stdout, version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_branch_name_as_revision(script): - """ - Git backend should be able to install from branch names -@@ -37,6 +41,7 @@ def test_git_with_branch_name_as_revisio - assert 'some different version' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_as_revision(script): - """ - Git backend should be able to install from tag names -@@ -49,6 +54,7 @@ def test_git_with_tag_name_as_revision(s - assert '0.1' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_and_update(script, tmpdir): - """ - Test cloning a git repository and updating to a different version. -@@ -64,6 +70,7 @@ def test_git_with_tag_name_and_update(sc - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_branch_should_not_be_changed(script, tmpdir): - """ - Editable installations should not change branch -@@ -77,6 +84,7 @@ def test_git_branch_should_not_be_change - assert '* master' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_unpacking(script, tmpdir): - """ - Test cloning a git repository from a non-editable URL with a given tag. -@@ -88,6 +96,7 @@ def test_git_with_non_editable_unpacking - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from an editable url which contains "dev" string -@@ -97,6 +106,7 @@ def test_git_with_editable_where_egg_con - result.assert_installed('django-devserver', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from a non-editable url which contains "dev" string -@@ -107,6 +117,7 @@ def test_git_with_non_editable_where_egg - assert devserver_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_ambiguous_revs(script): - """ - Test git with two "names" (tag/branch) pointing to the same commit -@@ -121,6 +132,7 @@ def test_git_with_ambiguous_revs(script) - result.assert_installed('version-pkg', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_works_with_editable_non_origin_repo(script): - # set up, create a git repo and install it as editable from a local directory path - version_pkg_path = _create_test_package(script) -diff -up pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig pip-1.5.6/tests/functional/test_install_vcs_svn.py ---- pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig 2014-11-27 14:30:00.551378474 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_svn.py 2014-11-27 14:30:03.217397254 +0100 -@@ -1,7 +1,8 @@ -+import pytest - from mock import patch - from pip.vcs.subversion import Subversion - -- -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -@@ -11,6 +12,7 @@ def test_obtain_should_recognize_auth_in - 'http://username:password@svn.example.com/', script.scratch_path/'test']) - - -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_export_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -diff -up pip-1.5.6/tests/functional/test_install_wheel.py.orig pip-1.5.6/tests/functional/test_install_wheel.py ---- pip-1.5.6/tests/functional/test_install_wheel.py.orig 2014-11-27 11:23:22.371679928 +0100 -+++ pip-1.5.6/tests/functional/test_install_wheel.py 2014-11-27 11:23:22.372679934 +0100 -@@ -92,6 +92,7 @@ def test_install_from_wheel_with_headers - result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_wheel_with_target(script, data): - """ - Test installing a wheel using pip install --target -diff -up pip-1.5.6/tests/functional/test_list.py.orig pip-1.5.6/tests/functional/test_list.py ---- pip-1.5.6/tests/functional/test_list.py.orig 2014-11-27 11:23:22.379679974 +0100 -+++ pip-1.5.6/tests/functional/test_list.py 2014-11-27 11:31:06.129431433 +0100 -@@ -1,6 +1,7 @@ - import os - import re - import textwrap -+import pytest - - from tests.lib.local_repos import local_checkout - -@@ -26,6 +27,7 @@ def test_local_flag(script, data): - assert 'simple (1.0)' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_uptodate_flag(script, data): - """ - Test the behavior of --uptodate flag in the list command -@@ -39,6 +41,7 @@ def test_uptodate_flag(script, data): - assert 'simple2 (3.0)' in result.stdout, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_outdated_flag(script, data): - """ - Test the behavior of --outdated flag in the list command -@@ -52,6 +55,7 @@ def test_outdated_flag(script, data): - assert 'simple2' not in result.stdout, str(result) #3.0 is latest - - -+@pytest.mark.skipif(True, reason='No network') - def test_editables_flag(script, data): - """ - Test the behavior of --editables flag in the list command -diff -up pip-1.5.6/tests/functional/test_search.py.orig pip-1.5.6/tests/functional/test_search.py ---- pip-1.5.6/tests/functional/test_search.py.orig 2014-11-27 11:23:22.903683041 +0100 -+++ pip-1.5.6/tests/functional/test_search.py 2014-11-27 11:30:57.397378486 +0100 -@@ -1,3 +1,4 @@ -+import pytest - import pip.download - from pip.commands.search import (compare_versions, - highest_version, -@@ -53,6 +54,7 @@ def test_invalid_pypi_transformation(): - assert transform_hits(pypi_hits) == expected - - -+@pytest.mark.skipif(True, reason='No network') - def test_search(script): - """ - End to end test of search command. -@@ -62,6 +64,7 @@ def test_search(script): - assert 'A tool for installing and managing Python packages' in output.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_search(script): - """ - Test searching for multiple packages at once. -@@ -80,6 +83,7 @@ def test_search_missing_argument(script) - assert 'ERROR: Missing required argument (search query).' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_sucess_when_find_packages(): - """ - Test SearchCommand.run for found package -@@ -91,6 +95,7 @@ def test_run_method_should_return_sucess - assert status == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_no_matches_found_when_does_not_find_packages(): - """ - Test SearchCommand.run for no matches -@@ -102,6 +107,7 @@ def test_run_method_should_return_no_mat - assert status == NO_MATCHES_FOUND, status - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_should_exit_status_code_zero_when_find_packages(script): - """ - Test search exit status code for package found -@@ -110,6 +116,7 @@ def test_search_should_exit_status_code_ - assert result.returncode == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_exit_status_code_when_finds_no_package(script): - """ - Test search exit status code for no matches -diff -up pip-1.5.6/tests/functional/test_show.py.orig pip-1.5.6/tests/functional/test_show.py ---- pip-1.5.6/tests/functional/test_show.py.orig 2014-11-27 11:23:23.160684545 +0100 -+++ pip-1.5.6/tests/functional/test_show.py 2014-11-27 11:30:52.417348289 +0100 -@@ -1,4 +1,5 @@ - import re -+import pytest - from pip import __version__ - from pip.commands.show import search_packages_info - -@@ -34,6 +35,7 @@ def test_show_with_files_not_found(scrip - assert lines[6] == 'Cannot locate installed-files.txt', lines[5] - - -+@pytest.mark.skipif(True, reason='No network') - def test_show_with_all_files(script): - """ - Test listing all files in the show command. -diff -up pip-1.5.6/tests/functional/test_uninstall.py.orig pip-1.5.6/tests/functional/test_uninstall.py ---- pip-1.5.6/tests/functional/test_uninstall.py.orig 2014-11-27 11:23:23.168684592 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall.py 2014-11-27 11:30:22.367166080 +0100 -@@ -3,6 +3,7 @@ from __future__ import with_statement - import textwrap - import os - import sys -+import pytest - from os.path import join, abspath, normpath - from tempfile import mkdtemp - from mock import patch -@@ -12,6 +13,7 @@ from tests.lib.local_repos import local_ - from pip.util import rmtree - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_uninstall(script): - """ - Test simple install and uninstall. -@@ -25,6 +27,7 @@ def test_simple_uninstall(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_with_scripts(script): - """ - Uninstall an easy_installed package with scripts. -@@ -38,6 +41,7 @@ def test_uninstall_with_scripts(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache', easy_install_pth]) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_install_after_import(script): - """ - Uninstall an easy_installed package after it's been imported -@@ -50,6 +54,7 @@ def test_uninstall_easy_install_after_im - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_namespace_package(script): - """ - Uninstall a distribution with a namespace package without clobbering -@@ -90,6 +95,7 @@ def test_uninstall_overlapping_package(s - assert_all_changes(result2, result3, []) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_console_scripts(script): - """ - Test uninstalling a package with more files (console_script entry points, extra directories). -@@ -102,6 +108,7 @@ def test_uninstall_console_scripts(scrip - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_installed_console_scripts(script): - """ - Test uninstalling package with console_scripts that is easy_installed. -@@ -114,6 +121,7 @@ def test_uninstall_easy_installed_consol - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_from_svn(script, tmpdir): - """ - Test uninstalling an editable installation from svn. -@@ -126,6 +134,7 @@ def test_uninstall_editable_from_svn(scr - assert_all_changes(result, result2, [script.venv/'src', script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_with_source_outside_venv(script, tmpdir): - """ - Test uninstalling editable install from existing source outside the venv. -@@ -149,6 +158,7 @@ def _test_uninstall_editable_with_source - assert_all_changes(result, result3, [script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_from_reqs_file(script, tmpdir): - """ - Test uninstall from a requirements file. -diff -up pip-1.5.6/tests/functional/test_uninstall_user.py.orig pip-1.5.6/tests/functional/test_uninstall_user.py ---- pip-1.5.6/tests/functional/test_uninstall_user.py.orig 2014-11-27 11:23:23.590687062 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall_user.py 2014-11-27 11:29:55.413002643 +0100 -@@ -17,7 +17,8 @@ from tests.functional.test_install_user - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UninstallUserSite: - -- def test_uninstall_from_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_uninstall_from_usersite(self, script, virtualenv): - """ - Test uninstall from usersite - """ -diff -up pip-1.5.6/tests/functional/test_wheel.py.orig pip-1.5.6/tests/functional/test_wheel.py ---- pip-1.5.6/tests/functional/test_wheel.py.orig 2014-11-27 11:23:23.598687109 +0100 -+++ pip-1.5.6/tests/functional/test_wheel.py 2014-11-27 11:30:30.345214455 +0100 -@@ -2,6 +2,7 @@ - import os - import sys - import textwrap -+import pytest - - from os.path import exists - -@@ -20,6 +21,7 @@ def test_pip_wheel_fails_without_wheel(s - assert "'pip wheel' requires the 'wheel' package" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_success(script, data): - """ - Test 'pip wheel' success. -@@ -32,6 +34,7 @@ def test_pip_wheel_success(script, data) - assert "Successfully built simple" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_downloads_wheels(script, data): - """ - Test 'pip wheel' downloads wheels -@@ -46,6 +49,7 @@ def test_pip_wheel_downloads_wheels(scri - assert "Saved" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail(script, data): - """ - Test 'pip wheel' failure. -@@ -59,6 +63,7 @@ def test_pip_wheel_fail(script, data): - assert "Failed to build wheelbroken" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_ignore_wheels_editables(script, data): - """ - Test 'pip wheel' ignores editables -@@ -85,6 +90,7 @@ def test_pip_wheel_ignore_wheels_editabl - assert ignore_editable in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_wheel(script, data): - """ - Test --no-clean option blocks cleaning after wheel build -@@ -95,6 +101,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_source_deps(script, data): - """ - Test 'pip wheel --use-wheel' finds and builds source archive dependencies of wheels -@@ -108,6 +115,7 @@ def test_pip_wheel_source_deps(script, d - assert "Successfully built source" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail_cause_of_previous_build_dir(script, data): - """Test when 'pip wheel' tries to install a package that has a previous build directory""" - -diff -up pip-1.5.6/tests/unit/test_finder.py.orig pip-1.5.6/tests/unit/test_finder.py ---- pip-1.5.6/tests/unit/test_finder.py.orig 2014-11-27 11:23:23.937689093 +0100 -+++ pip-1.5.6/tests/unit/test_finder.py 2014-11-27 14:30:48.597716927 +0100 -@@ -71,6 +71,7 @@ def test_finder_detects_latest_already_s - finder.find_requirement(req, True) - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_detects_latest_already_satisfied_pypi_links(): - """Test PackageFinder detects latest already satisified using pypi links""" - req = InstallRequirement.from_line('initools', None) -@@ -199,6 +200,7 @@ def test_finder_priority_file_over_page( - assert link.url.startswith("file://") - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_priority_page_over_deplink(): - """Test PackageFinder prefers page links over equivalent dependency links""" - req = InstallRequirement.from_line('gmpy==1.15', None) -diff -up pip-1.5.6/tests/unit/test_req.py.orig pip-1.5.6/tests/unit/test_req.py ---- pip-1.5.6/tests/unit/test_req.py.orig 2014-11-27 11:23:23.946689145 +0100 -+++ pip-1.5.6/tests/unit/test_req.py 2014-11-27 11:23:23.947689151 +0100 -@@ -149,6 +149,7 @@ def test_parse_editable_local_extras(isd - normcase_mock.return_value = "/some/path/foo" - assert parse_editable('foo[bar,baz]', 'git') == (None, 'file:///some/path/foo', ('bar', 'baz')) - -+@pytest.mark.skipif(True, reason='No network') - def test_remote_reqs_parse(): - """ - Test parsing a simple remote requirements file -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-12-01 13:31:24.075490830 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-12-01 13:30:59.208326741 +0100 -@@ -62,6 +62,7 @@ def test_cleanup_after_install_from_loca - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_and_download_should_not_leave_build_dir(script): - """ - It should remove build/ dir if it was pip that created -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-12-01 13:32:11.419803237 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-12-01 13:32:30.298927814 +0100 -@@ -13,6 +13,7 @@ from tests.lib.git_submodule_helpers imp - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_tag_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'tag', '0.1', cwd=version_pkg_path) -@@ -25,6 +26,7 @@ def test_get_refs_should_return_tag_name - assert result['0.2'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_branch_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) diff --git a/sources b/sources index e005a9b..b2fc5dd 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-19.3.1.tar.gz) = 954b390580e23d0a85d1fa4cbd2f35171df7930fbe346f9a809477fe133e95f7d30208d79b5d07f30c81ab1b0a9b52f36f3ff6c77dc81a1c9ab9beb2bd8e0aa1 -SHA512 (pip-19.3.1-tests.tar.gz) = fb058fcaaff3325341af5f4746be0c7943953c43fb721124758320363532911ca399f254a58e347c72795adc41764600bc6d02efce0e1e27d4b6d130efad9945 +SHA512 (pip-20.0.2.tar.gz) = 72f9c4b8a5a3c5f8074bc2b671a118942f161fb145c38077ded8a18f07537eb674c679fdcf7c3f3f0aeee11d66fe34eaa157f53f1f689fce3e12567e5339ac89 +SHA512 (pip-20.0.2-tests.tar.gz) = ac6eb7c4814b61138741306661f050ed5232ed4e402978b0c05045bbbdc6cddf476340ba3438e4668716d9b3093932ef82d1e7a778c43ab5934ed003bace03cb SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From abb97d98f6a3a0546b0d1ebd1be2285cb6731abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 6 Mar 2020 11:40:32 +0100 Subject: [PATCH 130/287] Fedora CI: Run %pyproject macros integration tests --- tests/tests.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 43aa64b..e53bda5 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -7,6 +7,8 @@ repositories: - repo: "https://src.fedoraproject.org/tests/python.git" dest: "python" + - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" + dest: "pyproject-rpm-macros" tests: - smoke34: dir: python/smoke @@ -43,6 +45,18 @@ run: VERSION=3.8 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six + - pyproject_pytest: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-pytest + - pyproject_entrypoints: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-entrypoints + - pyproject_pluggy: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-pluggy + - pyproject_clikit: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-clikit required_packages: - gcc - virtualenv @@ -56,3 +70,6 @@ - python3-devel - python3-tox - pipenv + - mock + - rpmdevtools + - rpm-build From eb1cbbd764d37b6e3445bff7fe4346861a257e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 10 Mar 2020 11:07:18 +0100 Subject: [PATCH 131/287] Don't warn the user about pip._internal.main() entrypoint to fix ensurepip --- nowarn-pip._internal.main.patch | 72 +++++++++++++++++++++++++++++++++ python-pip.spec | 11 ++++- 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 nowarn-pip._internal.main.patch diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch new file mode 100644 index 0000000..fb3ac92 --- /dev/null +++ b/nowarn-pip._internal.main.patch @@ -0,0 +1,72 @@ +From 7c36cb21910b415e0eb171d0f6c4dbf72382fdaf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 10 Mar 2020 11:03:22 +0100 +Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint + +In Fedora, we use that in ensurepip and users cannot do anything about it, +this warning is juts moot. Also, the warning breaks CPython test suite. +--- + src/pip/_internal/__init__.py | 2 +- + src/pip/_internal/utils/entrypoints.py | 19 ++++++++++--------- + tests/functional/test_cli.py | 3 ++- + 3 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py +index 3aa8a46..0ec017b 100755 +--- a/src/pip/_internal/__init__.py ++++ b/src/pip/_internal/__init__.py +@@ -15,4 +15,4 @@ def main(args=None): + """ + from pip._internal.utils.entrypoints import _wrapper + +- return _wrapper(args) ++ return _wrapper(args, _nowarn=True) +diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py +index befd01c..d6f3632 100644 +--- a/src/pip/_internal/utils/entrypoints.py ++++ b/src/pip/_internal/utils/entrypoints.py +@@ -7,7 +7,7 @@ if MYPY_CHECK_RUNNING: + from typing import Optional, List + + +-def _wrapper(args=None): ++def _wrapper(args=None, _nowarn=False): + # type: (Optional[List[str]]) -> int + """Central wrapper for all old entrypoints. + +@@ -20,12 +20,13 @@ def _wrapper(args=None): + directing them to an appropriate place for help, we now define all of + our old entrypoints as wrappers for the current one. + """ +- sys.stderr.write( +- "WARNING: pip is being invoked by an old script wrapper. This will " +- "fail in a future version of pip.\n" +- "Please see https://github.com/pypa/pip/issues/5599 for advice on " +- "fixing the underlying issue.\n" +- "To avoid this problem you can invoke Python with '-m pip' instead of " +- "running pip directly.\n" +- ) ++ if not _nowarn: ++ sys.stderr.write( ++ "WARNING: pip is being invoked by an old script wrapper. This will " ++ "fail in a future version of pip.\n" ++ "Please see https://github.com/pypa/pip/issues/5599 for advice on " ++ "fixing the underlying issue.\n" ++ "To avoid this problem you can invoke Python with '-m pip' instead of " ++ "running pip directly.\n" ++ ) + return main(args) +diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py +index e416315..7f57f67 100644 +--- a/tests/functional/test_cli.py ++++ b/tests/functional/test_cli.py +@@ -31,4 +31,5 @@ def test_entrypoints_work(entrypoint, script): + result = script.pip("-V") + result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) + assert result.stdout == result2.stdout +- assert "old script wrapper" in result2.stderr ++ if entrypoint[0] != "fake_pip = pip._internal:main": ++ assert "old script wrapper" in result2.stderr +-- +2.24.1 + diff --git a/python-pip.spec b/python-pip.spec index 4aaea41..15967ec 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 20.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -91,6 +91,11 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 Patch4: dummy-certifi.patch +# Don't warn the user about pip._internal.main() entrypoint +# In Fedora, we use that in ensurepip and users cannot do anything about it, +# this warning is juts moot. Also, the warning breaks CPython test suite. +Patch5: nowarn-pip._internal.main.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -250,6 +255,7 @@ popd %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -378,6 +384,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 +- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip + * Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 - Update to 20.0.2 (#1793456) From 7913cd9edfe56c12bac0c55714de5137152f06ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Apr 2020 13:24:41 +0200 Subject: [PATCH 132/287] Make patches apply --without tests Some patches touch tests and we didn't include the test sources --without tests, leading to broken build. This was a long standing reoccurring problem. Now we always include and unpack tests sources, even when we don't run them. --- python-pip.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 15967ec..b5db78b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -64,9 +64,7 @@ BuildRequires: python-wheel-wheel # git clone https://github.com/pypa/pip && cd pip # VERSION= # define the version you want # git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/ -%if %{with tests} Source1: pip-%{version}-tests.tar.gz -%endif # Themes required to build the docs. %if %{with doc} @@ -239,9 +237,8 @@ A Python wheel of pip to use with venv. %prep %setup -q -n %{srcname}-%{version} -%if %{with tests} tar -xf %{SOURCE1} -%endif + %if %{with doc} pushd docs/html tar -xf %{SOURCE2} @@ -261,10 +258,8 @@ popd rm src/pip/_vendor/certifi/*.pem sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt -%if %{with tests} # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels -%endif %build From 4347c1397dd1c08788ba6d487742e6dfd76e6fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 10 Apr 2020 15:30:03 +0200 Subject: [PATCH 133/287] Allow setting $TMPDIR to $PWD/... during pip wheel Needed for https://bugzilla.redhat.com/show_bug.cgi?id=1806625 --- 7873.patch | 149 ++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 11 +++- 2 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 7873.patch diff --git a/7873.patch b/7873.patch new file mode 100644 index 0000000..5f106cc --- /dev/null +++ b/7873.patch @@ -0,0 +1,149 @@ +From 98aa09cf88d8851bb2be6ad39be1cbca7d181916 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 19 Mar 2020 17:57:53 +0100 +Subject: [PATCH 1/2] Prevent infinite recursion with pip wheel with $TMPDIR in + $PWD + +During a build of extension module within `pip wheel` the source directory is +recursively copied in a temporary directory. + +See https://github.com/pypa/pip/issues/7555 + +When the temporary directory is inside the source directory +(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion +that ended in: + + [Errno 36] File name too long + +We prevent that buy never copying the target to the target in _copy_source_tree. + +Fixes https://github.com/pypa/pip/issues/7872 +--- + news/7872.bugfix | 1 + + src/pip/_internal/operations/prepare.py | 22 +++++++++++++++++----- + tests/data/src/extension/extension.c | 0 + tests/data/src/extension/setup.py | 4 ++++ + tests/functional/test_wheel.py | 11 +++++++++++ + 5 files changed, 33 insertions(+), 5 deletions(-) + create mode 100644 news/7872.bugfix + create mode 100644 tests/data/src/extension/extension.c + create mode 100644 tests/data/src/extension/setup.py + +diff --git a/news/7872.bugfix b/news/7872.bugfix +new file mode 100644 +index 0000000000..3550d573b8 +--- /dev/null ++++ b/news/7872.bugfix +@@ -0,0 +1 @@ ++Prevent an infinite recursion with ``pip wheel`` when ``$TMPDIR`` is within the source directory. +diff --git a/src/pip/_internal/operations/prepare.py b/src/pip/_internal/operations/prepare.py +index 9f87148c03..1fcbb775ec 100644 +--- a/src/pip/_internal/operations/prepare.py ++++ b/src/pip/_internal/operations/prepare.py +@@ -156,13 +156,25 @@ def _copy2_ignoring_special_files(src, dest): + + def _copy_source_tree(source, target): + # type: (str, str) -> None ++ target_abspath = os.path.abspath(target) ++ target_basename = os.path.basename(target_abspath) ++ target_dirname = os.path.dirname(target_abspath) ++ + def ignore(d, names): + # type: (str, List[str]) -> List[str] +- # Pulling in those directories can potentially be very slow, +- # exclude the following directories if they appear in the top +- # level dir (and only it). +- # See discussion at https://github.com/pypa/pip/pull/6770 +- return ['.tox', '.nox'] if d == source else [] ++ skipped = [] # type: List[str] ++ if d == source: ++ # Pulling in those directories can potentially be very slow, ++ # exclude the following directories if they appear in the top ++ # level dir (and only it). ++ # See discussion at https://github.com/pypa/pip/pull/6770 ++ skipped += ['.tox', '.nox'] ++ if os.path.abspath(d) == target_dirname: ++ # Prevent an infinite recursion if the target is in source. ++ # This can happen when TMPDIR is set to ${PWD}/... ++ # and we copy PWD to TMPDIR. ++ skipped += [target_basename] ++ return skipped + + kwargs = dict(ignore=ignore, symlinks=True) # type: CopytreeKwargs + +diff --git a/tests/data/src/extension/extension.c b/tests/data/src/extension/extension.c +new file mode 100644 +index 0000000000..e69de29bb2 +diff --git a/tests/data/src/extension/setup.py b/tests/data/src/extension/setup.py +new file mode 100644 +index 0000000000..b26302b053 +--- /dev/null ++++ b/tests/data/src/extension/setup.py +@@ -0,0 +1,4 @@ ++from setuptools import Extension, setup ++ ++module = Extension('extension', sources=['extension.c']) ++setup(name='extension', version='0.0.1', ext_modules = [module]) +diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py +index ce79dbee5e..f293233b9d 100644 +--- a/tests/functional/test_wheel.py ++++ b/tests/functional/test_wheel.py +@@ -289,6 +289,17 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels): + assert "Successfully built withpyproject" in result.stdout, result.stdout + + ++def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels): ++ tmpdir = data.src / 'extension/tmp' ++ tmpdir.mkdir() ++ script.environ['TMPDIR'] = str(tmpdir) ++ result = script.pip( ++ 'wheel', data.src / 'extension', ++ '--no-index', '-f', common_wheels ++ ) ++ assert "Successfully built extension" in result.stdout, result.stdout ++ ++ + @pytest.mark.network + def test_pep517_wheels_are_not_confused_with_other_files(script, tmpdir, data): + """Check correct wheels are copied. (#6196) + +From eb070d23721c5a0bff59ed5a252291efd3f5a7c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 19 Mar 2020 23:21:56 +0100 +Subject: [PATCH 2/2] Avoid a test dependency on a C compiler, skip the test on + Windows + +--- + tests/functional/test_wheel.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py +index f293233b9d..545c50ac9a 100644 +--- a/tests/functional/test_wheel.py ++++ b/tests/functional/test_wheel.py +@@ -1,6 +1,7 @@ + """'pip wheel' tests""" + import os + import re ++import sys + from os.path import exists + + import pytest +@@ -289,10 +290,17 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels): + assert "Successfully built withpyproject" in result.stdout, result.stdout + + ++@pytest.mark.skipif(sys.platform.startswith('win'), ++ reason='The empty extension module does not work on Win') + def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels): + tmpdir = data.src / 'extension/tmp' + tmpdir.mkdir() + script.environ['TMPDIR'] = str(tmpdir) ++ ++ # To avoid a test dependency on a C compiler, we set the env vars to "noop" ++ # The .c source is empty anyway ++ script.environ['CC'] = script.environ['LDSHARED'] = str('true') ++ + result = script.pip( + 'wheel', data.src / 'extension', + '--no-index', '-f', common_wheels diff --git a/python-pip.spec b/python-pip.spec index b5db78b..f14fe98 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 20.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -94,6 +94,11 @@ Patch4: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch5: nowarn-pip._internal.main.patch +# Allow setting $TMPDIR to $PWD/... during pip wheel +# This is needed to have proper debugsource packages with pyproject-rpm-macros +# https://bugzilla.redhat.com/show_bug.cgi?id=1806625 +Patch6: https://github.com/pypa/pip/pull/7873.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -253,6 +258,7 @@ popd %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -379,6 +385,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 +- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) + * Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 - Don't warn the user about pip._internal.main() entrypoint to fix ensurepip From 542eb0faf83e8d9b0cf0584a9401d0c29226d3b6 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 7 Apr 2020 11:11:32 +0200 Subject: [PATCH 134/287] Link to man page for all executables There are four different executables for python-pip, but so far only two of them had man page. This commit makes man page available for rest of the executables via links. --- python-pip.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index f14fe98..7645405 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -296,7 +296,9 @@ pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3} +for pip in "pip3" "pip-3" "pip%{python3_version}" "pip-%{python3_version}"; do +echo ".so $MAN" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip} +done done popd %endif From 903b01b22dbe21cf58d09b413306c9a9600e0ab6 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 7 Apr 2020 11:13:54 +0200 Subject: [PATCH 135/287] Add rpmlint config to filter not important warnings and errors This commit adds rpmlint config to filter warning and errors that are not really a problem. Such as no-documentation warning for python-pip-wheel which has documentation README shipped with main package but rpmlint does not see it. Then it filters out venv spelling error and adds temporary filter for non-executable-script and wrong-script-interpreter those will be fixed once all upstream PRs will be merged. --- python-pip.rpmlintrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 python-pip.rpmlintrc diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc new file mode 100644 index 0000000..5ccb1f8 --- /dev/null +++ b/python-pip.rpmlintrc @@ -0,0 +1,15 @@ +# This is just temporary, when upstream merges PRs it can be removed +# https://github.com/pypa/pip/pull/7959 +# https://github.com/ActiveState/appdirs/pull/144 +# https://github.com/psf/requests/pull/5410 +# https://github.com/chardet/chardet/pull/192 +addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_internal/__init__.py\b') +addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b') +addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b') +addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/chardet/cli/chardetect.py\b') + +# We ship README with the main package but not with the wheel +addFilter(r'python-pip-wheel.noarch: W: no-documentation') + +# SPELLING ERRORS +addFilter(r'W: spelling-error .* venv') From f6c63603fbaa2537df4a56e182e35a70d350d12a Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 14 Apr 2020 15:00:04 +0200 Subject: [PATCH 136/287] Replace pypi source with tarball from GitHub Pypi source does not include tests folder so they had to be manually downloaded from GitHub. This commit replaces pypi source with tarball from GitHub where tests are included. This also fixes rpmlint invalid-url warning. --- python-pip.spec | 20 ++++++-------------- sources | 3 +-- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 7645405..4a194cc 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -47,8 +47,8 @@ Summary: A tool for installing and managing Python packages # webencodings: BSD License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) -URL: http://www.pip-installer.org -Source0: %pypi_source +URL: https://pip.pypa.io/ +Source0: https://github.com/pypa/pip/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch @@ -60,16 +60,10 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif -# to get tests: -# git clone https://github.com/pypa/pip && cd pip -# VERSION= # define the version you want -# git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/ -Source1: pip-%{version}-tests.tar.gz - # Themes required to build the docs. %if %{with doc} -Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz -Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz +Source1: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz +Source2: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz %endif # Downstream only patch @@ -242,13 +236,12 @@ A Python wheel of pip to use with venv. %prep %setup -q -n %{srcname}-%{version} -tar -xf %{SOURCE1} %if %{with doc} pushd docs/html -tar -xf %{SOURCE2} +tar -xf %{SOURCE1} mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa -tar -xf %{SOURCE3} +tar -xf %{SOURCE2} mv python-docs-theme-2018.2 python-docs-theme popd %endif @@ -262,7 +255,6 @@ popd # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem -sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels diff --git a/sources b/sources index b2fc5dd..650177d 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ -SHA512 (pip-20.0.2.tar.gz) = 72f9c4b8a5a3c5f8074bc2b671a118942f161fb145c38077ded8a18f07537eb674c679fdcf7c3f3f0aeee11d66fe34eaa157f53f1f689fce3e12567e5339ac89 -SHA512 (pip-20.0.2-tests.tar.gz) = ac6eb7c4814b61138741306661f050ed5232ed4e402978b0c05045bbbdc6cddf476340ba3438e4668716d9b3093932ef82d1e7a778c43ab5934ed003bace03cb +SHA512 (pip-20.0.2.tar.gz) = f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From db4c30e31104c36c6dc471469b68dba8abf33ae6 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 14 Apr 2020 15:01:09 +0200 Subject: [PATCH 137/287] Remove python_provide macro This commit removes %python_provide macro which is now automatic, see: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/message/SSJLPWSGFGPYRSHXQZDR7JNQXSDGGX3Z/ This is applicable only for F33 and higher. --- python-pip.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 4a194cc..869dacf 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -197,7 +197,6 @@ Requires: python%{python3_pkgversion}-setuptools # Virtual provides for the packages bundled by pip: %{bundled 3} -%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} From 46e383d54652f40dd223073db53a3904e08eca3e Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 14 Apr 2020 16:16:09 +0200 Subject: [PATCH 138/287] Remove doctree pickles This commit removes hidden doctree folder which serves as a cache for Sphinx when documentation is build. It's useless for user and creates rpmlint warning hidden-file-or-dir. --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 869dacf..d5bde10 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -267,7 +267,7 @@ export PYTHONPATH=./src/ # from tox.ini sphinx-build-3 -b html docs/html docs/build/html sphinx-build-3 -b man docs/man docs/build/man -c docs/html -rm docs/build/html/.buildinfo +rm -rf docs/build/html/{.doctrees,.buildinfo} %endif From 9d1451298e399ce78a8474d8b63b7d04694d6ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 15 Apr 2020 12:37:27 +0200 Subject: [PATCH 139/287] Only recommend setuptools, don't require them --- python-pip.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index d5bde10..a279193 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 20.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -192,7 +192,14 @@ BuildRequires: python%{python3_pkgversion}-pyyaml BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates Requires: ca-certificates -Requires: python%{python3_pkgversion}-setuptools + +# This was previously required and we keep it recommended because a lot of +# sdists installed via pip will try to import setuptools. +# But pip doesn't actually require setuptools. +# It can install wheels without them and it can build wheels in isolation mode +# (using setuptools/flit/poetry/... installed from PyPI). +# Side note: pip bundles pkg_resources from setuptools for internal usage. +Recommends: python%{python3_pkgversion}-setuptools # Virtual provides for the packages bundled by pip: %{bundled 3} @@ -378,6 +385,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 +- Only recommend setuptools, don't require them + * Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 - Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) From e858da1425de88663e36278bc1238234b035e073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 27 Apr 2020 17:10:03 +0200 Subject: [PATCH 140/287] Fedora CI: Add Python 3.9 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index e53bda5..c39fe89 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,6 +25,9 @@ - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh + - smoke39: + dir: python/smoke + run: VERSION=3.9 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -43,6 +46,9 @@ - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh + - smoke39_virtualenv: + dir: python/smoke + run: VERSION=3.9 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -66,6 +72,7 @@ - python36 - python37 - python38 + - python39 - python2-devel - python3-devel - python3-tox From 55406531cfbd140c7608ea6d0a404ebfaff5e524 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Sun, 26 Apr 2020 23:10:08 +0200 Subject: [PATCH 141/287] Update to 20.1~b1 Don't install pip wheel via path to prevent PEP 610 treatment, see: https://discuss.python.org/t/pep-610-usage-guidelines-for-linux-distributions/4012 --- 7873.patch | 149 ------------------ dummy-certifi.patch | 21 ++- ...ng-when-running-with-root-privileges.patch | 16 +- python-pip.spec | 39 +++-- ...existing-dist-only-if-path-conflicts.patch | 79 +++++----- sources | 2 +- 6 files changed, 90 insertions(+), 216 deletions(-) delete mode 100644 7873.patch diff --git a/7873.patch b/7873.patch deleted file mode 100644 index 5f106cc..0000000 --- a/7873.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 98aa09cf88d8851bb2be6ad39be1cbca7d181916 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 19 Mar 2020 17:57:53 +0100 -Subject: [PATCH 1/2] Prevent infinite recursion with pip wheel with $TMPDIR in - $PWD - -During a build of extension module within `pip wheel` the source directory is -recursively copied in a temporary directory. - -See https://github.com/pypa/pip/issues/7555 - -When the temporary directory is inside the source directory -(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion -that ended in: - - [Errno 36] File name too long - -We prevent that buy never copying the target to the target in _copy_source_tree. - -Fixes https://github.com/pypa/pip/issues/7872 ---- - news/7872.bugfix | 1 + - src/pip/_internal/operations/prepare.py | 22 +++++++++++++++++----- - tests/data/src/extension/extension.c | 0 - tests/data/src/extension/setup.py | 4 ++++ - tests/functional/test_wheel.py | 11 +++++++++++ - 5 files changed, 33 insertions(+), 5 deletions(-) - create mode 100644 news/7872.bugfix - create mode 100644 tests/data/src/extension/extension.c - create mode 100644 tests/data/src/extension/setup.py - -diff --git a/news/7872.bugfix b/news/7872.bugfix -new file mode 100644 -index 0000000000..3550d573b8 ---- /dev/null -+++ b/news/7872.bugfix -@@ -0,0 +1 @@ -+Prevent an infinite recursion with ``pip wheel`` when ``$TMPDIR`` is within the source directory. -diff --git a/src/pip/_internal/operations/prepare.py b/src/pip/_internal/operations/prepare.py -index 9f87148c03..1fcbb775ec 100644 ---- a/src/pip/_internal/operations/prepare.py -+++ b/src/pip/_internal/operations/prepare.py -@@ -156,13 +156,25 @@ def _copy2_ignoring_special_files(src, dest): - - def _copy_source_tree(source, target): - # type: (str, str) -> None -+ target_abspath = os.path.abspath(target) -+ target_basename = os.path.basename(target_abspath) -+ target_dirname = os.path.dirname(target_abspath) -+ - def ignore(d, names): - # type: (str, List[str]) -> List[str] -- # Pulling in those directories can potentially be very slow, -- # exclude the following directories if they appear in the top -- # level dir (and only it). -- # See discussion at https://github.com/pypa/pip/pull/6770 -- return ['.tox', '.nox'] if d == source else [] -+ skipped = [] # type: List[str] -+ if d == source: -+ # Pulling in those directories can potentially be very slow, -+ # exclude the following directories if they appear in the top -+ # level dir (and only it). -+ # See discussion at https://github.com/pypa/pip/pull/6770 -+ skipped += ['.tox', '.nox'] -+ if os.path.abspath(d) == target_dirname: -+ # Prevent an infinite recursion if the target is in source. -+ # This can happen when TMPDIR is set to ${PWD}/... -+ # and we copy PWD to TMPDIR. -+ skipped += [target_basename] -+ return skipped - - kwargs = dict(ignore=ignore, symlinks=True) # type: CopytreeKwargs - -diff --git a/tests/data/src/extension/extension.c b/tests/data/src/extension/extension.c -new file mode 100644 -index 0000000000..e69de29bb2 -diff --git a/tests/data/src/extension/setup.py b/tests/data/src/extension/setup.py -new file mode 100644 -index 0000000000..b26302b053 ---- /dev/null -+++ b/tests/data/src/extension/setup.py -@@ -0,0 +1,4 @@ -+from setuptools import Extension, setup -+ -+module = Extension('extension', sources=['extension.c']) -+setup(name='extension', version='0.0.1', ext_modules = [module]) -diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py -index ce79dbee5e..f293233b9d 100644 ---- a/tests/functional/test_wheel.py -+++ b/tests/functional/test_wheel.py -@@ -289,6 +289,17 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels): - assert "Successfully built withpyproject" in result.stdout, result.stdout - - -+def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels): -+ tmpdir = data.src / 'extension/tmp' -+ tmpdir.mkdir() -+ script.environ['TMPDIR'] = str(tmpdir) -+ result = script.pip( -+ 'wheel', data.src / 'extension', -+ '--no-index', '-f', common_wheels -+ ) -+ assert "Successfully built extension" in result.stdout, result.stdout -+ -+ - @pytest.mark.network - def test_pep517_wheels_are_not_confused_with_other_files(script, tmpdir, data): - """Check correct wheels are copied. (#6196) - -From eb070d23721c5a0bff59ed5a252291efd3f5a7c6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 19 Mar 2020 23:21:56 +0100 -Subject: [PATCH 2/2] Avoid a test dependency on a C compiler, skip the test on - Windows - ---- - tests/functional/test_wheel.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py -index f293233b9d..545c50ac9a 100644 ---- a/tests/functional/test_wheel.py -+++ b/tests/functional/test_wheel.py -@@ -1,6 +1,7 @@ - """'pip wheel' tests""" - import os - import re -+import sys - from os.path import exists - - import pytest -@@ -289,10 +290,17 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels): - assert "Successfully built withpyproject" in result.stdout, result.stdout - - -+@pytest.mark.skipif(sys.platform.startswith('win'), -+ reason='The empty extension module does not work on Win') - def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels): - tmpdir = data.src / 'extension/tmp' - tmpdir.mkdir() - script.environ['TMPDIR'] = str(tmpdir) -+ -+ # To avoid a test dependency on a C compiler, we set the env vars to "noop" -+ # The .c source is empty anyway -+ script.environ['CC'] = script.environ['LDSHARED'] = str('true') -+ - result = script.pip( - 'wheel', data.src / 'extension', - '--no-index', '-f', common_wheels diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 6e02685..7c864fc 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,12 +1,27 @@ +From 09bf87d33141a5c06a1d410839d162262baa16c4 Mon Sep 17 00:00:00 2001 +From: Tomas Hrnciar +Date: Sun, 26 Apr 2020 21:38:44 +0200 +Subject: [PATCH] Dummy certifi patch + +--- + src/pip/_vendor/certifi/core.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 7271acf..9f0dc20 100644 +index 56b52a3c..e99043f0 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -10,6 +10,4 @@ import os +@@ -21,9 +21,7 @@ except ImportError: def where(): - f = os.path.dirname(__file__) - -- return os.path.join(f, 'cacert.pem') +- return os.path.join(f, "cacert.pem") + return '/etc/pki/tls/certs/ca-bundle.crt' + + + def contents(): +-- +2.23.0 + diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index ded5884..4d95b77 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -1,6 +1,6 @@ -From aab24967a03bda3b0999d80562a6064c27d1e0e0 Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Tue, 12 Nov 2019 17:15:08 +0100 +From 74bb5d26e232493de43adfa1f4b42b66fd701294 Mon Sep 17 00:00:00 2001 +From: Tomas Hrnciar +Date: Sun, 26 Apr 2020 13:52:24 +0200 Subject: [PATCH] Downstream only patch Emit a warning to the user if pip install is run with root privileges @@ -10,7 +10,7 @@ Issue upstream: https://github.com/pypa/pip/issues/4288 1 file changed, 19 insertions(+) diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 02a187c..8037ffb 100644 +index 70bda2e2..1e750ae1 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -13,6 +13,8 @@ import operator @@ -22,9 +22,9 @@ index 02a187c..8037ffb 100644 from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources -@@ -242,6 +244,23 @@ class InstallCommand(RequirementCommand): - def run(self, options, args): - # type: (Values, List[Any]) -> int +@@ -241,6 +243,23 @@ class InstallCommand(RequirementCommand): + raise CommandError("Can not combine '--user' and '--target'") + cmdoptions.check_install_build_global(options) + + def is_venv(): @@ -47,5 +47,5 @@ index 02a187c..8037ffb 100644 if options.upgrade: upgrade_strategy = options.upgrade_strategy -- -2.20.1 +2.23.0 diff --git a/python-pip.spec b/python-pip.spec index a279193..4db7070 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,7 +3,10 @@ %bcond_without doc %global srcname pip -%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%global base_version 20.1 +%global prerel b1 +%global upstream_version %{base_version}%{?prerel} +%global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels %if %{with doc} @@ -15,8 +18,8 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo -Version: 20.0.2 -Release: 4%{?dist} +Version: %{base_version}%{?prerel:~%{prerel}} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -48,7 +51,7 @@ Summary: A tool for installing and managing Python packages License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: https://pip.pypa.io/ -Source0: https://github.com/pypa/pip/archive/%{version}/%{srcname}-%{version}.tar.gz +Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz BuildArch: noarch @@ -88,11 +91,6 @@ Patch4: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch5: nowarn-pip._internal.main.patch -# Allow setting $TMPDIR to $PWD/... during pip wheel -# This is needed to have proper debugsource packages with pyproject-rpm-macros -# https://bugzilla.redhat.com/show_bug.cgi?id=1806625 -Patch6: https://github.com/pypa/pip/pull/7873.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -241,7 +239,7 @@ Requires: ca-certificates A Python wheel of pip to use with venv. %prep -%setup -q -n %{srcname}-%{version} +%setup -q -n %{srcname}-%{upstream_version} %if %{with doc} pushd docs/html @@ -257,7 +255,6 @@ popd %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem @@ -265,6 +262,11 @@ rm src/pip/_vendor/certifi/*.pem # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels +# Upstream uses a Python 2/3 compatibility library for csv with Python 3 semantics in tests +# We only target Python 3 and csv23 is not (yet) packaged +# As of 20.1b1, this workaround was sufficient to get around the missing dependency +sed -i -e 's/csv23/csv/g' tests/lib/wheel.py + %build %py3_build_wheel @@ -279,15 +281,18 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} %install - # The following is similar to %%py3_install_wheel, but we don't have # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) %{__python3} dist/%{python_wheelname}/pip install \ - -I 'dist/%{python_wheelname}' \ --root %{buildroot} \ - --no-deps + --no-deps \ + --no-cache-dir \ + --no-index \ + --ignore-installed \ + --find-links dist \ + 'pip==%{upstream_version}' %if %{with doc} pushd docs/build/man @@ -306,7 +311,6 @@ for PIP in %{buildroot}%{_bindir}/pip*; do patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} done - mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ @@ -325,7 +329,7 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 # Make sure the INSTALLER is not pip, otherwise Patch2 won't work # %%pyproject macros do this for all packages -echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER +echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER mkdir -p %{buildroot}%{python_wheeldir} install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} @@ -385,6 +389,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 +- Update to 20.1~b1 + * Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 - Only recommend setuptools, don't require them diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index eb7b622..ff32533 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,8 +1,8 @@ -From b46ec3663c0535fc40503fe9a78b1b7733281bdf Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Tue, 12 Nov 2019 17:24:20 +0100 -Subject: [PATCH] Subject: Prevent removing of the system packages installed - under /usr/lib +From d381c59fdc15949c4dc293bd92bbccb60289a703 Mon Sep 17 00:00:00 2001 +From: Tomas Hrnciar +Date: Sun, 26 Apr 2020 21:19:03 +0200 +Subject: [PATCH] Prevent removing of the system packages installed under + /usr/lib when pip install -U is executed. @@ -11,24 +11,45 @@ Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner --- - src/pip/_internal/legacy_resolve.py | 5 ++++- - src/pip/_internal/req/req_install.py | 3 ++- - src/pip/_internal/utils/misc.py | 11 +++++++++++ + src/pip/_internal/req/req_install.py | 3 ++- + src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- + src/pip/_internal/utils/misc.py | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) -diff --git a/src/pip/_internal/legacy_resolve.py b/src/pip/_internal/legacy_resolve.py -index ca269121..e8d939bf 100644 ---- a/src/pip/_internal/legacy_resolve.py -+++ b/src/pip/_internal/legacy_resolve.py -@@ -30,6 +30,7 @@ from pip._internal.exceptions import ( - ) +diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py +index 3b28209b..d14217e9 100644 +--- a/src/pip/_internal/req/req_install.py ++++ b/src/pip/_internal/req/req_install.py +@@ -38,6 +38,7 @@ from pip._internal.utils.misc import ( + ask_path_exists, + backup_dir, + display_path, ++ dist_in_install_path, + dist_in_site_packages, + dist_in_usersite, + get_installed_version, +@@ -444,7 +445,7 @@ class InstallRequirement(object): + "lack sys.path precedence to {} in {}".format( + existing_dist.project_name, existing_dist.location) + ) +- else: ++ elif dist_in_install_path(existing_dist): + self.should_reinstall = True + else: + if self.editable and self.satisfied_by: +diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py +index cdb44d19..52e122c6 100644 +--- a/src/pip/_internal/resolution/legacy/resolver.py ++++ b/src/pip/_internal/resolution/legacy/resolver.py +@@ -33,6 +33,7 @@ from pip._internal.resolution.base import BaseResolver + from pip._internal.utils.compatibility_tags import get_supported from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path from pip._internal.utils.packaging import ( check_requires_python, get_requires_python, -@@ -199,7 +200,9 @@ class Resolver(object): +@@ -203,7 +204,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -39,29 +60,8 @@ index ca269121..e8d939bf 100644 req.should_reinstall = True req.satisfied_by = None -diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 22ac24b9..8a461b95 100644 ---- a/src/pip/_internal/req/req_install.py -+++ b/src/pip/_internal/req/req_install.py -@@ -42,6 +42,7 @@ from pip._internal.utils.misc import ( - ask_path_exists, - backup_dir, - display_path, -+ dist_in_install_path, - dist_in_site_packages, - dist_in_usersite, - get_installed_version, -@@ -457,7 +458,7 @@ class InstallRequirement(object): - "lack sys.path precedence to %s in %s" % - (existing_dist.project_name, existing_dist.location) - ) -- else: -+ elif dist_in_install_path(existing_dist): - self.should_reinstall = True - else: - if self.editable and self.satisfied_by: diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 4a581601..2617ad33 100644 +index 09031825..3c064f8f 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -29,6 +29,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote @@ -72,7 +72,7 @@ index 4a581601..2617ad33 100644 get_major_minor_version, site_packages, user_site, -@@ -385,6 +386,16 @@ def dist_in_site_packages(dist): +@@ -400,6 +401,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) @@ -90,5 +90,6 @@ index 4a581601..2617ad33 100644 # type: (Distribution) -> bool """ -- -2.24.1 +2.23.0 + diff --git a/sources b/sources index 650177d..f35021c 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (pip-20.0.2.tar.gz) = f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857 +SHA512 (pip-20.1b1.tar.gz) = 61ea2014895500f68fed8168a904ca581d4e0939e8152f439b797b9905f9e2987bb320a3102a0e2357ec7d8fdad9e75bf7079e14e50477304d763496b1719187 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 0e2a444500c20ec9fd6f433582f28e20369b06de Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Wed, 29 Apr 2020 13:50:31 +0200 Subject: [PATCH 142/287] Update to 20.1 --- python-pip.spec | 10 +++++++++- sources | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4db7070..4e438c9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -4,7 +4,6 @@ %global srcname pip %global base_version 20.1 -%global prerel b1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -205,6 +204,12 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} +# %%pyX_install_wheel and %%pyproject_install was adapted to workaround PEP 610 handling in pip 20.1+ +# (This explicit conflict can be removed after we update to Python 3.9) +Conflicts: python-rpm-macros < 3.8-4 +Conflicts: python3-rpm-macros < 3.8-4 +Conflicts: pyproject-rpm-macros < 0-15 + %{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} @@ -389,6 +394,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 +- Update to 20.1 + * Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 - Update to 20.1~b1 diff --git a/sources b/sources index f35021c..9e4b99a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (pip-20.1b1.tar.gz) = 61ea2014895500f68fed8168a904ca581d4e0939e8152f439b797b9905f9e2987bb320a3102a0e2357ec7d8fdad9e75bf7079e14e50477304d763496b1719187 +SHA512 (pip-20.1.tar.gz) = 19cc1172540bec4b0c6facf55fa9c463bf8f4391dd1a643ac208c8e0b787950b2d72a6ec8f0772c7e6582c6b6a4a103f31ad58ffa2119fb574c174e5ec77b0c1 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 5ef43e57f4bfd93e5c72216d2a0c7062f26280b4 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Wed, 20 May 2020 09:36:10 +0200 Subject: [PATCH 143/287] Update to 20.1.1 --- python-pip.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4e438c9..c340af1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,7 +3,7 @@ %bcond_without doc %global srcname pip -%global base_version 20.1 +%global base_version 20.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -394,6 +394,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 +- Update to 20.1.1 + * Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 - Update to 20.1 diff --git a/sources b/sources index 9e4b99a..3c231b0 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (pip-20.1.tar.gz) = 19cc1172540bec4b0c6facf55fa9c463bf8f4391dd1a643ac208c8e0b787950b2d72a6ec8f0772c7e6582c6b6a4a103f31ad58ffa2119fb574c174e5ec77b0c1 +SHA512 (pip-20.1.1.tar.gz) = ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658 SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 97bba915890e9476383434ddcf9628b4614ed7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 22 May 2020 00:30:49 +0200 Subject: [PATCH 144/287] Bootstrap for Python 3.9 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index c340af1..86ecd8b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 %bcond_without tests %bcond_without doc @@ -18,7 +20,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -394,6 +396,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Thu May 21 2020 Miro Hrončok - 20.1.1-2 +- Bootstrap for Python 3.9 + * Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 - Update to 20.1.1 From 230ac9caa819b93422b9d65b99a0fd8d870cfba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 24 May 2020 03:30:08 +0200 Subject: [PATCH 145/287] Rebuilt for Python 3.9 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 86ecd8b..fb82b25 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 %bcond_without tests %bcond_without doc @@ -20,7 +18,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -396,6 +394,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Sun May 24 2020 Miro Hrončok - 20.1.1-3 +- Rebuilt for Python 3.9 + * Thu May 21 2020 Miro Hrončok - 20.1.1-2 - Bootstrap for Python 3.9 From acf982e208a9cfefe12de3ddafe3e6fb426a12c3 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 16 Jun 2020 14:10:10 +0200 Subject: [PATCH 146/287] Deselect tests incompatible with the latest virtualenv --- python-pip.spec | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index fb82b25..7b3e43b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -18,7 +18,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -348,17 +348,29 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} # test_config_file_venv_option # TODO investigate failures # test_uninstall_non_local_distutils +# Incompatible with the latest virtualenv +# test_from_link_vcs_with_source_dir_obtains_commit_id +# test_from_link_vcs_without_source_dir +# test_should_cache_git_sha pytest_k='not completion and not test_pep517_and_build_options and not test_config_file_venv_option and - not test_uninstall_non_local_distutils' + not test_uninstall_non_local_distutils and + not test_from_link_vcs_with_source_dir_obtains_commit_id and + not test_from_link_vcs_without_source_dir and + not test_should_cache_git_sha' mkdir _bin export PATH="$PWD/_bin:$PATH" export PYTHONPATH=%{buildroot}%{python3_sitelib} ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip -%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" +# --deselect'ed tests are not compatible with the latest virtualenv +# These files contain almost 500 tests so we should enable them back +# as soon as pip will be compatible upstream +# https://github.com/pypa/pip/pull/8441 +%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" \ + --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py %endif @@ -394,6 +406,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 +- Deselect tests incompatible with the latest virtualenv + * Sun May 24 2020 Miro Hrončok - 20.1.1-3 - Rebuilt for Python 3.9 From 8253bfab575107a48645a3635dbc05d5463ee6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 8 Jul 2020 10:55:58 +0200 Subject: [PATCH 147/287] Update bundled provides to match 20.1.1 and verify it in %check --- python-pip.spec | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 7b3e43b..a79ed00 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -18,7 +18,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -122,30 +122,32 @@ Packages" or "Pip Installs Python". # Virtual provides for the packages bundled by pip. -# You can find the versions in src/pip/_vendor/vendor.txt file. +# You can generate it with: +# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 -Provides: bundled(python%{1}dist(CacheControl)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2019.11.28 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 +Provides: bundled(python%{1}dist(certifi)) = 2020.4.5.1 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 Provides: bundled(python%{1}dist(colorama)) = 0.4.3 -Provides: bundled(python%{1}dist(contextlib2)) = 0.6.0 -Provides: bundled(python%{1}dist(distlib)) = 0.3.0 -Provides: bundled(python%{1}dist(distro)) = 1.4.0 +Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 +Provides: bundled(python%{1}dist(distlib)) = 0.3 +Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 -Provides: bundled(python%{1}dist(idna)) = 2.8 +Provides: bundled(python%{1}dist(idna)) = 2.9 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 -Provides: bundled(python%{1}dist(msgpack)) = 0.6.2 -Provides: bundled(python%{1}dist(packaging)) = 20.1 -Provides: bundled(python%{1}dist(pep517)) = 0.7.0 +Provides: bundled(python%{1}dist(msgpack)) = 1 +Provides: bundled(python%{1}dist(packaging)) = 20.3 +Provides: bundled(python%{1}dist(pep517)) = 0.8.2 Provides: bundled(python%{1}dist(progress)) = 1.5 -Provides: bundled(python%{1}dist(pyparsing)) = 2.4.6 -Provides: bundled(python%{1}dist(pytoml)) = 0.1.21 -Provides: bundled(python%{1}dist(requests)) = 2.22.0 +Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 +Provides: bundled(python%{1}dist(requests)) = 2.23 +Provides: bundled(python%{1}dist(resolvelib)) = 0.3 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 44.0.0 -Provides: bundled(python%{1}dist(six)) = 1.14.0 -Provides: bundled(python%{1}dist(urllib3)) = 1.25.7 +Provides: bundled(python%{1}dist(setuptools)) = 44 +Provides: bundled(python%{1}dist(six)) = 1.14 +Provides: bundled(python%{1}dist(toml)) = 0.10 +Provides: bundled(python%{1}dist(urllib3)) = 1.25.8 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -173,7 +175,9 @@ Summary: A tool for installing and managing Python3 packages BuildRequires: python%{python3_pkgversion}-devel # python3 bootstrap: this is rebuilt before the final build of python3, which # adds the dependency on python3-rpm-generators, so we require it manually -BuildRequires: python%{python3_pkgversion}-rpm-generators +# Note that the package prefix is always python3-, even if we build for 3.X +# The minimal version is for bundled provides verification script +BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if %{with tests} @@ -342,6 +346,10 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %if %{with tests} %check +# Verify bundled provides are up to date +%{_rpmconfigdir}/pythonbundles.py src/pip/_vendor/vendor.txt --compare-with '%{bundled 3}' + +# Upstream tests # bash completion tests only work from installed package # needs unaltered sys.path and we cannot do that in %%check # test_pep517_and_build_options @@ -406,6 +414,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 +- Update bundled provides to match 20.1.1 + * Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 - Deselect tests incompatible with the latest virtualenv From e195c5181895cc467699c39c541af988ca64f4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 8 Jul 2020 11:00:46 +0200 Subject: [PATCH 148/287] Switch to %pytest to simplify the spec file /usr/bin/pip is Python 3 now anyway, so we can drop the custom _bin hack. --- python-pip.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a79ed00..22a7c02 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -368,16 +368,11 @@ pytest_k='not completion and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha' -mkdir _bin -export PATH="$PWD/_bin:$PATH" - -export PYTHONPATH=%{buildroot}%{python3_sitelib} -ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip # --deselect'ed tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 -%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" \ +%pytest -m 'not network' -k "$(echo $pytest_k)" \ --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py %endif From 159feb818ec9d3b7633cf78300b4b6bd1b8352a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 8 Jul 2020 11:07:20 +0200 Subject: [PATCH 149/287] Cleanup explicit conflicts with old RPM macros --- python-pip.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 22a7c02..2f48fa6 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -208,12 +208,6 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# %%pyX_install_wheel and %%pyproject_install was adapted to workaround PEP 610 handling in pip 20.1+ -# (This explicit conflict can be removed after we update to Python 3.9) -Conflicts: python-rpm-macros < 3.8-4 -Conflicts: python3-rpm-macros < 3.8-4 -Conflicts: pyproject-rpm-macros < 0-15 - %{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} From 21fe0a233c3f07490d52f847e60cf7a777c94c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 8 Jul 2020 17:49:13 +0200 Subject: [PATCH 150/287] Backport: Update tests to be endian safe, fix FTBFS on s390x Also, use %autopatch to apply the patches. --- b30dd1e04e.patch | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 12 ++++---- 2 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 b30dd1e04e.patch diff --git a/b30dd1e04e.patch b/b30dd1e04e.patch new file mode 100644 index 0000000..1a6b663 --- /dev/null +++ b/b30dd1e04e.patch @@ -0,0 +1,75 @@ +From b30dd1e04e1f37901733f1be0a5a1e02c466ad0c Mon Sep 17 00:00:00 2001 +From: gutsytechster +Date: Wed, 15 Apr 2020 19:54:48 +0530 +Subject: [PATCH] fix(tests/unit): Update tests to be endian safe + +This updates `test_path_to_display` and `test_str_to_display__encoding` +to use the endian safe expected result instead of the hardcoded one. + +This fixes https://github.com/pypa/pip/issues/7921 +--- + tests/unit/test_compat.py | 8 +++++++- + tests/unit/test_utils.py | 16 +++++++++++++--- + 2 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py +index 1f31bc5ce8..b13087a1dd 100644 +--- a/tests/unit/test_compat.py ++++ b/tests/unit/test_compat.py +@@ -2,6 +2,7 @@ + + import locale + import os ++import sys + + import pytest + +@@ -91,8 +92,13 @@ def test_str_to_display__decode_error(monkeypatch, caplog): + # Encode with an incompatible encoding. + data = u'ab'.encode('utf-16') + actual = str_to_display(data) ++ # Keep the expected value endian safe ++ if sys.byteorder == "little": ++ expected = "\\xff\\xfea\x00b\x00" ++ elif sys.byteorder == "big": ++ expected = "\\xfe\\xff\x00a\x00b" + +- assert actual == u'\\xff\\xfea\x00b\x00', ( ++ assert actual == expected, ( + # Show the encoding for easier troubleshooting. + 'encoding: {!r}'.format(locale.getpreferredencoding()) + ) +diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py +index 7d74a66498..ebabd29e26 100644 +--- a/tests/unit/test_utils.py ++++ b/tests/unit/test_utils.py +@@ -375,6 +375,18 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): + rmtree('foo') + + ++if sys.byteorder == "little": ++ expected_byte_string = ( ++ u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" ++ "\\x00d\\x00\\xe9\\x00f\\x00'" ++ ) ++elif sys.byteorder == "big": ++ expected_byte_string = ( ++ u"b'\\xfe\\xff\\x00/\\x00p\\x00a\\x00t\\x00h\\" ++ "x00/\\x00d\\x00\\xe9\\x00f'" ++ ) ++ ++ + @pytest.mark.parametrize('path, fs_encoding, expected', [ + (None, None, None), + # Test passing a text (unicode) string. +@@ -383,9 +395,7 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): + (u'/path/déf'.encode('utf-8'), 'utf-8', u'/path/déf'), + # Test a bytes object with a character that can't be decoded. + (u'/path/déf'.encode('utf-8'), 'ascii', u"b'/path/d\\xc3\\xa9f'"), +- (u'/path/déf'.encode('utf-16'), 'utf-8', +- u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" +- "\\x00d\\x00\\xe9\\x00f\\x00'"), ++ (u'/path/déf'.encode('utf-16'), 'utf-8', expected_byte_string), + ]) + def test_path_to_display(monkeypatch, path, fs_encoding, expected): + monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: fs_encoding) diff --git a/python-pip.spec b/python-pip.spec index 2f48fa6..37ca568 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -90,6 +90,12 @@ Patch4: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch5: nowarn-pip._internal.main.patch +# Backport: Update tests to be endian safe +# This updates `test_path_to_display` and `test_str_to_display__encoding` +# to use the endian safe expected result instead of the hardcoded one. +# This fixes https://github.com/pypa/pip/issues/7921 +Patch6: https://github.com/pypa/pip/commit/b30dd1e04e.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -253,11 +259,7 @@ mv python-docs-theme-2018.2 python-docs-theme popd %endif -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%autopatch -p1 # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem From 728b4e49d0fbd1323259208dd518a9a14d19487a Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Fri, 10 Jul 2020 08:17:12 +0200 Subject: [PATCH 151/287] Do not emit a warning about root privileges when --root is used --- emit-a-warning-when-running-with-root-privileges.patch | 2 +- python-pip.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch index 4d95b77..7c6a390 100644 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ b/emit-a-warning-when-running-with-root-privileges.patch @@ -33,7 +33,7 @@ index 70bda2e2..1e750ae1 100644 + sys.base_prefix != sys.prefix)) + + # Check whether we have root privileges and aren't in venv/virtualenv -+ if os.getuid() == 0 and not is_venv(): ++ if os.getuid() == 0 and not is_venv() and not options.root_path: + command = path.basename(sys.argv[0]) + if command == "__main__.py": + command = path.basename(sys.executable) + " -m pip" diff --git a/python-pip.spec b/python-pip.spec index 37ca568..1e280dc 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -18,7 +18,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -405,6 +405,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 +- Do not emit a warning about root privileges when --root is used + * Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 - Update bundled provides to match 20.1.1 From 588f123d93912aacd74cdf12114556605b00b723 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 02:48:00 +0000 Subject: [PATCH 152/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 1e280dc..fe17121 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -18,7 +18,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -405,6 +405,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 - Do not emit a warning about root privileges when --root is used From 9a044bd6738a3594a80c0b4af3e899e6d9e41c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 4 Aug 2020 20:43:35 +0200 Subject: [PATCH 153/287] Run Python 3.4 tests optionally https://fedoraproject.org/wiki/Changes/RetirePython34 --- tests/tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index c39fe89..dbf1697 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,9 +10,9 @@ - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" dest: "pyproject-rpm-macros" tests: - - smoke34: + - smoke34_optional: dir: python/smoke - run: VERSION=3.4 ./venv.sh + run: VERSION=3.4 INSTALL_OR_SKIP=true ./venv.sh - smoke35: dir: python/smoke run: VERSION=3.5 ./venv.sh @@ -31,9 +31,9 @@ - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - - smoke34_virtualenv: + - smoke34_virtualenv_optional: dir: python/smoke - run: VERSION=3.4 METHOD=virtualenv ./venv.sh + run: VERSION=3.4 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke35_virtualenv: dir: python/smoke run: VERSION=3.5 METHOD=virtualenv ./venv.sh @@ -67,7 +67,6 @@ - gcc - virtualenv - python27 - - python34 - python35 - python36 - python37 From 8825fe54dc6e32d8edcbecfe4b9f563a50e513b5 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Wed, 5 Aug 2020 18:46:46 +0200 Subject: [PATCH 154/287] Update to 20.2.2 (#1838553) --- b30dd1e04e.patch | 75 ------------------- dummy-certifi.patch | 34 +++++---- python-pip.rpmlintrc | 4 + python-pip.spec | 39 +++++----- ...existing-dist-only-if-path-conflicts.patch | 27 ++++--- sources | 4 +- 6 files changed, 59 insertions(+), 124 deletions(-) delete mode 100644 b30dd1e04e.patch diff --git a/b30dd1e04e.patch b/b30dd1e04e.patch deleted file mode 100644 index 1a6b663..0000000 --- a/b30dd1e04e.patch +++ /dev/null @@ -1,75 +0,0 @@ -From b30dd1e04e1f37901733f1be0a5a1e02c466ad0c Mon Sep 17 00:00:00 2001 -From: gutsytechster -Date: Wed, 15 Apr 2020 19:54:48 +0530 -Subject: [PATCH] fix(tests/unit): Update tests to be endian safe - -This updates `test_path_to_display` and `test_str_to_display__encoding` -to use the endian safe expected result instead of the hardcoded one. - -This fixes https://github.com/pypa/pip/issues/7921 ---- - tests/unit/test_compat.py | 8 +++++++- - tests/unit/test_utils.py | 16 +++++++++++++--- - 2 files changed, 20 insertions(+), 4 deletions(-) - -diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py -index 1f31bc5ce8..b13087a1dd 100644 ---- a/tests/unit/test_compat.py -+++ b/tests/unit/test_compat.py -@@ -2,6 +2,7 @@ - - import locale - import os -+import sys - - import pytest - -@@ -91,8 +92,13 @@ def test_str_to_display__decode_error(monkeypatch, caplog): - # Encode with an incompatible encoding. - data = u'ab'.encode('utf-16') - actual = str_to_display(data) -+ # Keep the expected value endian safe -+ if sys.byteorder == "little": -+ expected = "\\xff\\xfea\x00b\x00" -+ elif sys.byteorder == "big": -+ expected = "\\xfe\\xff\x00a\x00b" - -- assert actual == u'\\xff\\xfea\x00b\x00', ( -+ assert actual == expected, ( - # Show the encoding for easier troubleshooting. - 'encoding: {!r}'.format(locale.getpreferredencoding()) - ) -diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py -index 7d74a66498..ebabd29e26 100644 ---- a/tests/unit/test_utils.py -+++ b/tests/unit/test_utils.py -@@ -375,6 +375,18 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): - rmtree('foo') - - -+if sys.byteorder == "little": -+ expected_byte_string = ( -+ u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" -+ "\\x00d\\x00\\xe9\\x00f\\x00'" -+ ) -+elif sys.byteorder == "big": -+ expected_byte_string = ( -+ u"b'\\xfe\\xff\\x00/\\x00p\\x00a\\x00t\\x00h\\" -+ "x00/\\x00d\\x00\\xe9\\x00f'" -+ ) -+ -+ - @pytest.mark.parametrize('path, fs_encoding, expected', [ - (None, None, None), - # Test passing a text (unicode) string. -@@ -383,9 +395,7 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): - (u'/path/déf'.encode('utf-8'), 'utf-8', u'/path/déf'), - # Test a bytes object with a character that can't be decoded. - (u'/path/déf'.encode('utf-8'), 'ascii', u"b'/path/d\\xc3\\xa9f'"), -- (u'/path/déf'.encode('utf-16'), 'utf-8', -- u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" -- "\\x00d\\x00\\xe9\\x00f\\x00'"), -+ (u'/path/déf'.encode('utf-16'), 'utf-8', expected_byte_string), - ]) - def test_path_to_display(monkeypatch, path, fs_encoding, expected): - monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: fs_encoding) diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 7c864fc..992aed4 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,27 +1,35 @@ -From 09bf87d33141a5c06a1d410839d162262baa16c4 Mon Sep 17 00:00:00 2001 +From cf96ff346639d1b9f5efa3fd0976694e04df3f5f Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Sun, 26 Apr 2020 21:38:44 +0200 Subject: [PATCH] Dummy certifi patch --- - src/pip/_vendor/certifi/core.py | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + src/pip/_vendor/certifi/core.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 56b52a3c..e99043f0 100644 +index 8987449..d174ced 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -21,9 +21,7 @@ except ImportError: +@@ -9,6 +9,7 @@ This module returns the installation location of cacert.pem or its contents. + import os + try: ++ raise ImportError # force fallback + from importlib.resources import path as get_path, read_text - def where(): -- f = os.path.dirname(__file__) + _CACERT_CTX = None +@@ -51,9 +52,7 @@ except ImportError: + # If we don't have importlib.resources, then we will just do the old logic + # of assuming we're on the filesystem and munge the path directly. + def where(): +- f = os.path.dirname(__file__) - -- return os.path.join(f, "cacert.pem") -+ return '/etc/pki/tls/certs/ca-bundle.crt' - - +- return os.path.join(f, "cacert.pem") ++ return '/etc/pki/tls/certs/ca-bundle.crt' + + def contents(): --- -2.23.0 +-- +2.25.4 diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index 5ccb1f8..39079e3 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -8,6 +8,10 @@ addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appd addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b') addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/chardet/cli/chardetect.py\b') +# REQUESTED dist-info file is not meant to have any content +# Discussion: https://src.fedoraproject.org/rpms/python-pip/pull-request/69#comment-52525 +addFilter(r'zero-length .+/site-packages/.+\.dist-info/REQUESTED\b') + # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') diff --git a/python-pip.spec b/python-pip.spec index fe17121..e1a1b86 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,12 +3,13 @@ %bcond_without doc %global srcname pip -%global base_version 20.1.1 +%global base_version 20.2.2 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels %if %{with doc} +# Commit hash to use from the repo https://github.com/pypa/pypa-docs-theme %global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931 %endif @@ -18,7 +19,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 7%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -40,11 +41,12 @@ Summary: A tool for installing and managing Python packages # pep517: MIT # progress: ISC # pyparsing: MIT -# pytoml: MIT # requests: ASL 2.0 +# resolvelib: ISC # retrying: ASL 2.0 # setuptools: MIT # six: MIT +# toml: MIT # urllib3: MIT # webencodings: BSD @@ -90,12 +92,6 @@ Patch4: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch5: nowarn-pip._internal.main.patch -# Backport: Update tests to be endian safe -# This updates `test_path_to_display` and `test_str_to_display__encoding` -# to use the endian safe expected result instead of the hardcoded one. -# This fixes https://github.com/pypa/pip/issues/7921 -Patch6: https://github.com/pypa/pip/commit/b30dd1e04e.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -131,29 +127,29 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(appdirs)) = 1.4.3 +Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2020.4.5.1 +Provides: bundled(python%{1}dist(certifi)) = 2020.6.20 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 Provides: bundled(python%{1}dist(colorama)) = 0.4.3 Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 -Provides: bundled(python%{1}dist(distlib)) = 0.3 +Provides: bundled(python%{1}dist(distlib)) = 0.3.1 Provides: bundled(python%{1}dist(distro)) = 1.5 -Provides: bundled(python%{1}dist(html5lib)) = 1.0.1 -Provides: bundled(python%{1}dist(idna)) = 2.9 +Provides: bundled(python%{1}dist(html5lib)) = 1.1 +Provides: bundled(python%{1}dist(idna)) = 2.10 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 Provides: bundled(python%{1}dist(msgpack)) = 1 -Provides: bundled(python%{1}dist(packaging)) = 20.3 +Provides: bundled(python%{1}dist(packaging)) = 20.4 Provides: bundled(python%{1}dist(pep517)) = 0.8.2 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.23 -Provides: bundled(python%{1}dist(resolvelib)) = 0.3 +Provides: bundled(python%{1}dist(requests)) = 2.24 +Provides: bundled(python%{1}dist(resolvelib)) = 0.4 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 Provides: bundled(python%{1}dist(setuptools)) = 44 -Provides: bundled(python%{1}dist(six)) = 1.14 -Provides: bundled(python%{1}dist(toml)) = 0.10 -Provides: bundled(python%{1}dist(urllib3)) = 1.25.8 +Provides: bundled(python%{1}dist(six)) = 1.15 +Provides: bundled(python%{1}dist(toml)) = 0.10.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.25.9 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -405,6 +401,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 +- Update to 20.2.2 (#1838553) + * Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index ff32533..ba3feb6 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From d381c59fdc15949c4dc293bd92bbccb60289a703 Mon Sep 17 00:00:00 2001 +From 854fd7296bb9306d46ba3cc8bb7c6f18a7960ed6 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Sun, 26 Apr 2020 21:19:03 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -17,18 +17,18 @@ Co-Authored-By: Victor Stinner 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 3b28209b..d14217e9 100644 +index 4759f4a..2e76e35 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -38,6 +38,7 @@ from pip._internal.utils.misc import ( +@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, + dist_in_install_path, dist_in_site_packages, dist_in_usersite, - get_installed_version, -@@ -444,7 +445,7 @@ class InstallRequirement(object): + get_distribution, +@@ -446,7 +447,7 @@ class InstallRequirement(object): "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -36,12 +36,12 @@ index 3b28209b..d14217e9 100644 + elif dist_in_install_path(existing_dist): self.should_reinstall = True else: - if self.editable and self.satisfied_by: + if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index cdb44d19..52e122c6 100644 +index c9b4c66..ff361d8 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -33,6 +33,7 @@ from pip._internal.resolution.base import BaseResolver +@@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver from pip._internal.utils.compatibility_tags import get_supported from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info @@ -49,7 +49,7 @@ index cdb44d19..52e122c6 100644 from pip._internal.utils.packaging import ( check_requires_python, get_requires_python, -@@ -203,7 +204,9 @@ class Resolver(BaseResolver): +@@ -207,7 +208,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -61,10 +61,10 @@ index cdb44d19..52e122c6 100644 req.satisfied_by = None diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 09031825..3c064f8f 100644 +index 24a7455..5fd48d3 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -29,6 +29,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote +@@ -31,6 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote from pip import __version__ from pip._internal.exceptions import CommandError from pip._internal.locations import ( @@ -72,7 +72,7 @@ index 09031825..3c064f8f 100644 get_major_minor_version, site_packages, user_site, -@@ -400,6 +401,16 @@ def dist_in_site_packages(dist): +@@ -403,6 +404,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) @@ -90,6 +90,5 @@ index 09031825..3c064f8f 100644 # type: (Distribution) -> bool """ -- -2.23.0 - +2.25.4 diff --git a/sources b/sources index 3c231b0..2256936 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (pip-20.1.1.tar.gz) = ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658 -SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d +SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 +SHA512 (pip-20.2.2.tar.gz) = 0b000977f169900eebd4afeabfc7bd59b104246bbb048ce5b4db7f701e20ef1caef22c7ca2311843eafc4a37abbb81a74beddddf655eeaf2e33e3949d5a811e6 From aab1da4a870cfb630d0b5e4c1db0e3ed4e7adf6e Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Mon, 19 Oct 2020 03:29:18 +0200 Subject: [PATCH 155/287] Update to 20.2.4 (#1889112) --- python-pip.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e1a1b86..7467840 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,7 +3,7 @@ %bcond_without doc %global srcname pip -%global base_version 20.2.2 +%global base_version 20.2.4 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -401,6 +401,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 +- Update to 20.2.4 (#1889112) + * Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 - Update to 20.2.2 (#1838553) diff --git a/sources b/sources index 2256936..3a0489d 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d +SHA512 (pip-20.2.4.tar.gz) = 649fdc6baa1ebe741717bd1e5ed8f2450d79f8bc0d06f2804c27488be9018f6fa6cc2eccc3ec2801442073f59ac0b8c377612c25116126aa919aa95050f4214f SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 -SHA512 (pip-20.2.2.tar.gz) = 0b000977f169900eebd4afeabfc7bd59b104246bbb048ce5b4db7f701e20ef1caef22c7ca2311843eafc4a37abbb81a74beddddf655eeaf2e33e3949d5a811e6 +SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d From 32ac5407bd0c661a56eeefd010dceac381404af5 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 3 Nov 2020 12:28:16 +0100 Subject: [PATCH 156/287] Add python3-cryptography test dependency Cryptography is used directly and it has been so far only brought in by breezy. --- python-pip.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-pip.spec b/python-pip.spec index 7467840..cf919e4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -183,6 +183,7 @@ BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if %{with tests} +BuildRequires: python%{python3_pkgversion}-cryptography BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend From 79b09f862d9201a80ea7a2331238562b46387c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 15 Nov 2020 23:34:59 +0100 Subject: [PATCH 157/287] Also test with hg --- python-pip.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-pip.spec b/python-pip.spec index cf919e4..a17b0df 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -58,6 +58,7 @@ BuildArch: noarch %if %{with tests} BuildRequires: /usr/bin/git +BuildRequires: /usr/bin/hg BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/svn BuildRequires: python-setuptools-wheel From e8ba55beb47b7d85d96a20a512a4c49d50a709e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 26 Nov 2020 18:07:19 +0100 Subject: [PATCH 158/287] vendor_meta.sh is not used any more --- python-pip.spec | 2 -- vendor_meta.sh | 21 --------------------- 2 files changed, 23 deletions(-) delete mode 100755 vendor_meta.sh diff --git a/python-pip.spec b/python-pip.spec index a17b0df..9d5aeed 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,8 +16,6 @@ %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) Name: python-%{srcname} -# When updating, update the bundled libraries versions bellow! -# You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} Release: 1%{?dist} Summary: A tool for installing and managing Python packages diff --git a/vendor_meta.sh b/vendor_meta.sh deleted file mode 100755 index 3ae5204..0000000 --- a/vendor_meta.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/bash -eu - -if [ $# -ne 1 ]; then - echo "Usage: ./vendor_meta.sh pip-10.0.0/src/pip/_vendor/vendor.txt" - exit 1 -fi - -licenses='' - -while read req; do - req=$(echo $req | cut -f1 -d' ') - name=$(echo $req | cut -f1 -d'=') - version=$(echo $req | cut -f3 -d'=' | tr -d '\r') - echo "Provides: bundled(python%{1}dist($name)) = $version" - license="$(pyp2rpm -v ${version} --no-venv ${name} | grep '^License:' | sed -e 's/License:\s*//')" - licenses="$licenses\n$name: $license" -done < $1 - -echo -echo -echo -e "$licenses" From f444f50981d3bc795d5ca0481a67e5ca41f56a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Dec 2020 13:27:39 +0100 Subject: [PATCH 159/287] Disable tests and documentation in Fedora ELN (and RHEL) --- python-pip.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 9d5aeed..f705db1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,6 +1,16 @@ +# The original RHEL 9 content set is defined by (build)dependencies +# of the packages in Fedora ELN. Hence we disable tests and documentation here +# to prevent pulling many unwanted packages in. +# Once the RHEL 9 content set is defined and/or RHEL 9 forks from ELN, +# the conditional can be removed from the Fedora spec file. +# We intentionally keep this enabled on EPEL. +%if 0%{?rhel} >= 9 && !0%{?epel} +%bcond_with tests +%bcond_with doc +%else %bcond_without tests - %bcond_without doc +%endif %global srcname pip %global base_version 20.2.4 @@ -17,7 +27,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -401,6 +411,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Fri Dec 04 2020 Miro Hrončok - 20.2.4-2 +- Disable tests and documentation in Fedora ELN (and RHEL) + * Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 - Update to 20.2.4 (#1889112) From 58c5acd7e88b67ddfd7ecd1355743e656940449e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 30 Nov 2020 15:44:28 +0100 Subject: [PATCH 160/287] WIP: Upgrade to 20.3 --- html_theme_path.patch | 11 -------- python-pip.spec | 65 +++++++++++++++++-------------------------- sources | 4 +-- 3 files changed, 27 insertions(+), 53 deletions(-) delete mode 100644 html_theme_path.patch diff --git a/html_theme_path.patch b/html_theme_path.patch deleted file mode 100644 index 4209471..0000000 --- a/html_theme_path.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru pip-10.0.1/docs/conf.py pip-10.0.1_patched/docs/conf.py ---- pip-10.0.1/docs/html/conf.py 2018-04-14 13:17:31.000000000 +0200 -+++ pip-10.0.1_patched/docs/html/conf.py 2018-07-23 15:23:31.053267611 +0200 -@@ -134,6 +134,7 @@ - # The theme to use for HTML and HTML Help pages. Major themes that come with - # Sphinx are currently 'default' and 'sphinxdoc'. - html_theme = "pypa_theme" -+html_theme_path = ["pypa", "python-docs-theme"] - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the diff --git a/python-pip.spec b/python-pip.spec index f705db1..e190f7b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,21 +13,16 @@ %endif %global srcname pip -%global base_version 20.2.4 +%global base_version 20.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels -%if %{with doc} -# Commit hash to use from the repo https://github.com/pypa/pypa-docs-theme -%global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931 -%endif - %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -73,24 +68,15 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif -# Themes required to build the docs. -%if %{with doc} -Source1: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz -Source2: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz -%endif - # Downstream only patch # Emit a warning to the user if pip install is run with root privileges # Issue upstream: https://github.com/pypa/pip/issues/4288 Patch1: emit-a-warning-when-running-with-root-privileges.patch -# Add path to the doc themes to conf.py -Patch2: html_theme_path.patch - # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 -Patch3: remove-existing-dist-only-if-path-conflicts.patch +#Patch3: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 @@ -99,7 +85,7 @@ Patch4: dummy-certifi.patch # Don't warn the user about pip._internal.main() entrypoint # In Fedora, we use that in ensurepip and users cannot do anything about it, # this warning is juts moot. Also, the warning breaks CPython test suite. -Patch5: nowarn-pip._internal.main.patch +#Patch5: nowarn-pip._internal.main.patch # Downstream only patch # Users might have local installations of pip from using @@ -138,9 +124,9 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2020.6.20 +Provides: bundled(python%{1}dist(certifi)) = 2020.11.8 Provides: bundled(python%{1}dist(chardet)) = 3.0.4 -Provides: bundled(python%{1}dist(colorama)) = 0.4.3 +Provides: bundled(python%{1}dist(colorama)) = 0.4.4 Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 Provides: bundled(python%{1}dist(distlib)) = 0.3.1 Provides: bundled(python%{1}dist(distro)) = 1.5 @@ -148,17 +134,17 @@ Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 2.10 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 Provides: bundled(python%{1}dist(msgpack)) = 1 -Provides: bundled(python%{1}dist(packaging)) = 20.4 -Provides: bundled(python%{1}dist(pep517)) = 0.8.2 +Provides: bundled(python%{1}dist(packaging)) = 20.7 +Provides: bundled(python%{1}dist(pep517)) = 0.9.1 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.24 -Provides: bundled(python%{1}dist(resolvelib)) = 0.4 +Provides: bundled(python%{1}dist(requests)) = 2.25 +Provides: bundled(python%{1}dist(resolvelib)) = 0.5.3 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.15 -Provides: bundled(python%{1}dist(toml)) = 0.10.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.25.9 +Provides: bundled(python%{1}dist(toml)) = 0.10.2 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.2 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -233,6 +219,7 @@ Packages" or "Pip Installs Python". Summary: A documentation for a tool for installing and managing Python packages BuildRequires: python%{python3_pkgversion}-sphinx +BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs %description doc A documentation for a tool for installing and managing Python packages @@ -254,22 +241,15 @@ Requires: ca-certificates A Python wheel of pip to use with venv. %prep -%setup -q -n %{srcname}-%{upstream_version} - -%if %{with doc} -pushd docs/html -tar -xf %{SOURCE1} -mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa -tar -xf %{SOURCE2} -mv python-docs-theme-2018.2 python-docs-theme -popd -%endif - -%autopatch -p1 +%autosetup -p1 -n %{srcname}-%{upstream_version} # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem +# Do not use furo as HTML theme in docs +# furo is not available in Fedora +sed -i '/html_theme = "furo"/d' docs/html/conf.py + # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels @@ -338,9 +318,10 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -# Make sure the INSTALLER is not pip, otherwise Patch2 won't work +# Make sure the INSTALLER is not pip and remove RECORD, otherwise Patch2 won't work # %%pyproject macros do this for all packages echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER +rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD mkdir -p %{buildroot}%{python_wheeldir} install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} @@ -411,6 +392,12 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Thu Dec 17 2020 Miro Hrončok - 20.3-1 +- Update to 20.3 +- Add support for PEP 600: Future manylinux Platform Tags +- New resolver +- Fixes: rhbz#1893470 + * Fri Dec 04 2020 Miro Hrončok - 20.2.4-2 - Disable tests and documentation in Fedora ELN (and RHEL) diff --git a/sources b/sources index 3a0489d..0c979a6 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (pip-20.2.4.tar.gz) = 649fdc6baa1ebe741717bd1e5ed8f2450d79f8bc0d06f2804c27488be9018f6fa6cc2eccc3ec2801442073f59ac0b8c377612c25116126aa919aa95050f4214f -SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 -SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d +SHA512 (pip-20.3.tar.gz) = 3a1f8294a1b2b1c02fe1558f616dd9fcb4dc7bb341cb1a2e0b4515ed197e6a0191cac3420eda0c0594ca91a551b4d1018c5e4eb9e4913a48af95136b333c3a36 From 0626df487e0b6984690852a11c28f85e2842e9ab Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 2 Dec 2020 16:46:34 +0100 Subject: [PATCH 161/287] Update the patches --- nowarn-pip._internal.main.patch | 2 +- python-pip.spec | 7 ++--- ...existing-dist-only-if-path-conflicts.patch | 27 ++++++++++--------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index fb3ac92..7027cf5 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -26,7 +26,7 @@ index befd01c..d6f3632 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py @@ -7,7 +7,7 @@ if MYPY_CHECK_RUNNING: - from typing import Optional, List + from typing import List, Optional -def _wrapper(args=None): diff --git a/python-pip.spec b/python-pip.spec index e190f7b..74118a5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -70,13 +70,14 @@ BuildRequires: python-wheel-wheel # Downstream only patch # Emit a warning to the user if pip install is run with root privileges -# Issue upstream: https://github.com/pypa/pip/issues/4288 +# Upstream discussion: +# https://discuss.python.org/t/playing-nice-with-external-package-managers/1968/20 Patch1: emit-a-warning-when-running-with-root-privileges.patch # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 -#Patch3: remove-existing-dist-only-if-path-conflicts.patch +Patch3: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 @@ -85,7 +86,7 @@ Patch4: dummy-certifi.patch # Don't warn the user about pip._internal.main() entrypoint # In Fedora, we use that in ensurepip and users cannot do anything about it, # this warning is juts moot. Also, the warning breaks CPython test suite. -#Patch5: nowarn-pip._internal.main.patch +Patch5: nowarn-pip._internal.main.patch # Downstream only patch # Users might have local installations of pip from using diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index ba3feb6..08279c8 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -20,7 +20,7 @@ diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_in index 4759f4a..2e76e35 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( +@@ -41,6 +41,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -28,7 +28,7 @@ index 4759f4a..2e76e35 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -446,7 +447,7 @@ class InstallRequirement(object): +@@ -447,7 +448,7 @@ class InstallRequirement(object): "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -46,10 +46,10 @@ index c9b4c66..ff361d8 100644 from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path - from pip._internal.utils.packaging import ( - check_requires_python, - get_requires_python, -@@ -207,7 +208,9 @@ class Resolver(BaseResolver): + from pip._internal.utils.packaging import check_requires_python, get_requires_python + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + +@@ -204,7 +205,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -64,15 +64,16 @@ diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py index 24a7455..5fd48d3 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -31,6 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote +@@ -31,7 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote + from pip import __version__ from pip._internal.exceptions import CommandError - from pip._internal.locations import ( -+ distutils_scheme, - get_major_minor_version, - site_packages, - user_site, -@@ -403,6 +404,16 @@ def dist_in_site_packages(dist): +-from pip._internal.locations import get_major_minor_version, site_packages, user_site ++from pip._internal.locations import distutils_scheme, get_major_minor_version, site_packages, user_site + from pip._internal.utils.compat import WINDOWS, expanduser, stdlib_pkgs, str_to_display + from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast + from pip._internal.utils.virtualenv import ( +@@ -406,6 +406,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) From 6eac568430dd51111226d96605b9fefcde20f1aa Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 3 Dec 2020 11:21:56 +0100 Subject: [PATCH 162/287] Patch the new resolver to not uninstall from /usr/lib on updates --- ...existing-dist-only-if-path-conflicts.patch | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 08279c8..328d2d5 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -10,12 +10,8 @@ Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner +Co-Authored-By: Petr Viktorin --- - src/pip/_internal/req/req_install.py | 3 ++- - src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/utils/misc.py | 11 +++++++++++ - 3 files changed, 17 insertions(+), 2 deletions(-) - diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index 4759f4a..2e76e35 100644 --- a/src/pip/_internal/req/req_install.py @@ -90,6 +86,33 @@ index 24a7455..5fd48d3 100644 def dist_is_editable(dist): # type: (Distribution) -> bool """ +--- a/src/pip/_internal/resolution/resolvelib/factory.py ++++ b/src/pip/_internal/resolution/resolvelib/factory.py +@@ -1,3 +1,4 @@ + import logging ++import sys + + from pip._vendor.packaging.utils import canonicalize_name +@@ -17,5 +18,7 @@ + dist_in_usersite, + get_installed_distributions, ++ dist_location, + ) ++from pip._internal.locations import distutils_scheme + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + from pip._internal.utils.virtualenv import running_under_virtualenv +@@ -313,4 +316,11 @@ + return None + ++ # Prevent uninstalling packages from /usr ++ if dist_location(dist) in ( ++ distutils_scheme('', prefix=sys.base_prefix)['purelib'], ++ distutils_scheme('', prefix=sys.base_prefix)['platlib'], ++ ): ++ return None ++ + # We're installing into global site. The current installation must + # be uninstalled, no matter it's in global or user site, because the -- 2.25.4 From 05d68e041f58ebca5845de105e7fd8c4c6aa0147 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 3 Dec 2020 11:40:40 +0100 Subject: [PATCH 163/287] Remove comment about removed patch --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 74118a5..4f48bbe 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -319,7 +319,7 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -# Make sure the INSTALLER is not pip and remove RECORD, otherwise Patch2 won't work +# Make sure the INSTALLER is not pip and remove RECORD # %%pyproject macros do this for all packages echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD From cae1e54349c2c5db6c6a16d82bfeb76904a8ff5a Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 16 Dec 2020 21:36:25 +0100 Subject: [PATCH 164/287] Remove DeprecationWarning about LegacyVersion --- no-version-warning.patch | 15 +++++++++++++++ python-pip.spec | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 no-version-warning.patch diff --git a/no-version-warning.patch b/no-version-warning.patch new file mode 100644 index 0000000..6d7268f --- /dev/null +++ b/no-version-warning.patch @@ -0,0 +1,15 @@ +diff -rU3 pip-20.3-orig/src/pip/_vendor/packaging/version.py pip-20.3/src/pip/_vendor/packaging/version.py +--- pip-20.3-orig/src/pip/_vendor/packaging/version.py 2020-11-30 12:58:32.000000000 +0100 ++++ pip-20.3/src/pip/_vendor/packaging/version.py 2020-12-16 21:25:15.818221608 +0100 +@@ -124,11 +124,6 @@ + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + +- warnings.warn( +- "Creating a LegacyVersion has been deprecated and will be " +- "removed in the next major release", +- DeprecationWarning, +- ) + + def __str__(self): + # type: () -> str diff --git a/python-pip.spec b/python-pip.spec index 4f48bbe..66e9315 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -88,6 +88,11 @@ Patch4: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch5: nowarn-pip._internal.main.patch +# Don't warn the user about packaging's LegacyVersion being deprecated. +# (This also breaks Python's test suite when warnings are treated as errors.) +# Upstream issue: https://github.com/pypa/packaging/issues/368 +Patch6: no-version-warning.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. From cef1efc8a038aa18f9a591e1f44671abd781b8db Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 17 Dec 2020 15:44:31 +0100 Subject: [PATCH 165/287] Update to 20.3.3 --- python-pip.spec | 9 ++++++--- sources | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 66e9315..b665e3e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 20.3 +%global base_version 20.3.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -140,7 +140,7 @@ Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 2.10 Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 Provides: bundled(python%{1}dist(msgpack)) = 1 -Provides: bundled(python%{1}dist(packaging)) = 20.7 +Provides: bundled(python%{1}dist(packaging)) = 20.8 Provides: bundled(python%{1}dist(pep517)) = 0.9.1 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 @@ -398,7 +398,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog -* Thu Dec 17 2020 Miro Hrončok - 20.3-1 +* Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 +- Update to 20.3.3 + +* Mon Nov 30 2020 Miro Hrončok - 20.3-1 - Update to 20.3 - Add support for PEP 600: Future manylinux Platform Tags - New resolver diff --git a/sources b/sources index 0c979a6..03f8a60 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-20.3.tar.gz) = 3a1f8294a1b2b1c02fe1558f616dd9fcb4dc7bb341cb1a2e0b4515ed197e6a0191cac3420eda0c0594ca91a551b4d1018c5e4eb9e4913a48af95136b333c3a36 +SHA512 (pip-20.3.3.tar.gz) = 362d20e5d2665fa6211cf3836ca02a0340fb34ecde1d5902eecae744eb655d7dcfed0bd464e9db186b87b63a7aaf275e43645cf6321bdddd44b62787de84d87b From b650cd95c00706d5f30943650fbfb932e43b5887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 30 Dec 2020 10:20:05 +0100 Subject: [PATCH 166/287] Add Python 3.10 to the CI tests --- tests/tests.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index dbf1697..1383612 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -28,6 +28,9 @@ - smoke39: dir: python/smoke run: VERSION=3.9 ./venv.sh + - smoke310: + dir: python/smoke + run: VERSION=3.10 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -49,6 +52,9 @@ - smoke39_virtualenv: dir: python/smoke run: VERSION=3.9 METHOD=virtualenv ./venv.sh + - smoke310_virtualenv: + dir: python/smoke + run: VERSION=3.10 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -66,12 +72,13 @@ required_packages: - gcc - virtualenv - - python27 - - python35 - - python36 - - python37 - - python38 - - python39 + - python2.7 + - python3.5 + - python3.6 + - python3.7 + - python3.8 + - python3.9 + - python3.10 - python2-devel - python3-devel - python3-tox From 093819ce2ef1ccaecd829ad2c445156db11b0774 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 26 Jan 2021 10:11:15 +0100 Subject: [PATCH 167/287] Update to 21.0 (#1919530) --- python-pip.spec | 29 +++--- ...existing-dist-only-if-path-conflicts.patch | 96 +++++++++++-------- sources | 2 +- 3 files changed, 71 insertions(+), 56 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b665e3e..2a5fb5b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,16 +13,16 @@ %endif %global srcname pip -%global base_version 20.3.3 +%global base_version 21.0 %global upstream_version %{base_version}%{?prerel} -%global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl +%global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -130,22 +130,21 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2020.11.8 -Provides: bundled(python%{1}dist(chardet)) = 3.0.4 +Provides: bundled(python%{1}dist(certifi)) = 2020.12.5 +Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 Provides: bundled(python%{1}dist(distlib)) = 0.3.1 Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 2.10 -Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23 -Provides: bundled(python%{1}dist(msgpack)) = 1 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 20.8 Provides: bundled(python%{1}dist(pep517)) = 0.9.1 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.25 -Provides: bundled(python%{1}dist(resolvelib)) = 0.5.3 +Provides: bundled(python%{1}dist(requests)) = 2.25.1 +Provides: bundled(python%{1}dist(resolvelib)) = 0.5.4 Provides: bundled(python%{1}dist(retrying)) = 1.3.3 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.15 @@ -256,13 +255,14 @@ rm src/pip/_vendor/certifi/*.pem # furo is not available in Fedora sed -i '/html_theme = "furo"/d' docs/html/conf.py +# towncrier extension for Sphinx is not yet available in Fedora +sed -i "/'sphinxcontrib.towncrier',/d" docs/html/conf.py + # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels -# Upstream uses a Python 2/3 compatibility library for csv with Python 3 semantics in tests -# We only target Python 3 and csv23 is not (yet) packaged -# As of 20.1b1, this workaround was sufficient to get around the missing dependency -sed -i -e 's/csv23/csv/g' tests/lib/wheel.py +# Remove shebang from files in bundled chardet +grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" %build @@ -398,6 +398,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Jan 26 2021 Lumír Balhar - 21.0-1 +- Update to 21.0 (#1919530) + * Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 - Update to 20.3.3 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 328d2d5..01c46ad 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,7 +1,7 @@ -From 854fd7296bb9306d46ba3cc8bb7c6f18a7960ed6 Mon Sep 17 00:00:00 2001 -From: Tomas Hrnciar -Date: Sun, 26 Apr 2020 21:19:03 +0200 -Subject: [PATCH] Prevent removing of the system packages installed under +From 0c41df7c4161de2453d5161382a3bbfc7178bec6 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Tue, 26 Jan 2021 09:05:07 +0100 +Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install -U is executed. @@ -12,11 +12,17 @@ Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin --- + src/pip/_internal/req/req_install.py | 3 ++- + src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- + src/pip/_internal/resolution/resolvelib/factory.py | 10 ++++++++++ + src/pip/_internal/utils/misc.py | 11 +++++++++++ + 4 files changed, 27 insertions(+), 2 deletions(-) + diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 4759f4a..2e76e35 100644 +index 6d0aa30..0a5f8ed 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -41,6 +41,7 @@ from pip._internal.utils.misc import ( +@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -24,7 +30,7 @@ index 4759f4a..2e76e35 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -447,7 +448,7 @@ class InstallRequirement(object): +@@ -445,7 +446,7 @@ class InstallRequirement: "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -34,7 +40,7 @@ index 4759f4a..2e76e35 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index c9b4c66..ff361d8 100644 +index 665dba1..a219e63 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py @@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver @@ -56,20 +62,53 @@ index c9b4c66..ff361d8 100644 req.should_reinstall = True req.satisfied_by = None +diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py +index bfaa052..68915aa 100644 +--- a/src/pip/_internal/resolution/resolvelib/factory.py ++++ b/src/pip/_internal/resolution/resolvelib/factory.py +@@ -1,4 +1,5 @@ + import logging ++import sys + + from pip._vendor.packaging.utils import canonicalize_name + +@@ -18,7 +19,9 @@ from pip._internal.utils.misc import ( + dist_in_site_packages, + dist_in_usersite, + get_installed_distributions, ++ dist_location, + ) ++from pip._internal.locations import distutils_scheme + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + from pip._internal.utils.virtualenv import running_under_virtualenv + +@@ -365,6 +368,13 @@ class Factory: + if dist is None: # Not installed, no uninstallation required. + return None + ++ # Prevent uninstalling packages from /usr ++ if dist_location(dist) in ( ++ distutils_scheme('', prefix=sys.base_prefix)['purelib'], ++ distutils_scheme('', prefix=sys.base_prefix)['platlib'], ++ ): ++ return None ++ + # We're installing into global site. The current installation must + # be uninstalled, no matter it's in global or user site, because the + # user site installation has precedence over global. diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 24a7455..5fd48d3 100644 +index 6dd94e2..7925518 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -31,7 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote - +@@ -27,6 +27,7 @@ from pip._vendor.retrying import retry # type: ignore from pip import __version__ from pip._internal.exceptions import CommandError --from pip._internal.locations import get_major_minor_version, site_packages, user_site + from pip._internal.locations import get_major_minor_version, site_packages, user_site +from pip._internal.locations import distutils_scheme, get_major_minor_version, site_packages, user_site - from pip._internal.utils.compat import WINDOWS, expanduser, stdlib_pkgs, str_to_display + from pip._internal.utils.compat import WINDOWS, stdlib_pkgs from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast from pip._internal.utils.virtualenv import ( -@@ -406,6 +406,16 @@ def dist_in_site_packages(dist): +@@ -398,6 +399,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) @@ -86,33 +125,6 @@ index 24a7455..5fd48d3 100644 def dist_is_editable(dist): # type: (Distribution) -> bool """ ---- a/src/pip/_internal/resolution/resolvelib/factory.py -+++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,3 +1,4 @@ - import logging -+import sys - - from pip._vendor.packaging.utils import canonicalize_name -@@ -17,5 +18,7 @@ - dist_in_usersite, - get_installed_distributions, -+ dist_location, - ) -+from pip._internal.locations import distutils_scheme - from pip._internal.utils.typing import MYPY_CHECK_RUNNING - from pip._internal.utils.virtualenv import running_under_virtualenv -@@ -313,4 +316,11 @@ - return None - -+ # Prevent uninstalling packages from /usr -+ if dist_location(dist) in ( -+ distutils_scheme('', prefix=sys.base_prefix)['purelib'], -+ distutils_scheme('', prefix=sys.base_prefix)['platlib'], -+ ): -+ return None -+ - # We're installing into global site. The current installation must - # be uninstalled, no matter it's in global or user site, because the -- -2.25.4 +2.29.2 diff --git a/sources b/sources index 03f8a60..e6266ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-20.3.3.tar.gz) = 362d20e5d2665fa6211cf3836ca02a0340fb34ecde1d5902eecae744eb655d7dcfed0bd464e9db186b87b63a7aaf275e43645cf6321bdddd44b62787de84d87b +SHA512 (pip-21.0.tar.gz) = ac77a7204423f1fdc3a4d328dab1860258efccde0123cff3217f357637c4ce3d85772ab81a230122ff813be2cfa40f2862e5d499390289efe1dcde3a31a42264 From e8f355153384f41e2f5ff11081ab93b08625b825 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 17 Feb 2021 10:26:08 +0100 Subject: [PATCH 168/287] Update to 21.0.1 --- python-pip.spec | 8 ++++++-- remove-existing-dist-only-if-path-conflicts.patch | 13 +++++++------ sources | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 2a5fb5b..569490c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.0 +%global base_version 21.0.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -139,7 +139,7 @@ Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 2.10 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 -Provides: bundled(python%{1}dist(packaging)) = 20.8 +Provides: bundled(python%{1}dist(packaging)) = 20.9 Provides: bundled(python%{1}dist(pep517)) = 0.9.1 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 @@ -398,6 +398,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 +- Update to 21.0.1 +Resolves: rhbz#1922592 + * Tue Jan 26 2021 Lumír Balhar - 21.0-1 - Update to 21.0 (#1919530) diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 01c46ad..3913557 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,7 +1,7 @@ -From 0c41df7c4161de2453d5161382a3bbfc7178bec6 Mon Sep 17 00:00:00 2001 +From f83eacf40f1506418e74d747906b8f108401f91d Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 26 Jan 2021 09:05:07 +0100 -Subject: [PATCH] Prevent removing of the system packages installed under +Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install -U is executed. @@ -63,16 +63,17 @@ index 665dba1..a219e63 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index bfaa052..68915aa 100644 +index be0729e..bc2912b 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,4 +1,5 @@ +@@ -1,5 +1,6 @@ + import functools import logging +import sys from pip._vendor.packaging.utils import canonicalize_name -@@ -18,7 +19,9 @@ from pip._internal.utils.misc import ( +@@ -19,7 +20,9 @@ from pip._internal.utils.misc import ( dist_in_site_packages, dist_in_usersite, get_installed_distributions, @@ -82,7 +83,7 @@ index bfaa052..68915aa 100644 from pip._internal.utils.typing import MYPY_CHECK_RUNNING from pip._internal.utils.virtualenv import running_under_virtualenv -@@ -365,6 +368,13 @@ class Factory: +@@ -362,6 +365,13 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None diff --git a/sources b/sources index e6266ef..13d89e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.0.tar.gz) = ac77a7204423f1fdc3a4d328dab1860258efccde0123cff3217f357637c4ce3d85772ab81a230122ff813be2cfa40f2862e5d499390289efe1dcde3a31a42264 +SHA512 (pip-21.0.1.tar.gz) = 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664 From b476c0248567c7e79e56e48545a59f489c03a31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 13 Mar 2021 22:34:09 +0100 Subject: [PATCH 169/287] python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 The wheel is Python 3 only for a while. --- python-pip.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 569490c..12bf85d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -236,10 +236,8 @@ Summary: The pip wheel Requires: ca-certificates # Virtual provides for the packages bundled by pip: -%{bundled 2} %{bundled 3} -%{crypt_compat_recommends 2} %{crypt_compat_recommends 3} %description wheel @@ -398,6 +396,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 +- python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 + (The wheel is Python 3 only for a while) + * Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 - Update to 21.0.1 Resolves: rhbz#1922592 From 695f7debe320adc7ce422ad71d041cd75b7c0a3f Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 11 May 2021 16:19:49 +0200 Subject: [PATCH 170/287] Remove unused patches --- local-dos.patch | 395 ------------------------- network-tests.patch | 683 -------------------------------------------- 2 files changed, 1078 deletions(-) delete mode 100644 local-dos.patch delete mode 100644 network-tests.patch diff --git a/local-dos.patch b/local-dos.patch deleted file mode 100644 index 721ca51..0000000 --- a/local-dos.patch +++ /dev/null @@ -1,395 +0,0 @@ -diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py -index 8ed3d91..01b2104 100644 ---- a/pip/cmdoptions.py -+++ b/pip/cmdoptions.py -@@ -9,7 +9,7 @@ To be consistent, all options will follow this design. - """ - import copy - from optparse import OptionGroup, SUPPRESS_HELP, Option --from pip.locations import build_prefix, default_log_file -+from pip.locations import default_log_file - - - def make_option_group(group, parser): -@@ -297,10 +297,8 @@ build_dir = OptionMaker( - '-b', '--build', '--build-dir', '--build-directory', - dest='build_dir', - metavar='dir', -- default=build_prefix, -- help='Directory to unpack packages into and build in. ' -- 'The default in a virtualenv is "/build". ' -- 'The default for global installs is "/pip_build_".') -+ help='Directory to unpack packages into and build in.', -+) - - install_options = OptionMaker( - '--install-option', -diff --git a/pip/commands/install.py b/pip/commands/install.py -index cbf22a0..cb7d0db 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -10,6 +10,7 @@ from pip.basecommand import Command - from pip.index import PackageFinder - from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError - from pip import cmdoptions -+from pip.util import BuildDirectory - - - class InstallCommand(Command): -@@ -188,7 +189,7 @@ class InstallCommand(Command): - if ( - options.no_install or - options.no_download or -- (options.build_dir != build_prefix) or -+ options.build_dir or - options.no_clean - ): - logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, ' -@@ -197,7 +198,16 @@ class InstallCommand(Command): - if options.download_dir: - options.no_install = True - options.ignore_installed = True -- options.build_dir = os.path.abspath(options.build_dir) -+ -+ # If we have --no-install or --no-download and no --build we use the -+ # legacy static build dir -+ if (options.build_dir is None -+ and (options.no_install or options.no_download)): -+ options.build_dir = build_prefix -+ -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - options.src_dir = os.path.abspath(options.src_dir) - install_options = options.install_options or [] - if options.use_user_site: -@@ -246,73 +256,75 @@ class InstallCommand(Command): - - finder = self._build_package_finder(options, index_urls, session) - -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=options.src_dir, -- download_dir=options.download_dir, -- download_cache=options.download_cache, -- upgrade=options.upgrade, -- as_egg=options.as_egg, -- ignore_installed=options.ignore_installed, -- ignore_dependencies=options.ignore_dependencies, -- force_reinstall=options.force_reinstall, -- use_user_site=options.use_user_site, -- target_dir=temp_target_dir, -- session=session, -- pycompile=options.compile, -- ) -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- for name in options.editables: -- requirement_set.add_requirement( -- InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -- for filename in options.requirements: -- for req in parse_requirements(filename, finder=finder, options=options, session=session): -- requirement_set.add_requirement(req) -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- if options.find_links: -- msg = ('You must give at least one requirement to %(name)s ' -- '(maybe you meant "pip %(name)s %(links)s"?)' % -- dict(opts, links=' '.join(options.find_links))) -- else: -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.warn(msg) -- return -- -- try: -- if not options.no_download: -- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -- else: -- requirement_set.locate_files() -- -- if not options.no_install and not self.bundle: -- requirement_set.install( -- install_options, -- global_options, -- root=options.root_path, -- strip_file_prefix=options.strip_file_prefix) -- installed = ' '.join([req.name for req in -- requirement_set.successfully_installed]) -- if installed: -- logger.notify('Successfully installed %s' % installed) -- elif not self.bundle: -- downloaded = ' '.join([req.name for req in -- requirement_set.successfully_downloaded]) -- if downloaded: -- logger.notify('Successfully downloaded %s' % downloaded) -- elif self.bundle: -- requirement_set.create_bundle(self.bundle_filename) -- logger.notify('Created bundle in %s' % self.bundle_filename) -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- # Clean up -- if (not options.no_clean) and ((not options.no_install) or options.download_dir): -- requirement_set.cleanup_files(bundle=self.bundle) -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=options.src_dir, -+ download_dir=options.download_dir, -+ download_cache=options.download_cache, -+ upgrade=options.upgrade, -+ as_egg=options.as_egg, -+ ignore_installed=options.ignore_installed, -+ ignore_dependencies=options.ignore_dependencies, -+ force_reinstall=options.force_reinstall, -+ use_user_site=options.use_user_site, -+ target_dir=temp_target_dir, -+ session=session, -+ pycompile=options.compile, -+ ) -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ for name in options.editables: -+ requirement_set.add_requirement( -+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -+ for filename in options.requirements: -+ for req in parse_requirements(filename, finder=finder, options=options, session=session): -+ requirement_set.add_requirement(req) -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ if options.find_links: -+ msg = ('You must give at least one requirement to %(name)s ' -+ '(maybe you meant "pip %(name)s %(links)s"?)' % -+ dict(opts, links=' '.join(options.find_links))) -+ else: -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.warn(msg) -+ return -+ -+ try: -+ if not options.no_download: -+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -+ else: -+ requirement_set.locate_files() -+ -+ if not options.no_install and not self.bundle: -+ requirement_set.install( -+ install_options, -+ global_options, -+ root=options.root_path, -+ strip_file_prefix=options.strip_file_prefix) -+ installed = ' '.join([req.name for req in -+ requirement_set.successfully_installed]) -+ if installed: -+ logger.notify('Successfully installed %s' % installed) -+ elif not self.bundle: -+ downloaded = ' '.join([req.name for req in -+ requirement_set.successfully_downloaded]) -+ if downloaded: -+ logger.notify('Successfully downloaded %s' % downloaded) -+ elif self.bundle: -+ requirement_set.create_bundle(self.bundle_filename) -+ logger.notify('Created bundle in %s' % self.bundle_filename) -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ # Clean up -+ if (not options.no_clean) and ((not options.no_install) or options.download_dir): -+ requirement_set.cleanup_files(bundle=self.bundle) - - if options.target_dir: - if not os.path.exists(options.target_dir): -diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py -index 6527063..a96631a 100644 ---- a/pip/commands/wheel.py -+++ b/pip/commands/wheel.py -@@ -8,7 +8,7 @@ from pip.index import PackageFinder - from pip.log import logger - from pip.exceptions import CommandError, PreviousBuildDirError - from pip.req import InstallRequirement, RequirementSet, parse_requirements --from pip.util import normalize_path -+from pip.util import BuildDirectory, normalize_path - from pip.wheel import WheelBuilder - from pip import cmdoptions - -@@ -123,6 +123,9 @@ class WheelCommand(Command): - "--extra-index-url is suggested.") - index_urls += options.mirrors - -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - session = self._build_session(options) - - finder = PackageFinder(find_links=options.find_links, -@@ -137,59 +140,60 @@ class WheelCommand(Command): - session=session, - ) - -- options.build_dir = os.path.abspath(options.build_dir) -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=None, -- download_dir=None, -- download_cache=options.download_cache, -- ignore_dependencies=options.ignore_dependencies, -- ignore_installed=True, -- session=session, -- wheel_download_dir=options.wheel_dir -- ) -- -- # make the wheelhouse -- if not os.path.exists(options.wheel_dir): -- os.makedirs(options.wheel_dir) -- -- #parse args and/or requirements files -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- -- for filename in options.requirements: -- for req in parse_requirements( -- filename, -- finder=finder, -- options=options, -- session=session): -- if req.editable: -- logger.notify("ignoring %s" % req.url) -- continue -- requirement_set.add_requirement(req) -- -- #fail if no requirements -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.error(msg) -- return -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=None, -+ download_dir=None, -+ download_cache=options.download_cache, -+ ignore_dependencies=options.ignore_dependencies, -+ ignore_installed=True, -+ session=session, -+ wheel_download_dir=options.wheel_dir -+ ) - -- try: -- #build wheels -- wb = WheelBuilder( -- requirement_set, -- finder, -- options.wheel_dir, -- build_options = options.build_options or [], -- global_options = options.global_options or [] -- ) -- wb.build() -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- if not options.no_clean: -- requirement_set.cleanup_files() -+ # make the wheelhouse -+ if not os.path.exists(options.wheel_dir): -+ os.makedirs(options.wheel_dir) -+ -+ #parse args and/or requirements files -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ -+ for filename in options.requirements: -+ for req in parse_requirements( -+ filename, -+ finder=finder, -+ options=options, -+ session=session): -+ if req.editable: -+ logger.notify("ignoring %s" % req.url) -+ continue -+ requirement_set.add_requirement(req) -+ -+ #fail if no requirements -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.error(msg) -+ return -+ -+ try: -+ #build wheels -+ wb = WheelBuilder( -+ requirement_set, -+ finder, -+ options.wheel_dir, -+ build_options = options.build_options or [], -+ global_options = options.global_options or [] -+ ) -+ wb.build() -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ if not options.no_clean: -+ requirement_set.cleanup_files() -diff --git a/pip/util.py b/pip/util.py -index f459bb2..f5edeeb 100644 ---- a/pip/util.py -+++ b/pip/util.py -@@ -8,6 +8,7 @@ import zipfile - import tarfile - import subprocess - import textwrap -+import tempfile - - from pip.exceptions import InstallationError, BadCommand, PipError - from pip.backwardcompat import(WindowsError, string_types, raw_input, -@@ -718,3 +719,35 @@ def is_prerelease(vers): - - parsed = version._normalized_key(normalized) - return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed]) -+ -+ -+class BuildDirectory(object): -+ -+ def __init__(self, name=None, delete=None): -+ # If we were not given an explicit directory, and we were not given an -+ # explicit delete option, then we'll default to deleting. -+ if name is None and delete is None: -+ delete = True -+ -+ if name is None: -+ name = tempfile.mkdtemp(prefix="pip-build-") -+ # If we were not given an explicit directory, and we were not given -+ # an explicit delete option, then we'll default to deleting. -+ if delete is None: -+ delete = True -+ -+ self.name = name -+ self.delete = delete -+ -+ def __repr__(self): -+ return "<{} {!r}>".format(self.__class__.__name__, self.name) -+ -+ def __enter__(self): -+ return self.name -+ -+ def __exit__(self, exc, value, tb): -+ self.cleanup() -+ -+ def cleanup(self): -+ if self.delete: -+ rmtree(self.name) diff --git a/network-tests.patch b/network-tests.patch deleted file mode 100644 index 8acf694..0000000 --- a/network-tests.patch +++ /dev/null @@ -1,683 +0,0 @@ -From 621800d5c65aea36c6a1d9b685ff88f35cfce476 Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Fri, 15 Nov 2019 19:44:54 +0100 -Subject: [PATCH] Mark 6 tests as network tests - -=================================== FAILURES =================================== -_______________________________ test_freeze_path _______________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0') -script = -data = - def test_freeze_path(tmpdir, script, data): - """ - Test freeze with --path. - """ -> script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==2.0') -tests/functional/test_freeze.py:712: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -________________________ test_freeze_path_exclude_user _________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0') -script = -data = - def test_freeze_path_exclude_user(tmpdir, script, data): - """ - Test freeze with --path and make sure packages from --user are not picked - up. - """ - script.pip_install_local('--find-links', data.find_links, - '--user', 'simple2') -> script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==1.0') -tests/functional/test_freeze.py:728: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -__________________________ test_freeze_path_multiple ___________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0') -script = -data = - def test_freeze_path_multiple(tmpdir, script, data): - """ - Test freeze with multiple --path arguments. - """ - path1 = tmpdir / "path1" - os.mkdir(path1) - path2 = tmpdir / "path2" - os.mkdir(path2) -> script.pip('install', '--find-links', data.find_links, - '--target', path1, 'simple==2.0') -tests/functional/test_freeze.py:750: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -_________________ test_install_no_binary_builds_pep_517_wheel __________________ -script = -data = , with_wheel = None - def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): - to_install = data.packages.joinpath('pep517_setup_and_pyproject') -> res = script.pip( - 'install', '--no-binary=:all:', '-f', data.find_links, to_install - ) -tests/functional/test_install.py:1279: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...) -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject - return code: 1 --- stderr: -------------------- - ERROR: Command errored out with exit status 1: - command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools - cwd: None - Complete output (28 lines): - Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages - WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz - ERROR: Command errored out with exit status 1: - command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info - cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/ - Complete output (15 lines): - Traceback (most recent call last): - File "", line 1, in - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in - from setuptools.extension import Extension, Library - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in - from setuptools.dist import _get_unpatched - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in - from setuptools.command.install import install - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in - from setuptools.command import install_scripts - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in - from pkg_resources import Distribution, PathMetadata, ensure_directory - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in - register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) - AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' - ---------------------------------------- - ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. - ---------------------------------------- -ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output. --- stdout: -------------------- -Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject - Installing build dependencies: started - Installing build dependencies: finished with status 'error' -_______________________ test_config_file_override_stack ________________________ -script = -virtualenv = - def test_config_file_override_stack(script, virtualenv): - """ - Test config files (global, overriding a global config with a - local, overriding all with a command line flag). - - """ - fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-') - try: -> _test_config_file_override_stack(script, virtualenv, config_file) -tests/functional/test_install_config.py:144: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/functional/test_install_config.py:172: in _test_config_file_override_stack - result = script.pip( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...) -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools - return code: 1 --- stderr: -------------------- -WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -ERROR: Could not find a version that satisfies the requirement INITools (from versions: none) -ERROR: No matching distribution found for INITools --- stdout: -------------------- -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc -Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df -Looking in indexes: https://pypi.org/simple/ -1 location(s) to search for versions of INITools: -* https://pypi.org/simple/initools/ -Getting page https://pypi.org/simple/initools/ -Found index url https://pypi.org/simple/ -Looking up "https://pypi.org/simple/initools/" in the cache -Request header has "max_age" as 0, cache bypassed -Starting new HTTPS connection (1): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (2): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (3): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (4): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (5): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (6): pypi.org:443 -Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping -Given no hashes to check 0 links for project 'INITools': discarding no candidates -Cleaning up... -Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' -Exception information: -Traceback (most recent call last): - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main - status = self.run(options, args) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run - resolver.resolve(requirement_set) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve - self._resolve_one(requirement_set, req) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one - abstract_dist = self._get_abstract_dist_for(req_to_install) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for - req.populate_link(self.finder, upgrade_allowed, self.require_hashes) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link - self.link = finder.find_requirement(self, upgrade) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement - raise DistributionNotFound( -pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools -_______________________ test_no_upgrade_unless_requested _______________________ -script = - def test_no_upgrade_unless_requested(script): - """ - No upgrade if not specifically requested. - - """ -> script.pip('install', 'INITools==0.1') -tests/functional/test_install_upgrade.py:16: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', 'INITools==0.1') -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install INITools==0.1 - return code: 1 --- stderr: -------------------- -WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none) -ERROR: No matching distribution found for INITools==0.1 ---- - tests/functional/test_freeze.py | 3 +++ - tests/functional/test_install.py | 1 + - tests/functional/test_install_config.py | 1 + - tests/functional/test_install_upgrade.py | 1 + - 4 files changed, 6 insertions(+) - -diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py -index 546a482..aabb0ca 100644 ---- a/tests/functional/test_freeze.py -+++ b/tests/functional/test_freeze.py -@@ -705,6 +705,7 @@ def test_freeze_user(script, virtualenv, data): - assert 'simple2' not in result.stdout - - -+@pytest.mark.network - def test_freeze_path(tmpdir, script, data): - """ - Test freeze with --path. -@@ -718,6 +719,7 @@ def test_freeze_path(tmpdir, script, data): - _check_output(result.stdout, expected) - - -+@pytest.mark.network - def test_freeze_path_exclude_user(tmpdir, script, data): - """ - Test freeze with --path and make sure packages from --user are not picked -@@ -739,6 +741,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data): - _check_output(result.stdout, expected) - - -+@pytest.mark.network - def test_freeze_path_multiple(tmpdir, script, data): - """ - Test freeze with multiple --path arguments. -diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py -index 0bea054..b816df6 100644 ---- a/tests/functional/test_install.py -+++ b/tests/functional/test_install.py -@@ -1274,6 +1274,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel): - assert "Running setup.py install for upper" in str(res), str(res) - - -+@pytest.mark.network - def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): - to_install = data.packages.joinpath('pep517_setup_and_pyproject') - res = script.pip( -diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py -index bcf83f1..c9c60a2 100644 ---- a/tests/functional/test_install_config.py -+++ b/tests/functional/test_install_config.py -@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data): - ), 'stdout: {}'.format(result.stdout) - - -+@pytest.mark.network - def test_config_file_override_stack(script, virtualenv): - """ - Test config files (global, overriding a global config with a -diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py -index 36b518b..c34a961 100644 ---- a/tests/functional/test_install_upgrade.py -+++ b/tests/functional/test_install_upgrade.py -@@ -8,6 +8,7 @@ from tests.lib import assert_all_changes, pyversion - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.network - def test_no_upgrade_unless_requested(script): - """ - No upgrade if not specifically requested. --- -2.20.1 - From 5afdc00b06e0272c5551f3f4afd53e69091aa54e Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 11 May 2021 16:58:03 +0200 Subject: [PATCH 171/287] Update to 21.1.1 Changes: - dropped emit-a-warning-when-running-with-root-privileges.patch (fixed in upstream) - rebased dummy-certifi.patch, remove-existing-dist-only-if-path-conflicts.patch, nowarn-pip._internal.main.patch --- dummy-certifi.patch | 33 ++++----- ...ng-when-running-with-root-privileges.patch | 51 ------------- nowarn-pip._internal.main.patch | 32 +++++---- python-pip.rpmlintrc | 4 -- python-pip.spec | 31 ++++---- ...existing-dist-only-if-path-conflicts.patch | 72 ++++++++++--------- sources | 2 +- 7 files changed, 86 insertions(+), 139 deletions(-) delete mode 100644 emit-a-warning-when-running-with-root-privileges.patch diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 992aed4..459eada 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,25 +1,26 @@ -From cf96ff346639d1b9f5efa3fd0976694e04df3f5f Mon Sep 17 00:00:00 2001 -From: Tomas Hrnciar -Date: Sun, 26 Apr 2020 21:38:44 +0200 +From 2c58d7301dd5a47570f782fe2fce7fbb1918f60c Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 10 May 2021 16:38:50 +0200 Subject: [PATCH] Dummy certifi patch +Co-Authored-By: Tomas Hrnciar --- src/pip/_vendor/certifi/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 8987449..d174ced 100644 +index b8140cf..f1a0b01 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -9,6 +9,7 @@ This module returns the installation location of cacert.pem or its contents. - import os - +@@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): + + try: + raise ImportError # force fallback - from importlib.resources import path as get_path, read_text - - _CACERT_CTX = None -@@ -51,9 +52,7 @@ except ImportError: + # Return a certificate file on disk for a standalone pip zipapp running in + # an isolated build environment to use. Passing --cert to the standalone + # pip does not work since requests calls where() unconditionally on import. +@@ -67,9 +68,7 @@ except ImportError: # If we don't have importlib.resources, then we will just do the old logic # of assuming we're on the filesystem and munge the path directly. def where(): @@ -27,9 +28,9 @@ index 8987449..d174ced 100644 - - return os.path.join(f, "cacert.pem") + return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents(): --- -2.25.4 + + + def contents(): +-- +2.30.2 diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch deleted file mode 100644 index 7c6a390..0000000 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 74bb5d26e232493de43adfa1f4b42b66fd701294 Mon Sep 17 00:00:00 2001 -From: Tomas Hrnciar -Date: Sun, 26 Apr 2020 13:52:24 +0200 -Subject: [PATCH] Downstream only patch - -Emit a warning to the user if pip install is run with root privileges -Issue upstream: https://github.com/pypa/pip/issues/4288 ---- - src/pip/_internal/commands/install.py | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 70bda2e2..1e750ae1 100644 ---- a/src/pip/_internal/commands/install.py -+++ b/src/pip/_internal/commands/install.py -@@ -13,6 +13,8 @@ import operator - import os - import shutil - import site -+import sys -+from os import path - from optparse import SUPPRESS_HELP - - from pip._vendor import pkg_resources -@@ -241,6 +243,23 @@ class InstallCommand(RequirementCommand): - raise CommandError("Can not combine '--user' and '--target'") - - cmdoptions.check_install_build_global(options) -+ -+ def is_venv(): -+ return (hasattr(sys, 'real_prefix') or -+ (hasattr(sys, 'base_prefix') and -+ sys.base_prefix != sys.prefix)) -+ -+ # Check whether we have root privileges and aren't in venv/virtualenv -+ if os.getuid() == 0 and not is_venv() and not options.root_path: -+ command = path.basename(sys.argv[0]) -+ if command == "__main__.py": -+ command = path.basename(sys.executable) + " -m pip" -+ logger.warning( -+ "Running pip install with root privileges is " -+ "generally not a good idea. Try `%s install --user` instead." -+ % command -+ ) -+ - upgrade_strategy = "to-satisfy-only" - if options.upgrade: - upgrade_strategy = options.upgrade_strategy --- -2.23.0 - diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 7027cf5..23b615b 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,10 +1,12 @@ -From 7c36cb21910b415e0eb171d0f6c4dbf72382fdaf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 10 Mar 2020 11:03:22 +0100 +From 8519679166122b7482a70f6c10d303520e5f83c9 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 10 May 2021 16:48:49 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint In Fedora, we use that in ensurepip and users cannot do anything about it, this warning is juts moot. Also, the warning breaks CPython test suite. + +Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= --- src/pip/_internal/__init__.py | 2 +- src/pip/_internal/utils/entrypoints.py | 19 ++++++++++--------- @@ -12,29 +14,29 @@ this warning is juts moot. Also, the warning breaks CPython test suite. 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 3aa8a46..0ec017b 100755 +index 41071cd..c7b4e65 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -15,4 +15,4 @@ def main(args=None): +@@ -12,4 +12,4 @@ def main(args=None): """ from pip._internal.utils.entrypoints import _wrapper - + - return _wrapper(args) + return _wrapper(args, _nowarn=True) diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index befd01c..d6f3632 100644 +index 879bf21..584e8b5 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py -@@ -7,7 +7,7 @@ if MYPY_CHECK_RUNNING: - from typing import List, Optional - - +@@ -4,7 +4,7 @@ from typing import List, Optional + from pip._internal.cli.main import main + + -def _wrapper(args=None): +def _wrapper(args=None, _nowarn=False): # type: (Optional[List[str]]) -> int """Central wrapper for all old entrypoints. - -@@ -20,12 +20,13 @@ def _wrapper(args=None): + +@@ -17,12 +17,13 @@ def _wrapper(args=None): directing them to an appropriate place for help, we now define all of our old entrypoints as wrappers for the current one. """ @@ -67,6 +69,6 @@ index e416315..7f57f67 100644 - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr --- -2.24.1 +-- +2.30.2 diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index 39079e3..3a17d79 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -1,12 +1,8 @@ # This is just temporary, when upstream merges PRs it can be removed -# https://github.com/pypa/pip/pull/7959 # https://github.com/ActiveState/appdirs/pull/144 # https://github.com/psf/requests/pull/5410 -# https://github.com/chardet/chardet/pull/192 -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_internal/__init__.py\b') addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b') addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b') -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/chardet/cli/chardetect.py\b') # REQUESTED dist-info file is not meant to have any content # Discussion: https://src.fedoraproject.org/rpms/python-pip/pull-request/69#comment-52525 diff --git a/python-pip.spec b/python-pip.spec index 12bf85d..e285ebb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.0.1 +%global base_version 21.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -33,7 +33,6 @@ Summary: A tool for installing and managing Python packages # chardet: LGPLv2 # colorama: BSD # CacheControl: ASL 2.0 -# contextlib2: Python # distlib: Python # distro: ASL 2.0 # html5lib: MIT @@ -46,9 +45,9 @@ Summary: A tool for installing and managing Python packages # pyparsing: MIT # requests: ASL 2.0 # resolvelib: ISC -# retrying: ASL 2.0 # setuptools: MIT # six: MIT +# tenacity: ASL 2.0 # toml: MIT # urllib3: MIT # webencodings: BSD @@ -68,12 +67,6 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif -# Downstream only patch -# Emit a warning to the user if pip install is run with root privileges -# Upstream discussion: -# https://discuss.python.org/t/playing-nice-with-external-package-managers/1968/20 -Patch1: emit-a-warning-when-running-with-root-privileges.patch - # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 @@ -133,23 +126,22 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 Provides: bundled(python%{1}dist(certifi)) = 2020.12.5 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 Provides: bundled(python%{1}dist(distlib)) = 0.3.1 Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 2.10 +Provides: bundled(python%{1}dist(idna)) = 3.1 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 20.9 -Provides: bundled(python%{1}dist(pep517)) = 0.9.1 +Provides: bundled(python%{1}dist(pep517)) = 0.10 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 Provides: bundled(python%{1}dist(requests)) = 2.25.1 -Provides: bundled(python%{1}dist(resolvelib)) = 0.5.4 -Provides: bundled(python%{1}dist(retrying)) = 1.3.3 +Provides: bundled(python%{1}dist(resolvelib)) = 0.7 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.15 +Provides: bundled(python%{1}dist(tenacity)) = 7 Provides: bundled(python%{1}dist(toml)) = 0.10.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.2 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.4 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -225,6 +217,8 @@ Summary: A documentation for a tool for installing and managing Python pa BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs +BuildRequires: python%{python3_pkgversion}-sphinx-copybutton +BuildRequires: python%{python3_pkgversion}-myst-parser %description doc A documentation for a tool for installing and managing Python packages @@ -254,7 +248,7 @@ rm src/pip/_vendor/certifi/*.pem sed -i '/html_theme = "furo"/d' docs/html/conf.py # towncrier extension for Sphinx is not yet available in Fedora -sed -i "/'sphinxcontrib.towncrier',/d" docs/html/conf.py +sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels @@ -396,6 +390,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon May 10 2021 Karolina Surma - 21.1.1-1 +- Update to 21.1.1 + * Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 - python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 (The wheel is Python 3 only for a while) diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 3913557..91985cb 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,6 +1,6 @@ -From f83eacf40f1506418e74d747906b8f108401f91d Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Tue, 26 Jan 2021 09:05:07 +0100 +From d8df1b9010bc69bfdb606cb51aa3a8a5c6ae6d4c Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib @@ -11,6 +11,7 @@ Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin +Co-Authored-By: Lumir Balhar --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- @@ -19,10 +20,10 @@ Co-Authored-By: Petr Viktorin 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 6d0aa30..0a5f8ed 100644 +index 55c17ac..9f6ba44 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( +@@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -30,7 +31,7 @@ index 6d0aa30..0a5f8ed 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -445,7 +446,7 @@ class InstallRequirement: +@@ -440,7 +441,7 @@ class InstallRequirement: "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -40,18 +41,18 @@ index 6d0aa30..0a5f8ed 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 665dba1..a219e63 100644 +index 17de7f0..3dd872d 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver +@@ -42,6 +42,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid from pip._internal.utils.compatibility_tags import get_supported from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path from pip._internal.utils.packaging import check_requires_python, get_requires_python - from pip._internal.utils.typing import MYPY_CHECK_RUNNING - -@@ -204,7 +205,9 @@ class Resolver(BaseResolver): + + logger = logging.getLogger(__name__) +@@ -199,7 +200,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -61,36 +62,37 @@ index 665dba1..a219e63 100644 + and dist_in_install_path(req.satisfied_by)): req.should_reinstall = True req.satisfied_by = None - + diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index be0729e..bc2912b 100644 +index 6e3f195..bf07c1b 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,5 +1,6 @@ +@@ -1,6 +1,7 @@ + import contextlib import functools import logging +import sys - - from pip._vendor.packaging.utils import canonicalize_name - -@@ -19,7 +20,9 @@ from pip._internal.utils.misc import ( + from typing import ( + TYPE_CHECKING, + Dict, +@@ -46,7 +47,9 @@ from pip._internal.utils.misc import ( dist_in_site_packages, dist_in_usersite, get_installed_distributions, + dist_location, ) -+from pip._internal.locations import distutils_scheme - from pip._internal.utils.typing import MYPY_CHECK_RUNNING ++from pip._internal.locations import get_scheme from pip._internal.utils.virtualenv import running_under_virtualenv - -@@ -362,6 +365,13 @@ class Factory: + + from .base import Candidate, CandidateVersion, Constraint, Requirement +@@ -479,6 +482,13 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None - + + # Prevent uninstalling packages from /usr + if dist_location(dist) in ( -+ distutils_scheme('', prefix=sys.base_prefix)['purelib'], -+ distutils_scheme('', prefix=sys.base_prefix)['platlib'], ++ get_scheme('', prefix=sys.base_prefix).purelib, ++ get_scheme('', prefix=sys.base_prefix).platlib, + ): + return None + @@ -98,21 +100,21 @@ index be0729e..bc2912b 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 6dd94e2..7925518 100644 +index 26037db..11b918d 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -27,6 +27,7 @@ from pip._vendor.retrying import retry # type: ignore +@@ -40,6 +40,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed from pip import __version__ from pip._internal.exceptions import CommandError from pip._internal.locations import get_major_minor_version, site_packages, user_site -+from pip._internal.locations import distutils_scheme, get_major_minor_version, site_packages, user_site ++from pip._internal.locations import get_scheme from pip._internal.utils.compat import WINDOWS, stdlib_pkgs - from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast from pip._internal.utils.virtualenv import ( -@@ -398,6 +399,16 @@ def dist_in_site_packages(dist): + running_under_virtualenv, +@@ -379,6 +380,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) - - + + +def dist_in_install_path(dist): + """ + Return True if given Distribution is installed in @@ -120,12 +122,12 @@ index 6dd94e2..7925518 100644 + """ + norm_path = normalize_path(dist_location(dist)) + return norm_path.startswith(normalize_path( -+ distutils_scheme("")['purelib'].split('python')[0])) ++ get_scheme("").purelib.split('python')[0])) + + def dist_is_editable(dist): # type: (Distribution) -> bool """ --- -2.29.2 +-- +2.30.2 diff --git a/sources b/sources index 13d89e7..9a3e5d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.0.1.tar.gz) = 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664 +SHA512 (pip-21.1.1.tar.gz) = 05157ed586597f16948afdad43d98cc095803d2d22b1427ac1028ca2a73a26d65e597446808194343ed36f9eb7cb910ac89e73a6a9a90ee868ec822fdbe641c5 From 34ceb80d614ebf97ed5daffff20f8c87a719da40 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 17 May 2021 12:00:40 +0200 Subject: [PATCH 172/287] Resolve rpmlint warnings & fix changelog typos --- python-pip.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e285ebb..14ecedd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -413,9 +413,6 @@ Resolves: rhbz#1922592 - New resolver - Fixes: rhbz#1893470 -* Fri Dec 04 2020 Miro Hrončok - 20.2.4-2 -- Disable tests and documentation in Fedora ELN (and RHEL) - * Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 - Update to 20.2.4 (#1889112) @@ -529,7 +526,7 @@ Resolves: rhbz#1922592 - Create python-pip-wheel package with the wheel * Tue Jul 31 2018 Miro Hrončok - 18.0-2 -- Remove redundant "Unicode"" from License +- Remove redundant "Unicode" from License * Mon Jul 23 2018 Marcel Plch - 18.0-7 - Update to 18.0 @@ -746,7 +743,7 @@ Resolves: rhbz#1406922 * Fri Jan 1 2010 Peter Halliday - 0.6.1.4 - fix dependency issue * Fri Dec 18 2009 Peter Halliday - 0.6.1-2 -- fix spec file +- fix spec file * Thu Dec 17 2009 Peter Halliday - 0.6.1-1 - upgrade to 0.6.1 of pip * Mon Aug 31 2009 Peter Halliday - 0.4-1 From 4e92c5da5ba962f152aa16752481c83c01c40f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 25 May 2021 00:50:46 +0200 Subject: [PATCH 173/287] Fedora CI: Cleanup for Fedora 32 EOL and prepare for Python 3.5 retirement Fedora 32 was the last one to include Python 3.4 https://fedoraproject.org/wiki/Changes/RetirePython34 Fedora 35 will be the first one not to include Python 3.5 https://fedoraproject.org/wiki/Changes/RetirePython3.5 --- tests/tests.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 1383612..b29f39e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,12 +10,9 @@ - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" dest: "pyproject-rpm-macros" tests: - - smoke34_optional: + - smoke35_optional: dir: python/smoke - run: VERSION=3.4 INSTALL_OR_SKIP=true ./venv.sh - - smoke35: - dir: python/smoke - run: VERSION=3.5 ./venv.sh + run: VERSION=3.5 INSTALL_OR_SKIP=true ./venv.sh - smoke36: dir: python/smoke run: VERSION=3.6 ./venv.sh @@ -34,12 +31,9 @@ - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - - smoke34_virtualenv_optional: + - smoke35_virtualenv_optional: dir: python/smoke - run: VERSION=3.4 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - - smoke35_virtualenv: - dir: python/smoke - run: VERSION=3.5 METHOD=virtualenv ./venv.sh + run: VERSION=3.5 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke36_virtualenv: dir: python/smoke run: VERSION=3.6 METHOD=virtualenv ./venv.sh @@ -73,7 +67,6 @@ - gcc - virtualenv - python2.7 - - python3.5 - python3.6 - python3.7 - python3.8 From ec8cee20b2c4820c7082493445da4a7ed50f0d37 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 1 Jun 2021 16:35:15 +0200 Subject: [PATCH 174/287] Bootstrap for Python 3.10 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 14ecedd..290b33c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 # The original RHEL 9 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -22,7 +24,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -390,6 +392,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Jun 01 2021 Python Maint - 21.1.1-2 +- Bootstrap for Python 3.10 + * Mon May 10 2021 Karolina Surma - 21.1.1-1 - Update to 21.1.1 From d2309d3f09fa21fef8d339363e45cba42e12c5e2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 02:57:58 +0200 Subject: [PATCH 175/287] Rebuilt for Python 3.10 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 290b33c..676979a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 # The original RHEL 9 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -24,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -392,6 +390,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Fri Jun 04 2021 Python Maint - 21.1.1-3 +- Rebuilt for Python 3.10 + * Tue Jun 01 2021 Python Maint - 21.1.1-2 - Bootstrap for Python 3.10 From de909508e7ac8d33f0aa6c1310afcbcd660f7494 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 8 Jun 2021 08:59:55 +0200 Subject: [PATCH 176/287] Update to 21.1.2 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 676979a..07d309f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.1 +%global base_version 21.1.2 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Jun 07 2021 Karolina Surma - 21.1.2-1 +- Update to 21.1.2 +Resolves: rhbz#1963433 + * Fri Jun 04 2021 Python Maint - 21.1.1-3 - Rebuilt for Python 3.10 diff --git a/sources b/sources index 9a3e5d8..2b78f39 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.1.tar.gz) = 05157ed586597f16948afdad43d98cc095803d2d22b1427ac1028ca2a73a26d65e597446808194343ed36f9eb7cb910ac89e73a6a9a90ee868ec822fdbe641c5 +SHA512 (pip-21.1.2.tar.gz) = 54a2b6074fcb2640868dedcabb5087b79a53a8ad57ec4ab5acf2862b8037403d8f156c2853ab60c2f10c6af999a0a90774f0bc3eca2978a82590935d37af167f From 44c83538123458bb630f317fba97f217746cc5c2 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 29 Jun 2021 12:18:34 +0200 Subject: [PATCH 177/287] Update to 21.1.3 --- python-pip.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 07d309f..bd1c90a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.2 +%global base_version 21.1.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 +- Update to 21.1.3 +Resolves: rhbz#1976449 + * Mon Jun 07 2021 Karolina Surma - 21.1.2-1 - Update to 21.1.2 Resolves: rhbz#1963433 diff --git a/sources b/sources index 2b78f39..71de84e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.2.tar.gz) = 54a2b6074fcb2640868dedcabb5087b79a53a8ad57ec4ab5acf2862b8037403d8f156c2853ab60c2f10c6af999a0a90774f0bc3eca2978a82590935d37af167f +SHA512 (pip-21.1.3.tar.gz) = 21bdc78f24751981ae49c9fda0430fc92b8d33eb7a546bc344e8cea4aa85dcd42191ef8eb3fdfb4f3d1cb5921698f819d73e6e190d8745cf7ddfa52732d95999 From 08464d3bcd7641c6bf5186c0b3d8695ef5f85e70 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 08:14:14 +0000 Subject: [PATCH 178/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index bd1c90a..ca56208 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -390,6 +390,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 - Update to 21.1.3 Resolves: rhbz#1976449 From d39c4964731d5811a49929782a0a791cbb52a732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:33:45 +0200 Subject: [PATCH 179/287] Update to 21.2.3 The bundled toml was replaced by tomli, same license (MIT). --- no-version-warning.patch | 13 ++--- nowarn-pip._internal.main.patch | 28 +++++------ python-pip.spec | 32 ++++++------ ...existing-dist-only-if-path-conflicts.patch | 50 +++++++++++-------- sources | 2 +- 5 files changed, 68 insertions(+), 57 deletions(-) diff --git a/no-version-warning.patch b/no-version-warning.patch index 6d7268f..6c34bec 100644 --- a/no-version-warning.patch +++ b/no-version-warning.patch @@ -1,7 +1,8 @@ -diff -rU3 pip-20.3-orig/src/pip/_vendor/packaging/version.py pip-20.3/src/pip/_vendor/packaging/version.py ---- pip-20.3-orig/src/pip/_vendor/packaging/version.py 2020-11-30 12:58:32.000000000 +0100 -+++ pip-20.3/src/pip/_vendor/packaging/version.py 2020-12-16 21:25:15.818221608 +0100 -@@ -124,11 +124,6 @@ +diff --git a/src/pip/_vendor/packaging/version.py b/src/pip/_vendor/packaging/version.py +index de9a09a..154e94d 100644 +--- a/src/pip/_vendor/packaging/version.py ++++ b/src/pip/_vendor/packaging/version.py +@@ -108,11 +108,6 @@ class LegacyVersion(_BaseVersion): self._version = str(version) self._key = _legacy_cmpkey(self._version) @@ -11,5 +12,5 @@ diff -rU3 pip-20.3-orig/src/pip/_vendor/packaging/version.py pip-20.3/src/pip/_v - DeprecationWarning, - ) - def __str__(self): - # type: () -> str + def __str__(self) -> str: + return self._version diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 23b615b..1490643 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,4 +1,4 @@ -From 8519679166122b7482a70f6c10d303520e5f83c9 Mon Sep 17 00:00:00 2001 +From 619782ad2d181fe2933ddf4edc7127fdc13dd0df Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 16:48:49 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint @@ -14,29 +14,29 @@ Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 41071cd..c7b4e65 100755 +index 6afb5c6..faf25af 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -12,4 +12,4 @@ def main(args=None): +@@ -16,4 +16,4 @@ def main(args: (Optional[List[str]]) = None) -> int: """ from pip._internal.utils.entrypoints import _wrapper - + - return _wrapper(args) + return _wrapper(args, _nowarn=True) diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index 879bf21..584e8b5 100644 +index 1504a12..07d941b 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py @@ -4,7 +4,7 @@ from typing import List, Optional from pip._internal.cli.main import main - - --def _wrapper(args=None): -+def _wrapper(args=None, _nowarn=False): - # type: (Optional[List[str]]) -> int + + +-def _wrapper(args: Optional[List[str]] = None) -> int: ++def _wrapper(args: Optional[List[str]] = None, _nowarn: bool = False) -> int: """Central wrapper for all old entrypoints. - -@@ -17,12 +17,13 @@ def _wrapper(args=None): + + Historically pip has had several entrypoints defined. Because of issues +@@ -16,12 +16,13 @@ def _wrapper(args: Optional[List[str]] = None) -> int: directing them to an appropriate place for help, we now define all of our old entrypoints as wrappers for the current one. """ @@ -69,6 +69,6 @@ index e416315..7f57f67 100644 - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr --- -2.30.2 +-- +2.32.0 diff --git a/python-pip.spec b/python-pip.spec index ca56208..50a2677 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.3 +%global base_version 21.2.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -48,7 +48,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # six: MIT # tenacity: ASL 2.0 -# toml: MIT +# tomli: MIT # urllib3: MIT # webencodings: BSD @@ -123,25 +123,25 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2020.12.5 +Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.1 +Provides: bundled(python%{1}dist(distlib)) = 0.3.2 Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 3.1 +Provides: bundled(python%{1}dist(idna)) = 3.2 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 -Provides: bundled(python%{1}dist(packaging)) = 20.9 -Provides: bundled(python%{1}dist(pep517)) = 0.10 +Provides: bundled(python%{1}dist(packaging)) = 21 +Provides: bundled(python%{1}dist(pep517)) = 0.11 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.25.1 -Provides: bundled(python%{1}dist(resolvelib)) = 0.7 +Provides: bundled(python%{1}dist(requests)) = 2.26 +Provides: bundled(python%{1}dist(resolvelib)) = 0.7.1 Provides: bundled(python%{1}dist(setuptools)) = 44 -Provides: bundled(python%{1}dist(six)) = 1.15 -Provides: bundled(python%{1}dist(tenacity)) = 7 -Provides: bundled(python%{1}dist(toml)) = 0.10.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.4 +Provides: bundled(python%{1}dist(six)) = 1.16 +Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 +Provides: bundled(python%{1}dist(tomli)) = 1.0.3 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.6 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 +- Update to 21.2.3 +- Resolves: rhbz#1985635 + * Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 91985cb..56c7e2f 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From d8df1b9010bc69bfdb606cb51aa3a8a5c6ae6d4c Mon Sep 17 00:00:00 2001 +From a722cbefa5e1a4bf5357f13852fa927a46fcd624 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -20,7 +20,7 @@ Co-Authored-By: Lumir Balhar 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 55c17ac..9f6ba44 100644 +index 4c58cdb..3570e17 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( @@ -31,7 +31,7 @@ index 55c17ac..9f6ba44 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -440,7 +441,7 @@ class InstallRequirement: +@@ -426,7 +427,7 @@ class InstallRequirement: "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -41,7 +41,7 @@ index 55c17ac..9f6ba44 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 17de7f0..3dd872d 100644 +index 4df8f7e..dda2292 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py @@ -42,6 +42,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid @@ -50,9 +50,9 @@ index 17de7f0..3dd872d 100644 from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path from pip._internal.utils.packaging import check_requires_python, get_requires_python - + logger = logging.getLogger(__name__) -@@ -199,7 +200,9 @@ class Resolver(BaseResolver): +@@ -194,7 +195,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -62,9 +62,9 @@ index 17de7f0..3dd872d 100644 + and dist_in_install_path(req.satisfied_by)): req.should_reinstall = True req.satisfied_by = None - + diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 6e3f195..bf07c1b 100644 +index e7fd344..e36f025 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -75,20 +75,26 @@ index 6e3f195..bf07c1b 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -46,7 +47,9 @@ from pip._internal.utils.misc import ( - dist_in_site_packages, - dist_in_usersite, - get_installed_distributions, -+ dist_location, +@@ -34,6 +35,7 @@ from pip._internal.exceptions import ( + UnsupportedWheel, ) + from pip._internal.index.package_finder import PackageFinder +from pip._internal.locations import get_scheme + from pip._internal.metadata import BaseDistribution, get_default_environment + from pip._internal.models.link import Link + from pip._internal.models.wheel import Wheel +@@ -46,6 +48,7 @@ from pip._internal.req.req_install import ( + from pip._internal.resolution.base import InstallRequirementProvider + from pip._internal.utils.compatibility_tags import get_supported + from pip._internal.utils.hashes import Hashes ++from pip._internal.utils.misc import dist_location from pip._internal.utils.virtualenv import running_under_virtualenv - + from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -479,6 +482,13 @@ class Factory: +@@ -525,6 +528,13 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None - + + # Prevent uninstalling packages from /usr + if dist_location(dist) in ( + get_scheme('', prefix=sys.base_prefix).purelib, @@ -100,7 +106,7 @@ index 6e3f195..bf07c1b 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 26037db..11b918d 100644 +index 99ebea3..5901687 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -40,6 +40,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed @@ -111,10 +117,10 @@ index 26037db..11b918d 100644 from pip._internal.utils.compat import WINDOWS, stdlib_pkgs from pip._internal.utils.virtualenv import ( running_under_virtualenv, -@@ -379,6 +380,16 @@ def dist_in_site_packages(dist): +@@ -382,6 +383,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) - - + + +def dist_in_install_path(dist): + """ + Return True if given Distribution is installed in @@ -128,6 +134,6 @@ index 26037db..11b918d 100644 def dist_is_editable(dist): # type: (Distribution) -> bool """ --- -2.30.2 +-- +2.32.0 diff --git a/sources b/sources index 71de84e..8be331c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.3.tar.gz) = 21bdc78f24751981ae49c9fda0430fc92b8d33eb7a546bc344e8cea4aa85dcd42191ef8eb3fdfb4f3d1cb5921698f819d73e6e190d8745cf7ddfa52732d95999 +SHA512 (pip-21.2.3.tar.gz) = 9df888c871040d3812a2bf358013e3af976ede1e6aebf6747527be470674bb55ca1312d54021a7913630c04b09981cf481202c8405faf08b1b37e29272adf547 From 8f31f816cc11076e2c6335af87357bfc988e1a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:37:32 +0200 Subject: [PATCH 180/287] Mark the installed LICENSE.txt as %license instead of duplicating it --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 50a2677..f92bb33 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -359,8 +359,8 @@ pytest_k='not completion and %files -n python%{python3_pkgversion}-%{srcname} -%license LICENSE.txt %doc README.rst +%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* From d3f6b95d9ce73fc6e947fae0ad423572be447654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:47:13 +0200 Subject: [PATCH 181/287] Adapt wheel installation to be more like %pyproject_install, use %python3 --- python-pip.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f92bb33..63d21cb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -270,16 +270,20 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} %install -# The following is similar to %%py3_install_wheel, but we don't have +# The following is similar to %%pyproject_install, but we don't have # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) -%{__python3} dist/%{python_wheelname}/pip install \ +%{python3} dist/%{python_wheelname}/pip install \ --root %{buildroot} \ --no-deps \ - --no-cache-dir \ - --no-index \ + --disable-pip-version-check \ + --progress-bar off \ + --verbose \ --ignore-installed \ + --no-warn-script-location \ + --no-index \ + --no-cache-dir \ --find-links dist \ 'pip==%{upstream_version}' From d7a96d26f431c32787c80af06b8bb7b8ca4b2237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:48:52 +0200 Subject: [PATCH 182/287] Enable previously failing test --- python-pip.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 63d21cb..31998f9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -339,8 +339,6 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} # needs unaltered sys.path and we cannot do that in %%check # test_pep517_and_build_options # test_config_file_venv_option -# TODO investigate failures -# test_uninstall_non_local_distutils # Incompatible with the latest virtualenv # test_from_link_vcs_with_source_dir_obtains_commit_id # test_from_link_vcs_without_source_dir @@ -348,7 +346,6 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} pytest_k='not completion and not test_pep517_and_build_options and not test_config_file_venv_option and - not test_uninstall_non_local_distutils and not test_from_link_vcs_with_source_dir_obtains_commit_id and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha' From 192c4aebdf21c26c83b2580a978c9ece4a8d2352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Aug 2021 12:26:06 +0200 Subject: [PATCH 183/287] Fix broken uninstallation by a bogus downstream patch In pip 21.2, the Distribution here is a wrapper around the regular Distribution. It has a limited set of API defined by the BaseDistribution protocol. dist_location() uses the project_name attribute under the hood -- and that is not part of the API. If we ever upstream this, we should make this check a property of BaseDistribution. But, for now, we hotfix it by accessing the private wrapped Distribution object directly. Yes, this is ugly. --- python-pip.spec | 5 ++++- remove-existing-dist-only-if-path-conflicts.patch | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 31998f9..261ab3e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -391,6 +391,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 +- Fix broken uninstallation by a bogus downstream patch + * Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 - Update to 21.2.3 - Resolves: rhbz#1985635 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 56c7e2f..e68e892 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From a722cbefa5e1a4bf5357f13852fa927a46fcd624 Mon Sep 17 00:00:00 2001 +From aca0c9df4ef54f70a3fedb07f4faac463f88a331 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -12,6 +12,7 @@ Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar +Co-Authored-By: Miro Hrončok --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- @@ -64,7 +65,7 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..e36f025 100644 +index e7fd344..555e657 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -96,7 +97,7 @@ index e7fd344..e36f025 100644 return None + # Prevent uninstalling packages from /usr -+ if dist_location(dist) in ( ++ if dist_location(dist._dist) in ( + get_scheme('', prefix=sys.base_prefix).purelib, + get_scheme('', prefix=sys.base_prefix).platlib, + ): From 27c255ce814fe6a65f48c022e78570b0dda42b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Aug 2021 13:00:49 +0200 Subject: [PATCH 184/287] Fedora CI: Add pip-upgrade tests --- tests/pip_install_upgrade/runtest.sh | 40 ++++++++++++++++++++++++++++ tests/tests.yml | 4 +++ 2 files changed, 44 insertions(+) create mode 100755 tests/pip_install_upgrade/runtest.sh diff --git a/tests/pip_install_upgrade/runtest.sh b/tests/pip_install_upgrade/runtest.sh new file mode 100755 index 0000000..40e14a3 --- /dev/null +++ b/tests/pip_install_upgrade/runtest.sh @@ -0,0 +1,40 @@ +#!/bin/sh -eux +# This script requires root privileges and you should never run it on your own machine +test $EUID -eq 0 + +PYTHON_VERSION=$(/usr/bin/python3 -c 'import sys; print("{}.{}".format(*sys.version_info))') +RPM_SITELIB="/usr/lib/python${PYTHON_VERSION}/site-packages" +LOCAL_SITELIB="/usr/local/lib/python${PYTHON_VERSION}/site-packages" +USER_SITELIB="/home/fedora-test-user/.local/lib/python${PYTHON_VERSION}/site-packages" + +# First, let's install older Pello with pip as if it was installed by RPM +# This is an approximation, but it usually works +RPM_BUILD_ROOT=/ /usr/bin/pip install 'Pello==1.0.1' + +# Now, we'll upgrade it with regular pip +/usr/bin/pip install --upgrade 'Pello==1.0.2' + +# pip should see it +/usr/bin/pip freeze | grep '^Pello==1\.0\.2$' + +# Both installations should still exist +test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" + +# Let's ditch the local one +/usr/bin/pip uninstall --yes Pello + +# It should only remove one of them +test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" + +# And pip should still see the RPM-installed one +/usr/bin/pip freeze | grep '^Pello==1\.0\.1$' + +# Again, but as regular user +useradd fedora-test-user +su fedora-test-user -c '/usr/bin/pip install "Pello==1.0.2"' +test -d "${USER_SITELIB}/Pello-1.0.2.dist-info" +su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.2$' +su fedora-test-user -c '/usr/bin/pip uninstall --yes Pello' +su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.1$' diff --git a/tests/tests.yml b/tests/tests.yml index b29f39e..fcbc430 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -63,6 +63,7 @@ - pyproject_clikit: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-clikit + - pip_install_upgrade required_packages: - gcc - virtualenv @@ -79,3 +80,6 @@ - mock - rpmdevtools - rpm-build + - grep + - util-linux + - shadow-utils From 8b7935f5a8476e3fdfef91e9484afccea4418709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 23 Sep 2021 14:56:56 +0200 Subject: [PATCH 185/287] Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme --- python-pip.spec | 12 +++++++- ...existing-dist-only-if-path-conflicts.patch | 30 +++++++++++-------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 261ab3e..ec7f00a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -70,6 +70,7 @@ BuildRequires: python-wheel-wheel # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 +# Could be replaced with https://www.python.org/dev/peps/pep-0668/ Patch3: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi @@ -203,6 +204,12 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} +# The python3.10 version that added the rpm_prefix sysconfig install scheme +# This pip can also function with the previous version, +# but it would remove RPM-installed packages during sudo pip install --upgrade. +Requires: python3-libs >= 3.10.0-2 + + %{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} @@ -391,6 +398,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 +- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme + * Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 - Fix broken uninstallation by a bogus downstream patch diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index e68e892..a6cdc1c 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,10 +1,13 @@ -From aca0c9df4ef54f70a3fedb07f4faac463f88a331 Mon Sep 17 00:00:00 2001 +From 03fe2f1a674d8a8dfbd7da5bef2a6ae123670092 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -when pip install -U is executed. +when pip install --upgrade is executed. Resolves: rhbz#1550368 @@ -16,9 +19,9 @@ Co-Authored-By: Miro Hrončok --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/resolution/resolvelib/factory.py | 10 ++++++++++ + src/pip/_internal/resolution/resolvelib/factory.py | 13 +++++++++++++ src/pip/_internal/utils/misc.py | 11 +++++++++++ - 4 files changed, 27 insertions(+), 2 deletions(-) + 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index 4c58cdb..3570e17 100644 @@ -65,14 +68,14 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..555e657 100644 +index e7fd344..73b83fb 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ import contextlib import functools import logging -+import sys ++import sysconfig from typing import ( TYPE_CHECKING, Dict, @@ -92,16 +95,19 @@ index e7fd344..555e657 100644 from pip._internal.utils.virtualenv import running_under_virtualenv from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -525,6 +528,13 @@ class Factory: +@@ -525,6 +528,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None + # Prevent uninstalling packages from /usr -+ if dist_location(dist._dist) in ( -+ get_scheme('', prefix=sys.base_prefix).purelib, -+ get_scheme('', prefix=sys.base_prefix).platlib, -+ ): -+ return None ++ try: ++ if dist_location(dist._dist) in ( ++ sysconfig.get_path('purelib', scheme='rpm_prefix'), ++ sysconfig.get_path('platlib', scheme='rpm_prefix'), ++ ): ++ return None ++ except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet ++ pass + # We're installing into global site. The current installation must # be uninstalled, no matter it's in global or user site, because the From 05b44649bb7b306833cf22db8b400fc1cb91300d Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 6 Oct 2021 16:07:04 +0200 Subject: [PATCH 186/287] Remove bundled windows executables Resolves: rhbz#2005453 --- python-pip.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index ec7f00a..530ea14 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -263,6 +263,9 @@ ln -s %{python_wheeldir} tests/data/common_wheels # Remove shebang from files in bundled chardet grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" +# Remove windows executable binaries +rm -v src/pip/_vendor/distlib/*.exe +sed -i '/\.exe/d' setup.py %build %py3_build_wheel @@ -398,6 +401,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 +- Remove bundled windows executables +- Resolves: rhbz#2005453 + * Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 - Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme From 54943ebf8ab1f3aa9ffcc9da361f7c71b39176c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Oct 2021 13:34:37 +0200 Subject: [PATCH 187/287] Update to 21.3 --- python-pip.spec | 22 +++++---- ...existing-dist-only-if-path-conflicts.patch | 48 +++++++++---------- sources | 2 +- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 530ea14..ff1412f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.2.3 +%global base_version 21.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -122,27 +122,27 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.2 -Provides: bundled(python%{1}dist(distro)) = 1.5 +Provides: bundled(python%{1}dist(distlib)) = 0.3.3 +Provides: bundled(python%{1}dist(distro)) = 1.6 Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 3.2 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 21 Provides: bundled(python%{1}dist(pep517)) = 0.11 -Provides: bundled(python%{1}dist(progress)) = 1.5 +Provides: bundled(python%{1}dist(platformdirs)) = 2.4 +Provides: bundled(python%{1}dist(progress)) = 1.6 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 Provides: bundled(python%{1}dist(requests)) = 2.26 -Provides: bundled(python%{1}dist(resolvelib)) = 0.7.1 +Provides: bundled(python%{1}dist(resolvelib)) = 0.8 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 Provides: bundled(python%{1}dist(tomli)) = 1.0.3 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.6 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.7 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -360,11 +360,13 @@ pytest_k='not completion and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha' +# test_pep517 and test_pep660 are ignored entirely, as they import tomli_w and we don't have that packaged yet # --deselect'ed tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 %pytest -m 'not network' -k "$(echo $pytest_k)" \ + --ignore tests/functional/test_pep660.py --ignore tests/functional/test_pep517.py \ --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py %endif @@ -401,6 +403,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Oct 13 2021 Miro Hrončok - 21.3-1 +- Update to 21.3 +- Resolves: rhbz#2013026 + * Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 - Remove bundled windows executables - Resolves: rhbz#2005453 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index a6cdc1c..f04257c 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From 03fe2f1a674d8a8dfbd7da5bef2a6ae123670092 Mon Sep 17 00:00:00 2001 +From 517656ed4520b09ac6365467e459778f94ca2f0c Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -24,10 +24,10 @@ Co-Authored-By: Miro Hrončok 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 4c58cdb..3570e17 100644 +index ff0dd2f..a72aec8 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( +@@ -46,6 +46,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -35,9 +35,9 @@ index 4c58cdb..3570e17 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -426,7 +427,7 @@ class InstallRequirement: - "lack sys.path precedence to {} in {}".format( - existing_dist.project_name, existing_dist.location) +@@ -433,7 +434,7 @@ class InstallRequirement: + existing_dist.project_name, existing_dist.location + ) ) - else: + elif dist_in_install_path(existing_dist): @@ -45,18 +45,18 @@ index 4c58cdb..3570e17 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 4df8f7e..dda2292 100644 +index 09caaa6..c1542ec 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -42,6 +42,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid +@@ -44,6 +44,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid from pip._internal.utils.compatibility_tags import get_supported from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path - from pip._internal.utils.packaging import check_requires_python, get_requires_python + from pip._internal.utils.packaging import check_requires_python logger = logging.getLogger(__name__) -@@ -194,7 +195,9 @@ class Resolver(BaseResolver): +@@ -203,7 +204,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -68,7 +68,7 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..73b83fb 100644 +index 766dc26..c8c1cd8 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -79,7 +79,7 @@ index e7fd344..73b83fb 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -34,6 +35,7 @@ from pip._internal.exceptions import ( +@@ -33,6 +34,7 @@ from pip._internal.exceptions import ( UnsupportedWheel, ) from pip._internal.index.package_finder import PackageFinder @@ -87,15 +87,15 @@ index e7fd344..73b83fb 100644 from pip._internal.metadata import BaseDistribution, get_default_environment from pip._internal.models.link import Link from pip._internal.models.wheel import Wheel -@@ -46,6 +48,7 @@ from pip._internal.req.req_install import ( +@@ -45,6 +47,7 @@ from pip._internal.req.req_install import ( from pip._internal.resolution.base import InstallRequirementProvider from pip._internal.utils.compatibility_tags import get_supported from pip._internal.utils.hashes import Hashes +from pip._internal.utils.misc import dist_location + from pip._internal.utils.packaging import get_requirement from pip._internal.utils.virtualenv import running_under_virtualenv - from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -525,6 +528,16 @@ class Factory: +@@ -526,6 +529,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -113,18 +113,18 @@ index e7fd344..73b83fb 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 99ebea3..5901687 100644 +index d3e9053..d25d1c3 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -40,6 +40,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed +@@ -38,6 +38,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed from pip import __version__ from pip._internal.exceptions import CommandError from pip._internal.locations import get_major_minor_version, site_packages, user_site +from pip._internal.locations import get_scheme - from pip._internal.utils.compat import WINDOWS, stdlib_pkgs - from pip._internal.utils.virtualenv import ( - running_under_virtualenv, -@@ -382,6 +383,16 @@ def dist_in_site_packages(dist): + from pip._internal.utils.compat import WINDOWS + from pip._internal.utils.egg_link import egg_link_path_from_location + from pip._internal.utils.virtualenv import running_under_virtualenv +@@ -354,6 +355,16 @@ def dist_in_site_packages(dist: Distribution) -> bool: return dist_location(dist).startswith(normalize_path(site_packages)) @@ -138,9 +138,9 @@ index 99ebea3..5901687 100644 + get_scheme("").purelib.split('python')[0])) + + - def dist_is_editable(dist): - # type: (Distribution) -> bool - """ + def get_distribution(req_name: str) -> Optional[Distribution]: + """Given a requirement name, return the installed Distribution object. + -- 2.32.0 diff --git a/sources b/sources index 8be331c..b0c8764 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.2.3.tar.gz) = 9df888c871040d3812a2bf358013e3af976ede1e6aebf6747527be470674bb55ca1312d54021a7913630c04b09981cf481202c8405faf08b1b37e29272adf547 +SHA512 (pip-21.3.tar.gz) = 7106bfdf5ea651c6c69823e8033825378c0f212513c23361f7d4b158ecf4b54752b45ff15a313a2426d38c9e16dbe4f8c3fd39fc7dbda77db1ab791702ddd6f8 From 20ae7fd4408aeca421584935e64e15c3e40d653e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Oct 2021 13:50:30 +0200 Subject: [PATCH 188/287] Fedora CI: Add Python 3.11 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index fcbc430..a543138 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -28,6 +28,9 @@ - smoke310: dir: python/smoke run: VERSION=3.10 ./venv.sh + - smoke311: + dir: python/smoke + run: VERSION=3.11 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -49,6 +52,9 @@ - smoke310_virtualenv: dir: python/smoke run: VERSION=3.10 METHOD=virtualenv ./venv.sh + - smoke311_virtualenv: + dir: python/smoke + run: VERSION=3.11 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -73,6 +79,7 @@ - python3.8 - python3.9 - python3.10 + - python3.11 - python2-devel - python3-devel - python3-tox From 5e3e97d02bd7cfab73f6811eb2b2ce7d990f0082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 15 Oct 2021 09:36:43 +0200 Subject: [PATCH 189/287] Fix incomplete pip-updates in virtual environments --- python-pip.spec | 1 + remove-existing-dist-only-if-path-conflicts.patch | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ff1412f..e899c46 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -406,6 +406,7 @@ pytest_k='not completion and * Wed Oct 13 2021 Miro Hrončok - 21.3-1 - Update to 21.3 - Resolves: rhbz#2013026 +- Fix incomplete pip-updates in virtual environments * Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 - Remove bundled windows executables diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index f04257c..7ff95e5 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -71,10 +71,11 @@ diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_inter index 766dc26..c8c1cd8 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,6 +1,7 @@ +@@ -1,6 +1,8 @@ import contextlib import functools import logging ++import sys +import sysconfig from typing import ( TYPE_CHECKING, @@ -102,8 +103,8 @@ index 766dc26..c8c1cd8 100644 + # Prevent uninstalling packages from /usr + try: + if dist_location(dist._dist) in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix'), -+ sysconfig.get_path('platlib', scheme='rpm_prefix'), ++ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet From 931a7e69a1785765ceff16f2641188af0eff9f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 25 Oct 2021 21:36:52 +0200 Subject: [PATCH 190/287] Update to 21.3.1 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e899c46..d07f790 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.3 +%global base_version 21.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -132,7 +132,7 @@ Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 3.2 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 21 -Provides: bundled(python%{1}dist(pep517)) = 0.11 +Provides: bundled(python%{1}dist(pep517)) = 0.12 Provides: bundled(python%{1}dist(platformdirs)) = 2.4 Provides: bundled(python%{1}dist(progress)) = 1.6 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 @@ -403,6 +403,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 +- Update to 21.3.1 +- Resolves: rhbz#2016682 + * Wed Oct 13 2021 Miro Hrončok - 21.3-1 - Update to 21.3 - Resolves: rhbz#2013026 diff --git a/sources b/sources index b0c8764..a6223f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.3.tar.gz) = 7106bfdf5ea651c6c69823e8033825378c0f212513c23361f7d4b158ecf4b54752b45ff15a313a2426d38c9e16dbe4f8c3fd39fc7dbda77db1ab791702ddd6f8 +SHA512 (pip-21.3.1.tar.gz) = 2f50f95fe36cffc18821a70824f5b28d03598894f9ea5b02acc4921d16fc7739131814828a2159bcd577331cc780c7776a3669fa1ca2d4690c861add10a16f00 From b4e24c5cb6bcee150136e785c07fb291306ddb47 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Wed, 29 Sep 2021 12:56:21 +0200 Subject: [PATCH 191/287] Use new macros %python_wheel_dir and %python_wheel_pkg_prefix ..when creating the wheel subpackage. This does not actually change the name or the contents of the subpackage. --- python-pip.spec | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index d07f790..18b5187 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,8 +15,7 @@ %global srcname pip %global base_version 21.3.1 %global upstream_version %{base_version}%{?prerel} -%global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl -%global python_wheeldir %{_datadir}/python-wheels +%global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) @@ -232,7 +231,7 @@ A documentation for a tool for installing and managing Python packages %endif -%package wheel +%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel Summary: The pip wheel Requires: ca-certificates @@ -241,7 +240,7 @@ Requires: ca-certificates %{crypt_compat_recommends 3} -%description wheel +%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. %prep @@ -258,7 +257,7 @@ sed -i '/html_theme = "furo"/d' docs/html/conf.py sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here -ln -s %{python_wheeldir} tests/data/common_wheels +ln -s %{python_wheel_dir} tests/data/common_wheels # Remove shebang from files in bundled chardet grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" @@ -284,7 +283,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) -%{python3} dist/%{python_wheelname}/pip install \ +%{python3} dist/%{python_wheel_name}/pip install \ --root %{buildroot} \ --no-deps \ --disable-pip-version-check \ @@ -335,8 +334,8 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD -mkdir -p %{buildroot}%{python_wheeldir} -install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} +mkdir -p %{buildroot}%{python_wheel_dir} +install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %if %{with tests} @@ -396,11 +395,11 @@ pytest_k='not completion and %doc docs/build/html %endif -%files wheel +%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel %license LICENSE.txt # we own the dir for simplicity -%dir %{python_wheeldir}/ -%{python_wheeldir}/%{python_wheelname} +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} %changelog * Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 From 636f3bf0bdc364530aeaaa5a3b590b92ccda8d47 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:11:18 +0000 Subject: [PATCH 192/287] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 18b5187..f6cc58c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -402,6 +402,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 - Update to 21.3.1 - Resolves: rhbz#2016682 From 093cb73c53d88868b657774a6337de2504486390 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 16 Feb 2022 08:58:06 +0100 Subject: [PATCH 193/287] Update to 22.0.3 --- python-pip.spec | 39 +++-- ...existing-dist-only-if-path-conflicts.patch | 142 +++++++----------- sources | 2 +- 3 files changed, 80 insertions(+), 103 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f6cc58c..1c63666 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.3.1 +%global base_version 22.0.3 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -41,13 +41,16 @@ Summary: A tool for installing and managing Python packages # packaging: ASL 2.0 or BSD # pep517: MIT # progress: ISC +# pygments: BSD # pyparsing: MIT # requests: ASL 2.0 # resolvelib: ISC +# rich: MIT # setuptools: MIT # six: MIT # tenacity: ASL 2.0 # tomli: MIT +# typing-extensions: Python # urllib3: MIT # webencodings: BSD @@ -121,27 +124,30 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.10 +Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.3 +Provides: bundled(python%{1}dist(distlib)) = 0.3.4 Provides: bundled(python%{1}dist(distro)) = 1.6 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 3.2 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 -Provides: bundled(python%{1}dist(packaging)) = 21 +Provides: bundled(python%{1}dist(idna)) = 3.3 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.3 +Provides: bundled(python%{1}dist(packaging)) = 21.3 Provides: bundled(python%{1}dist(pep517)) = 0.12 -Provides: bundled(python%{1}dist(platformdirs)) = 2.4 +Provides: bundled(python%{1}dist(platformdirs)) = 2.4.1 Provides: bundled(python%{1}dist(progress)) = 1.6 -Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.26 -Provides: bundled(python%{1}dist(resolvelib)) = 0.8 +Provides: bundled(python%{1}dist(pygments)) = 2.11.2 +Provides: bundled(python%{1}dist(pyparsing)) = 3.0.7 +Provides: bundled(python%{1}dist(requests)) = 2.27.1 +Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 +Provides: bundled(python%{1}dist(rich)) = 11 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 Provides: bundled(python%{1}dist(tomli)) = 1.0.3 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.7 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.0.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.8 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -184,6 +190,7 @@ BuildRequires: python%{python3_pkgversion}-scripttest BuildRequires: python%{python3_pkgversion}-virtualenv BuildRequires: python%{python3_pkgversion}-werkzeug BuildRequires: python%{python3_pkgversion}-pyyaml +BuildRequires: python%{python3_pkgversion}-tomli-w %endif BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates @@ -359,13 +366,11 @@ pytest_k='not completion and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha' -# test_pep517 and test_pep660 are ignored entirely, as they import tomli_w and we don't have that packaged yet # --deselect'ed tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --ignore tests/functional/test_pep660.py --ignore tests/functional/test_pep517.py \ --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py %endif @@ -402,6 +407,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 +- Update to 22.0.3 +Resolves: rhbz#2048243 + * Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 7ff95e5..8f1e1b0 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,14 +1,12 @@ -From 517656ed4520b09ac6365467e459778f94ca2f0c Mon Sep 17 00:00:00 2001 -From: Karolina Surma -Date: Mon, 10 May 2021 18:16:20 +0200 +From d4c72aa37d16e19c0f157e86203a66cad32a9c80 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under - /usr/lib + /usr/lib when pip install --upgrade is executed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -when pip install --upgrade is executed. - Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian @@ -16,59 +14,74 @@ Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok +Co-Authored-By: Karolina Surma --- - src/pip/_internal/req/req_install.py | 3 ++- - src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/resolution/resolvelib/factory.py | 13 +++++++++++++ - src/pip/_internal/utils/misc.py | 11 +++++++++++ - 4 files changed, 30 insertions(+), 2 deletions(-) + src/pip/_internal/metadata/base.py | 12 +++++++++++- + src/pip/_internal/req/req_install.py | 2 +- + src/pip/_internal/resolution/legacy/resolver.py | 4 +++- + src/pip/_internal/resolution/resolvelib/factory.py | 12 ++++++++++++ + 4 files changed, 27 insertions(+), 3 deletions(-) +diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py +index 1a5a781..3df4ab2 100644 +--- a/src/pip/_internal/metadata/base.py ++++ b/src/pip/_internal/metadata/base.py +@@ -24,7 +24,7 @@ from pip._vendor.packaging.utils import NormalizedName + from pip._vendor.packaging.version import LegacyVersion, Version + + from pip._internal.exceptions import NoneMetadataError +-from pip._internal.locations import site_packages, user_site ++from pip._internal.locations import get_scheme, site_packages, user_site + from pip._internal.models.direct_url import ( + DIRECT_URL_METADATA_NAME, + DirectUrl, +@@ -441,6 +441,16 @@ class BaseDistribution(Protocol): + or self._iter_declared_entries_from_legacy() + ) + ++ @property ++ def in_install_path(self) -> bool: ++ """ ++ Return True if given Distribution is installed in ++ path matching distutils_scheme layout. ++ """ ++ norm_path = normalize_path(self.installed_location) ++ return norm_path.startswith(normalize_path( ++ get_scheme("").purelib.split('python')[0])) ++ + + class BaseEnvironment: + """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index ff0dd2f..a72aec8 100644 +index 02dbda1..a952357 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -46,6 +46,7 @@ from pip._internal.utils.misc import ( - ask_path_exists, - backup_dir, - display_path, -+ dist_in_install_path, - dist_in_site_packages, - dist_in_usersite, - get_distribution, -@@ -433,7 +434,7 @@ class InstallRequirement: - existing_dist.project_name, existing_dist.location - ) +@@ -406,7 +406,7 @@ class InstallRequirement: + f"lack sys.path precedence to {existing_dist.raw_name} " + f"in {existing_dist.location}" ) - else: -+ elif dist_in_install_path(existing_dist): ++ elif existing_dist.in_install_path: self.should_reinstall = True else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 09caaa6..c1542ec 100644 +index 8c149d4..a944906 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -44,6 +44,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid - from pip._internal.utils.compatibility_tags import get_supported - from pip._internal.utils.logging import indent_log - from pip._internal.utils.misc import dist_in_usersite, normalize_version_info -+from pip._internal.utils.misc import dist_in_install_path - from pip._internal.utils.packaging import check_requires_python - - logger = logging.getLogger(__name__) -@@ -203,7 +204,9 @@ class Resolver(BaseResolver): +@@ -203,7 +203,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. -- if not self.use_user_site or dist_in_usersite(req.satisfied_by): +- if not self.use_user_site or req.satisfied_by.in_usersite: + if ((not self.use_user_site -+ or dist_in_usersite(req.satisfied_by)) -+ and dist_in_install_path(req.satisfied_by)): ++ or req.satisfied_by.in_usersite) ++ and req.satisfied_by.in_install_path): req.should_reinstall = True req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 766dc26..c8c1cd8 100644 +index 261d8d5..d1b7728 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -80,32 +93,16 @@ index 766dc26..c8c1cd8 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -33,6 +34,7 @@ from pip._internal.exceptions import ( - UnsupportedWheel, - ) - from pip._internal.index.package_finder import PackageFinder -+from pip._internal.locations import get_scheme - from pip._internal.metadata import BaseDistribution, get_default_environment - from pip._internal.models.link import Link - from pip._internal.models.wheel import Wheel -@@ -45,6 +47,7 @@ from pip._internal.req.req_install import ( - from pip._internal.resolution.base import InstallRequirementProvider - from pip._internal.utils.compatibility_tags import get_supported - from pip._internal.utils.hashes import Hashes -+from pip._internal.utils.misc import dist_location - from pip._internal.utils.packaging import get_requirement - from pip._internal.utils.virtualenv import running_under_virtualenv - -@@ -526,6 +529,16 @@ class Factory: +@@ -564,6 +566,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None + # Prevent uninstalling packages from /usr + try: -+ if dist_location(dist._dist) in ( ++ if dist.installed_location in ( + sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), + sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ ): ++ ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet + pass @@ -113,35 +110,6 @@ index 766dc26..c8c1cd8 100644 # We're installing into global site. The current installation must # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index d3e9053..d25d1c3 100644 ---- a/src/pip/_internal/utils/misc.py -+++ b/src/pip/_internal/utils/misc.py -@@ -38,6 +38,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed - from pip import __version__ - from pip._internal.exceptions import CommandError - from pip._internal.locations import get_major_minor_version, site_packages, user_site -+from pip._internal.locations import get_scheme - from pip._internal.utils.compat import WINDOWS - from pip._internal.utils.egg_link import egg_link_path_from_location - from pip._internal.utils.virtualenv import running_under_virtualenv -@@ -354,6 +355,16 @@ def dist_in_site_packages(dist: Distribution) -> bool: - return dist_location(dist).startswith(normalize_path(site_packages)) - - -+def dist_in_install_path(dist): -+ """ -+ Return True if given Distribution is installed in -+ path matching distutils_scheme layout. -+ """ -+ norm_path = normalize_path(dist_location(dist)) -+ return norm_path.startswith(normalize_path( -+ get_scheme("").purelib.split('python')[0])) -+ -+ - def get_distribution(req_name: str) -> Optional[Distribution]: - """Given a requirement name, return the installed Distribution object. - -- -2.32.0 +2.35.1 diff --git a/sources b/sources index a6223f9..9efd73f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.3.1.tar.gz) = 2f50f95fe36cffc18821a70824f5b28d03598894f9ea5b02acc4921d16fc7739131814828a2159bcd577331cc780c7776a3669fa1ca2d4690c861add10a16f00 +SHA512 (pip-22.0.3.tar.gz) = 05f0807b298c2136842ad1cae3b003f81d85ca79103f12171e4c8d020d6add076848c1acfb6442c4ae2da6b834de0e87dffaec7bd24dfc403372cead94949326 From 590775acbf1549cd3cbfe022b8d15c7b7428cb40 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 21 Mar 2022 10:17:04 +0100 Subject: [PATCH 194/287] Update to 22.0.4 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 1c63666..25b8f85 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.0.3 +%global base_version 22.0.4 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -128,7 +128,7 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.10 Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.4 +Provides: bundled(python%{1}dist(distlib)) = 0.3.3 Provides: bundled(python%{1}dist(distro)) = 1.6 Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 3.3 @@ -407,6 +407,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Mar 21 2022 Karolina Surma - 22.0.4-1 +- Update to 22.0.4 +Resolves: rhbz#2061262 + * Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 - Update to 22.0.3 Resolves: rhbz#2048243 diff --git a/sources b/sources index 9efd73f..7bec17a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.0.3.tar.gz) = 05f0807b298c2136842ad1cae3b003f81d85ca79103f12171e4c8d020d6add076848c1acfb6442c4ae2da6b834de0e87dffaec7bd24dfc403372cead94949326 +SHA512 (pip-22.0.4.tar.gz) = af6d1787b4fe97f2eec9c2e3e3f0f756efca8cb83f6ecdae797986fb6050ee60d872a8a8eb7502a32c4334fc0c7af8cf3c58ce980407d0e9f89eec28a4290093 From 1963d79695cd8faa193a49543b2b749be95cc172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 27 Apr 2022 08:27:55 +0200 Subject: [PATCH 195/287] Remove patch numbering --- python-pip.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 25b8f85..b5d0530 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -73,21 +73,21 @@ BuildRequires: python-wheel-wheel # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 # Could be replaced with https://www.python.org/dev/peps/pep-0668/ -Patch3: remove-existing-dist-only-if-path-conflicts.patch +Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 -Patch4: dummy-certifi.patch +Patch: dummy-certifi.patch # Don't warn the user about pip._internal.main() entrypoint # In Fedora, we use that in ensurepip and users cannot do anything about it, # this warning is juts moot. Also, the warning breaks CPython test suite. -Patch5: nowarn-pip._internal.main.patch +Patch: nowarn-pip._internal.main.patch # Don't warn the user about packaging's LegacyVersion being deprecated. # (This also breaks Python's test suite when warnings are treated as errors.) # Upstream issue: https://github.com/pypa/packaging/issues/368 -Patch6: no-version-warning.patch +Patch: no-version-warning.patch # Downstream only patch # Users might have local installations of pip from using From 5a8c8943b07514f993a08b4db2a021769da2dc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Tue, 26 Apr 2022 12:26:29 +0200 Subject: [PATCH 196/287] Fallback to pep517 if setup.py is present and setuptools cannot be imported --- 452d7da880.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 10 ++++++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 452d7da880.patch diff --git a/452d7da880.patch b/452d7da880.patch new file mode 100644 index 0000000..9333f7e --- /dev/null +++ b/452d7da880.patch @@ -0,0 +1,76 @@ +From 452d7da8801ca318f280bd1c1085c60b0b6f747f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Sat, 23 Apr 2022 16:56:59 +0200 +Subject: [PATCH] Fallback to pyproject.toml-based builds if setuptools cannot + be imported (#10717) + +This fallback is only triggered if the project has a `setup.py` file. + +Co-authored-by: Tzu-ping Chung +Co-authored-by: Pradyun Gedam +--- + news/10717.bugfix.rst | 1 + + src/pip/_internal/cli/cmdoptions.py | 7 +++++++ + src/pip/_internal/pyproject.py | 11 +++++++++-- + 3 files changed, 17 insertions(+), 2 deletions(-) + create mode 100644 news/10717.bugfix.rst + +diff --git a/news/10717.bugfix.rst b/news/10717.bugfix.rst +new file mode 100644 +index 00000000000..950a4521763 +--- /dev/null ++++ b/news/10717.bugfix.rst +@@ -0,0 +1 @@ ++Fallback to pyproject.toml-based builds if ``setup.py`` is present in a project, but ``setuptools`` cannot be imported. +diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py +index cd1e8a00f63..91b94e3028c 100644 +--- a/src/pip/_internal/cli/cmdoptions.py ++++ b/src/pip/_internal/cli/cmdoptions.py +@@ -10,6 +10,7 @@ + # The following comment should be removed at some point in the future. + # mypy: strict-optional=False + ++import importlib.util + import logging + import os + import textwrap +@@ -770,6 +771,12 @@ def _handle_no_use_pep517( + """ + raise_option_error(parser, option=option, msg=msg) + ++ # If user doesn't wish to use pep517, we check if setuptools is installed ++ # and raise error if it is not. ++ if not importlib.util.find_spec("setuptools"): ++ msg = "It is not possible to use --no-use-pep517 without setuptools installed." ++ raise_option_error(parser, option=option, msg=msg) ++ + # Otherwise, --no-use-pep517 was passed via the command-line. + parser.values.use_pep517 = False + +diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py +index e183eaf8658..1e9119f3e5c 100644 +--- a/src/pip/_internal/pyproject.py ++++ b/src/pip/_internal/pyproject.py +@@ -1,3 +1,4 @@ ++import importlib.util + import os + from collections import namedtuple + from typing import Any, List, Optional +@@ -89,9 +90,15 @@ def load_pyproject_toml( + + # If we haven't worked out whether to use PEP 517 yet, + # and the user hasn't explicitly stated a preference, +- # we do so if the project has a pyproject.toml file. ++ # we do so if the project has a pyproject.toml file ++ # or if we cannot import setuptools. ++ ++ # We fallback to PEP 517 when without setuptools, ++ # so setuptools can be installed as a default build backend. ++ # For more info see: ++ # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9 + elif use_pep517 is None: +- use_pep517 = has_pyproject ++ use_pep517 = has_pyproject or not importlib.util.find_spec("setuptools") + + # At this point, we know whether we're going to use PEP 517. + assert use_pep517 is not None diff --git a/python-pip.spec b/python-pip.spec index b5d0530..49e487b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -89,6 +89,10 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Fallback to pep517 if setup.py is present and setuptools cannot be imported +# https://bugzilla.redhat.com/show_bug.cgi?id=2020635 +Patch: https://github.com/pypa/pip/commit/452d7da880.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -407,6 +411,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 +- Fallback to pep517 if setup.py is present and setuptools cannot be imported +- Fixes: rhbz#2020635 + * Mon Mar 21 2022 Karolina Surma - 22.0.4-1 - Update to 22.0.4 Resolves: rhbz#2061262 From b0f90f583c8888767d6f2c27380793a3c2bf27ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 27 Apr 2022 10:30:20 +0200 Subject: [PATCH 197/287] Spaces: Align all patches definitions consistently --- python-pip.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 49e487b..4517d23 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -73,21 +73,21 @@ BuildRequires: python-wheel-wheel # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 # Could be replaced with https://www.python.org/dev/peps/pep-0668/ -Patch: remove-existing-dist-only-if-path-conflicts.patch +Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 -Patch: dummy-certifi.patch +Patch: dummy-certifi.patch # Don't warn the user about pip._internal.main() entrypoint # In Fedora, we use that in ensurepip and users cannot do anything about it, # this warning is juts moot. Also, the warning breaks CPython test suite. -Patch: nowarn-pip._internal.main.patch +Patch: nowarn-pip._internal.main.patch # Don't warn the user about packaging's LegacyVersion being deprecated. # (This also breaks Python's test suite when warnings are treated as errors.) # Upstream issue: https://github.com/pypa/packaging/issues/368 -Patch: no-version-warning.patch +Patch: no-version-warning.patch # Fallback to pep517 if setup.py is present and setuptools cannot be imported # https://bugzilla.redhat.com/show_bug.cgi?id=2020635 From 9f67b4d1a38f843f2cee843f2925ff600245625c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 13:19:54 +0200 Subject: [PATCH 198/287] Bootstrap for Python 3.11 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 4517d23..c5b639b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 # The original RHEL 9 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -21,7 +23,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -411,6 +413,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Jun 13 2022 Python Maint - 22.0.4-3 +- Bootstrap for Python 3.11 + * Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 - Fallback to pep517 if setup.py is present and setuptools cannot be imported - Fixes: rhbz#2020635 From 2c59c720fb881fd12eebeba92bf3bd5f0ee0ef6e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 15 Jun 2022 15:03:57 +0200 Subject: [PATCH 199/287] Rebuilt for Python 3.11 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index c5b639b..cb487a5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 # The original RHEL 9 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -23,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -413,6 +411,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Jun 15 2022 Python Maint - 22.0.4-4 +- Rebuilt for Python 3.11 + * Mon Jun 13 2022 Python Maint - 22.0.4-3 - Bootstrap for Python 3.11 From d6c837fe66f089d35df5de41de834136713a48f6 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 29 Jun 2022 15:34:21 +0200 Subject: [PATCH 200/287] Fedora CI: Fix Python 3.10 and 3.11 --- tests/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index a543138..8f0a5de 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -78,8 +78,8 @@ - python3.7 - python3.8 - python3.9 - - python3.10 - - python3.11 + - python3.10-devel + - python3.11-devel - python2-devel - python3-devel - python3-tox From 3e8bb707575713cdafb08561083c2883632f02fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 20:50:51 +0000 Subject: [PATCH 201/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index cb487a5..cbcc5c5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -411,6 +411,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 15 2022 Python Maint - 22.0.4-4 - Rebuilt for Python 3.11 From 6300db47baa42ea4e648483392dbc90976af2a35 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 29 Jun 2022 02:26:42 +0200 Subject: [PATCH 202/287] Update to 22.2 Resolves: rhbz#2109468 --- 452d7da880.patch | 76 ------------------- dummy-certifi.patch | 22 +++--- nowarn-pip._internal.main.patch | 18 +++-- python-pip.spec | 47 +++++------- ...existing-dist-only-if-path-conflicts.patch | 26 +++---- sources | 2 +- 6 files changed, 56 insertions(+), 135 deletions(-) delete mode 100644 452d7da880.patch diff --git a/452d7da880.patch b/452d7da880.patch deleted file mode 100644 index 9333f7e..0000000 --- a/452d7da880.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 452d7da8801ca318f280bd1c1085c60b0b6f747f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= -Date: Sat, 23 Apr 2022 16:56:59 +0200 -Subject: [PATCH] Fallback to pyproject.toml-based builds if setuptools cannot - be imported (#10717) - -This fallback is only triggered if the project has a `setup.py` file. - -Co-authored-by: Tzu-ping Chung -Co-authored-by: Pradyun Gedam ---- - news/10717.bugfix.rst | 1 + - src/pip/_internal/cli/cmdoptions.py | 7 +++++++ - src/pip/_internal/pyproject.py | 11 +++++++++-- - 3 files changed, 17 insertions(+), 2 deletions(-) - create mode 100644 news/10717.bugfix.rst - -diff --git a/news/10717.bugfix.rst b/news/10717.bugfix.rst -new file mode 100644 -index 00000000000..950a4521763 ---- /dev/null -+++ b/news/10717.bugfix.rst -@@ -0,0 +1 @@ -+Fallback to pyproject.toml-based builds if ``setup.py`` is present in a project, but ``setuptools`` cannot be imported. -diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py -index cd1e8a00f63..91b94e3028c 100644 ---- a/src/pip/_internal/cli/cmdoptions.py -+++ b/src/pip/_internal/cli/cmdoptions.py -@@ -10,6 +10,7 @@ - # The following comment should be removed at some point in the future. - # mypy: strict-optional=False - -+import importlib.util - import logging - import os - import textwrap -@@ -770,6 +771,12 @@ def _handle_no_use_pep517( - """ - raise_option_error(parser, option=option, msg=msg) - -+ # If user doesn't wish to use pep517, we check if setuptools is installed -+ # and raise error if it is not. -+ if not importlib.util.find_spec("setuptools"): -+ msg = "It is not possible to use --no-use-pep517 without setuptools installed." -+ raise_option_error(parser, option=option, msg=msg) -+ - # Otherwise, --no-use-pep517 was passed via the command-line. - parser.values.use_pep517 = False - -diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py -index e183eaf8658..1e9119f3e5c 100644 ---- a/src/pip/_internal/pyproject.py -+++ b/src/pip/_internal/pyproject.py -@@ -1,3 +1,4 @@ -+import importlib.util - import os - from collections import namedtuple - from typing import Any, List, Optional -@@ -89,9 +90,15 @@ def load_pyproject_toml( - - # If we haven't worked out whether to use PEP 517 yet, - # and the user hasn't explicitly stated a preference, -- # we do so if the project has a pyproject.toml file. -+ # we do so if the project has a pyproject.toml file -+ # or if we cannot import setuptools. -+ -+ # We fallback to PEP 517 when without setuptools, -+ # so setuptools can be installed as a default build backend. -+ # For more info see: -+ # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9 - elif use_pep517 is None: -- use_pep517 = has_pyproject -+ use_pep517 = has_pyproject or not importlib.util.find_spec("setuptools") - - # At this point, we know whether we're going to use PEP 517. - assert use_pep517 is not None diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 459eada..a691cad 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,4 +1,4 @@ -From 2c58d7301dd5a47570f782fe2fce7fbb1918f60c Mon Sep 17 00:00:00 2001 +From cacd6d2fa9a27b29415a4ce25d76406fe69fc398 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 16:38:50 +0200 Subject: [PATCH] Dummy certifi patch @@ -9,28 +9,28 @@ Co-Authored-By: Tomas Hrnciar 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index b8140cf..f1a0b01 100644 +index f34045b..a2ada08 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py @@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): - - + + try: + raise ImportError # force fallback # Return a certificate file on disk for a standalone pip zipapp running in # an isolated build environment to use. Passing --cert to the standalone # pip does not work since requests calls where() unconditionally on import. -@@ -67,9 +68,7 @@ except ImportError: +@@ -75,9 +76,7 @@ except ImportError: # If we don't have importlib.resources, then we will just do the old logic # of assuming we're on the filesystem and munge the path directly. - def where(): + def where() -> str: - f = os.path.dirname(__file__) - - return os.path.join(f, "cacert.pem") + return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents(): --- -2.30.2 + + + def contents() -> str: +-- +2.35.3 diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 1490643..68f5971 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,4 +1,4 @@ -From 619782ad2d181fe2933ddf4edc7127fdc13dd0df Mon Sep 17 00:00:00 2001 +From 8dd3793d1bab226cec9c5c49b01718a9634bc403 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 16:48:49 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint @@ -24,11 +24,11 @@ index 6afb5c6..faf25af 100755 - return _wrapper(args) + return _wrapper(args, _nowarn=True) diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index 1504a12..07d941b 100644 +index f292c64..2e29a5e 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py -@@ -4,7 +4,7 @@ from typing import List, Optional - from pip._internal.cli.main import main +@@ -20,7 +20,7 @@ if WINDOWS: + ] -def _wrapper(args: Optional[List[str]] = None) -> int: @@ -36,7 +36,7 @@ index 1504a12..07d941b 100644 """Central wrapper for all old entrypoints. Historically pip has had several entrypoints defined. Because of issues -@@ -16,12 +16,13 @@ def _wrapper(args: Optional[List[str]] = None) -> int: +@@ -32,14 +32,15 @@ def _wrapper(args: Optional[List[str]] = None) -> int: directing them to an appropriate place for help, we now define all of our old entrypoints as wrappers for the current one. """ @@ -58,11 +58,13 @@ index 1504a12..07d941b 100644 + "running pip directly.\n" + ) return main(args) + + diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index e416315..7f57f67 100644 +index 3e85703..f86c392 100644 --- a/tests/functional/test_cli.py +++ b/tests/functional/test_cli.py -@@ -31,4 +31,5 @@ def test_entrypoints_work(entrypoint, script): +@@ -43,4 +43,5 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: result = script.pip("-V") result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) assert result.stdout == result2.stdout @@ -70,5 +72,5 @@ index e416315..7f57f67 100644 + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr -- -2.32.0 +2.35.3 diff --git a/python-pip.spec b/python-pip.spec index cbcc5c5..b3307f2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.0.4 +%global base_version 22.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -89,10 +89,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Fallback to pep517 if setup.py is present and setuptools cannot be imported -# https://bugzilla.redhat.com/show_bug.cgi?id=2020635 -Patch: https://github.com/pypa/pip/commit/452d7da880.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -128,30 +124,28 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.10 -Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 -Provides: bundled(python%{1}dist(chardet)) = 4 -Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.3 -Provides: bundled(python%{1}dist(distro)) = 1.6 -Provides: bundled(python%{1}dist(html5lib)) = 1.1 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 +Provides: bundled(python%{1}dist(certifi)) = 2022.6.15 +Provides: bundled(python%{1}dist(chardet)) = 5 +Provides: bundled(python%{1}dist(colorama)) = 0.4.5 +Provides: bundled(python%{1}dist(distlib)) = 0.3.5 +Provides: bundled(python%{1}dist(distro)) = 1.7 Provides: bundled(python%{1}dist(idna)) = 3.3 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.3 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 Provides: bundled(python%{1}dist(packaging)) = 21.3 Provides: bundled(python%{1}dist(pep517)) = 0.12 -Provides: bundled(python%{1}dist(platformdirs)) = 2.4.1 -Provides: bundled(python%{1}dist(progress)) = 1.6 -Provides: bundled(python%{1}dist(pygments)) = 2.11.2 -Provides: bundled(python%{1}dist(pyparsing)) = 3.0.7 -Provides: bundled(python%{1}dist(requests)) = 2.27.1 +Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 +Provides: bundled(python%{1}dist(pygments)) = 2.12 +Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 +Provides: bundled(python%{1}dist(requests)) = 2.28.1 Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 11 +Provides: bundled(python%{1}dist(rich)) = 12.5.1 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 -Provides: bundled(python%{1}dist(tomli)) = 1.0.3 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.0.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.8 +Provides: bundled(python%{1}dist(tomli)) = 2.0.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.3 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.10 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -270,9 +264,6 @@ sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here ln -s %{python_wheel_dir} tests/data/common_wheels -# Remove shebang from files in bundled chardet -grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" - # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' setup.py @@ -411,6 +402,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 +- Update to 22.2 +Resolves: rhbz#2109468 + * Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 8f1e1b0..d4497fd 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From d4c72aa37d16e19c0f157e86203a66cad32a9c80 Mon Sep 17 00:00:00 2001 +From 2c3f3a590ddfc151a456b44a5f96f0f603d178e9 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under @@ -23,10 +23,10 @@ Co-Authored-By: Karolina Surma 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py -index 1a5a781..3df4ab2 100644 +index 151fd6d..f9109cd 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -24,7 +24,7 @@ from pip._vendor.packaging.utils import NormalizedName +@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName from pip._vendor.packaging.version import LegacyVersion, Version from pip._internal.exceptions import NoneMetadataError @@ -35,9 +35,9 @@ index 1a5a781..3df4ab2 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -441,6 +441,16 @@ class BaseDistribution(Protocol): - or self._iter_declared_entries_from_legacy() - ) +@@ -560,6 +560,16 @@ class BaseDistribution(Protocol): + for extra in self._iter_egg_info_extras(): + metadata["Provides-Extra"] = extra + @property + def in_install_path(self) -> bool: @@ -53,10 +53,10 @@ index 1a5a781..3df4ab2 100644 class BaseEnvironment: """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 02dbda1..a952357 100644 +index a1e376c..ed7facf 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -406,7 +406,7 @@ class InstallRequirement: +@@ -416,7 +416,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -66,10 +66,10 @@ index 02dbda1..a952357 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 8c149d4..a944906 100644 +index fb49d41..040f2c1 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -203,7 +203,9 @@ class Resolver(BaseResolver): +@@ -325,7 +325,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -81,7 +81,7 @@ index 8c149d4..a944906 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 261d8d5..d1b7728 100644 +index a4c24b5..e7e2da9 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -93,7 +93,7 @@ index 261d8d5..d1b7728 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -564,6 +566,16 @@ class Factory: +@@ -549,6 +551,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -111,5 +111,5 @@ index 261d8d5..d1b7728 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.35.1 +2.35.3 diff --git a/sources b/sources index 7bec17a..05a18a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.0.4.tar.gz) = af6d1787b4fe97f2eec9c2e3e3f0f756efca8cb83f6ecdae797986fb6050ee60d872a8a8eb7502a32c4334fc0c7af8cf3c58ce980407d0e9f89eec28a4290093 +SHA512 (pip-22.2.tar.gz) = 2ff3f9c2dc84c65c14c978e8c58cd3cee6cfff9753655c726763d6d7780d147479f32c47873d402ad9e0821fef940b971a7df93fabd6b998f07dea5af1251c9b From 9361272bc97f6d8a01ae9ccda41feafefcf78d57 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Sat, 6 Aug 2022 02:50:54 +0200 Subject: [PATCH 203/287] Update to 22.2.2 Resolves: rhbz#2109468 --- python-pip.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b3307f2..760c297 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.2 +%global base_version 22.2.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -189,6 +189,7 @@ BuildRequires: python%{python3_pkgversion}-virtualenv BuildRequires: python%{python3_pkgversion}-werkzeug BuildRequires: python%{python3_pkgversion}-pyyaml BuildRequires: python%{python3_pkgversion}-tomli-w +BuildRequires: python%{python3_pkgversion}-installer %endif BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates @@ -402,6 +403,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 +- Update to 22.2.2 +Resolves: rhbz#2109468 + * Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 - Update to 22.2 Resolves: rhbz#2109468 diff --git a/sources b/sources index 05a18a7..026b677 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.2.tar.gz) = 2ff3f9c2dc84c65c14c978e8c58cd3cee6cfff9753655c726763d6d7780d147479f32c47873d402ad9e0821fef940b971a7df93fabd6b998f07dea5af1251c9b +SHA512 (pip-22.2.2.tar.gz) = bd59e28b55475b77a8f11ea771cbad3b2602ff974e219f9a55288963a9522c9279a5b00fde40fb65cfebefae0e905d3da3c06fe50b402aa5326b25f70a98a015 From ca7bb6bb4834f26a3586521afa948efe4fa9f963 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 5 Sep 2022 16:01:11 +0200 Subject: [PATCH 204/287] Fix crash when an empty dist-info/egg-info is present Resolves: rhbz#2115001 --- bad-metadata-fix.patch | 92 ++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 11 ++++- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 bad-metadata-fix.patch diff --git a/bad-metadata-fix.patch b/bad-metadata-fix.patch new file mode 100644 index 0000000..740dc71 --- /dev/null +++ b/bad-metadata-fix.patch @@ -0,0 +1,92 @@ +From 6817fbfb1fd389ad61009f0199db5670b146c8d3 Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Sat, 6 Aug 2022 06:18:59 +0800 +Subject: [PATCH] Skip dist if metadata does not have a valid name + +--- + news/11352.bugfix.rst | 2 ++ + src/pip/_internal/metadata/importlib/_compat.py | 14 +++++++++++++- + src/pip/_internal/metadata/importlib/_envs.py | 14 +++++++++++--- + 3 files changed, 26 insertions(+), 4 deletions(-) + create mode 100644 news/11352.bugfix.rst + +diff --git a/news/11352.bugfix.rst b/news/11352.bugfix.rst +new file mode 100644 +index 00000000000..78016c912ef +--- /dev/null ++++ b/news/11352.bugfix.rst +@@ -0,0 +1,2 @@ ++Ignore distributions with invalid ``Name`` in metadata instead of crashing, when ++using the ``importlib.metadata`` backend. +diff --git a/src/pip/_internal/metadata/importlib/_compat.py b/src/pip/_internal/metadata/importlib/_compat.py +index e0879807ab9..593bff23ede 100644 +--- a/src/pip/_internal/metadata/importlib/_compat.py ++++ b/src/pip/_internal/metadata/importlib/_compat.py +@@ -2,6 +2,15 @@ + from typing import Any, Optional, Protocol, cast + + ++class BadMetadata(ValueError): ++ def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None: ++ self.dist = dist ++ self.reason = reason ++ ++ def __str__(self) -> str: ++ return f"Bad metadata in {self.dist} ({self.reason})" ++ ++ + class BasePath(Protocol): + """A protocol that various path objects conform. + +@@ -40,4 +49,7 @@ def get_dist_name(dist: importlib.metadata.Distribution) -> str: + The ``name`` attribute is only available in Python 3.10 or later. We are + targeting exactly that, but Mypy does not know this. + """ +- return cast(Any, dist).name ++ name = cast(Any, dist).name ++ if not isinstance(name, str): ++ raise BadMetadata(dist, reason="invalid metadata entry 'name'") ++ return name +diff --git a/src/pip/_internal/metadata/importlib/_envs.py b/src/pip/_internal/metadata/importlib/_envs.py +index d5fcfdbfef2..cbec59e2c6d 100644 +--- a/src/pip/_internal/metadata/importlib/_envs.py ++++ b/src/pip/_internal/metadata/importlib/_envs.py +@@ -1,5 +1,6 @@ + import functools + import importlib.metadata ++import logging + import os + import pathlib + import sys +@@ -14,9 +15,11 @@ + from pip._internal.utils.deprecation import deprecated + from pip._internal.utils.filetypes import WHEEL_EXTENSION + +-from ._compat import BasePath, get_dist_name, get_info_location ++from ._compat import BadMetadata, BasePath, get_dist_name, get_info_location + from ._dists import Distribution + ++logger = logging.getLogger(__name__) ++ + + def _looks_like_wheel(location: str) -> bool: + if not location.endswith(WHEEL_EXTENSION): +@@ -56,11 +59,16 @@ def _find_impl(self, location: str) -> Iterator[FoundResult]: + # To know exactly where we find a distribution, we have to feed in the + # paths one by one, instead of dumping the list to importlib.metadata. + for dist in importlib.metadata.distributions(path=[location]): +- normalized_name = canonicalize_name(get_dist_name(dist)) ++ info_location = get_info_location(dist) ++ try: ++ raw_name = get_dist_name(dist) ++ except BadMetadata as e: ++ logger.warning("Skipping %s due to %s", info_location, e.reason) ++ continue ++ normalized_name = canonicalize_name(raw_name) + if normalized_name in self._found_names: + continue + self._found_names.add(normalized_name) +- info_location = get_info_location(dist) + yield dist, info_location + + def find(self, location: str) -> Iterator[BaseDistribution]: diff --git a/python-pip.spec b/python-pip.spec index 760c297..5beca9a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -89,6 +89,11 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Ignore distributions with invalid name in metadata instead of crashing, when +# using the importlib.metadata backend. +# Resolved upstream: https://github.com/pypa/pip/pull/11353 +Patch: bad-metadata-fix.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -403,6 +408,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Sep 05 2022 Charalampos Stratakis - 22.2.2-2 +- Fix crash when an empty dist-info/egg-info is present +Resolves: rhbz#2115001 + * Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 - Update to 22.2.2 Resolves: rhbz#2109468 From a2dfa8738eef692a34a22cd3de5a24a197b706e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 Sep 2022 16:07:45 +0200 Subject: [PATCH 205/287] No longer use the rpm_install prefix to determine RPM-installed packages In https://src.fedoraproject.org/rpms/python3.11/c/d75ca77a64 the rpm_prefix scheme stopped being interesting. Instead, we make sure to properly set both {base} and {platbase} variables which was subtly wrong before. --- python-pip.spec | 10 +++++----- remove-existing-dist-only-if-path-conflicts.patch | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 5beca9a..1817621 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -214,10 +214,8 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# The python3.10 version that added the rpm_prefix sysconfig install scheme -# This pip can also function with the previous version, -# but it would remove RPM-installed packages during sudo pip install --upgrade. -Requires: python3-libs >= 3.10.0-2 +# The python3.11 version that stopped using the rpm_prefix scheme +Requires: python3-libs >= 3.11.0~rc1-2 %{crypt_compat_recommends 3} @@ -408,9 +406,11 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog -* Mon Sep 05 2022 Charalampos Stratakis - 22.2.2-2 +* Mon Sep 05 2022 Python Maint - 22.2.2-2 - Fix crash when an empty dist-info/egg-info is present Resolves: rhbz#2115001 +- No longer use the rpm_install prefix to determine RPM-installed packages +Related: rhbz#2026979 * Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 - Update to 22.2.2 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index d4497fd..3a9ea25 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -100,8 +100,8 @@ index a4c24b5..e7e2da9 100644 + # Prevent uninstalling packages from /usr + try: + if dist.installed_location in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('purelib', scheme='posix_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet From c3f04d6b6d3bbdf461769aa1521cba2d266687c5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 15 Nov 2022 12:56:41 +0100 Subject: [PATCH 206/287] Update to 22.3.1 --- bad-metadata-fix.patch | 92 ---------------------------- dummy-certifi.patch | 134 ++++++++++++++++++++++++++++++++++------- python-pip.spec | 46 ++++++-------- sources | 2 +- 4 files changed, 131 insertions(+), 143 deletions(-) delete mode 100644 bad-metadata-fix.patch diff --git a/bad-metadata-fix.patch b/bad-metadata-fix.patch deleted file mode 100644 index 740dc71..0000000 --- a/bad-metadata-fix.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 6817fbfb1fd389ad61009f0199db5670b146c8d3 Mon Sep 17 00:00:00 2001 -From: Tzu-ping Chung -Date: Sat, 6 Aug 2022 06:18:59 +0800 -Subject: [PATCH] Skip dist if metadata does not have a valid name - ---- - news/11352.bugfix.rst | 2 ++ - src/pip/_internal/metadata/importlib/_compat.py | 14 +++++++++++++- - src/pip/_internal/metadata/importlib/_envs.py | 14 +++++++++++--- - 3 files changed, 26 insertions(+), 4 deletions(-) - create mode 100644 news/11352.bugfix.rst - -diff --git a/news/11352.bugfix.rst b/news/11352.bugfix.rst -new file mode 100644 -index 00000000000..78016c912ef ---- /dev/null -+++ b/news/11352.bugfix.rst -@@ -0,0 +1,2 @@ -+Ignore distributions with invalid ``Name`` in metadata instead of crashing, when -+using the ``importlib.metadata`` backend. -diff --git a/src/pip/_internal/metadata/importlib/_compat.py b/src/pip/_internal/metadata/importlib/_compat.py -index e0879807ab9..593bff23ede 100644 ---- a/src/pip/_internal/metadata/importlib/_compat.py -+++ b/src/pip/_internal/metadata/importlib/_compat.py -@@ -2,6 +2,15 @@ - from typing import Any, Optional, Protocol, cast - - -+class BadMetadata(ValueError): -+ def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None: -+ self.dist = dist -+ self.reason = reason -+ -+ def __str__(self) -> str: -+ return f"Bad metadata in {self.dist} ({self.reason})" -+ -+ - class BasePath(Protocol): - """A protocol that various path objects conform. - -@@ -40,4 +49,7 @@ def get_dist_name(dist: importlib.metadata.Distribution) -> str: - The ``name`` attribute is only available in Python 3.10 or later. We are - targeting exactly that, but Mypy does not know this. - """ -- return cast(Any, dist).name -+ name = cast(Any, dist).name -+ if not isinstance(name, str): -+ raise BadMetadata(dist, reason="invalid metadata entry 'name'") -+ return name -diff --git a/src/pip/_internal/metadata/importlib/_envs.py b/src/pip/_internal/metadata/importlib/_envs.py -index d5fcfdbfef2..cbec59e2c6d 100644 ---- a/src/pip/_internal/metadata/importlib/_envs.py -+++ b/src/pip/_internal/metadata/importlib/_envs.py -@@ -1,5 +1,6 @@ - import functools - import importlib.metadata -+import logging - import os - import pathlib - import sys -@@ -14,9 +15,11 @@ - from pip._internal.utils.deprecation import deprecated - from pip._internal.utils.filetypes import WHEEL_EXTENSION - --from ._compat import BasePath, get_dist_name, get_info_location -+from ._compat import BadMetadata, BasePath, get_dist_name, get_info_location - from ._dists import Distribution - -+logger = logging.getLogger(__name__) -+ - - def _looks_like_wheel(location: str) -> bool: - if not location.endswith(WHEEL_EXTENSION): -@@ -56,11 +59,16 @@ def _find_impl(self, location: str) -> Iterator[FoundResult]: - # To know exactly where we find a distribution, we have to feed in the - # paths one by one, instead of dumping the list to importlib.metadata. - for dist in importlib.metadata.distributions(path=[location]): -- normalized_name = canonicalize_name(get_dist_name(dist)) -+ info_location = get_info_location(dist) -+ try: -+ raw_name = get_dist_name(dist) -+ except BadMetadata as e: -+ logger.warning("Skipping %s due to %s", info_location, e.reason) -+ continue -+ normalized_name = canonicalize_name(raw_name) - if normalized_name in self._found_names: - continue - self._found_names.add(normalized_name) -- info_location = get_info_location(dist) - yield dist, info_location - - def find(self, location: str) -> Iterator[BaseDistribution]: diff --git a/dummy-certifi.patch b/dummy-certifi.patch index a691cad..8896ce8 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,36 +1,128 @@ -From cacd6d2fa9a27b29415a4ce25d76406fe69fc398 Mon Sep 17 00:00:00 2001 +From 09c983fdeabe3fa0b90b73f32ddf84a61e498e09 Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Mon, 10 May 2021 16:38:50 +0200 +Date: Tue, 15 Nov 2022 09:22:46 +0100 Subject: [PATCH] Dummy certifi patch -Co-Authored-By: Tomas Hrnciar --- - src/pip/_vendor/certifi/core.py | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + src/pip/_vendor/certifi/core.py | 105 ++------------------------------ + 1 file changed, 6 insertions(+), 99 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index f34045b..a2ada08 100644 +index c3e5466..eb297f7 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): +@@ -4,105 +4,12 @@ certifi.py + This module returns the installation location of cacert.pem or its contents. + """ +-import sys - try: -+ raise ImportError # force fallback - # Return a certificate file on disk for a standalone pip zipapp running in - # an isolated build environment to use. Passing --cert to the standalone - # pip does not work since requests calls where() unconditionally on import. -@@ -75,9 +76,7 @@ except ImportError: - # If we don't have importlib.resources, then we will just do the old logic - # of assuming we're on the filesystem and munge the path directly. - def where() -> str: ++# The RPM-packaged certifi always uses the system certificates ++def where() -> str: ++ return '/etc/pki/tls/certs/ca-bundle.crt' + +-if sys.version_info >= (3, 11): ++def contents() -> str: ++ with open(where(), encoding='utf=8') as data: ++ return data.read() + +- from importlib.resources import as_file, files +- +- _CACERT_CTX = None +- _CACERT_PATH = None +- +- def where() -> str: +- # This is slightly terrible, but we want to delay extracting the file +- # in cases where we're inside of a zipimport situation until someone +- # actually calls where(), but we don't want to re-extract the file +- # on every call of where(), so we'll do it once then store it in a +- # global variable. +- global _CACERT_CTX +- global _CACERT_PATH +- if _CACERT_PATH is None: +- # This is slightly janky, the importlib.resources API wants you to +- # manage the cleanup of this file, so it doesn't actually return a +- # path, it returns a context manager that will give you the path +- # when you enter it and will do any cleanup when you leave it. In +- # the common case of not needing a temporary file, it will just +- # return the file system location and the __exit__() is a no-op. +- # +- # We also have to hold onto the actual context manager, because +- # it will do the cleanup whenever it gets garbage collected, so +- # we will also store that at the global level as well. +- _CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem")) +- _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- +- return _CACERT_PATH +- +- def contents() -> str: +- return files("pip._vendor.certifi").joinpath("cacert.pem").read_text(encoding="ascii") +- +-elif sys.version_info >= (3, 7): +- +- from importlib.resources import path as get_path, read_text +- +- _CACERT_CTX = None +- _CACERT_PATH = None +- +- def where() -> str: +- # This is slightly terrible, but we want to delay extracting the +- # file in cases where we're inside of a zipimport situation until +- # someone actually calls where(), but we don't want to re-extract +- # the file on every call of where(), so we'll do it once then store +- # it in a global variable. +- global _CACERT_CTX +- global _CACERT_PATH +- if _CACERT_PATH is None: +- # This is slightly janky, the importlib.resources API wants you +- # to manage the cleanup of this file, so it doesn't actually +- # return a path, it returns a context manager that will give +- # you the path when you enter it and will do any cleanup when +- # you leave it. In the common case of not needing a temporary +- # file, it will just return the file system location and the +- # __exit__() is a no-op. +- # +- # We also have to hold onto the actual context manager, because +- # it will do the cleanup whenever it gets garbage collected, so +- # we will also store that at the global level as well. +- _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem") +- _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- +- return _CACERT_PATH +- +- def contents() -> str: +- return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") +- +-else: +- import os +- import types +- from typing import Union +- +- Package = Union[types.ModuleType, str] +- Resource = Union[str, "os.PathLike"] +- +- # This fallback will work for Python versions prior to 3.7 that lack the +- # importlib.resources module but relies on the existing `where` function +- # so won't address issues with environments like PyOxidizer that don't set +- # __file__ on modules. +- def read_text( +- package: Package, +- resource: Resource, +- encoding: str = 'utf-8', +- errors: str = 'strict' +- ) -> str: +- with open(where(), encoding=encoding) as data: +- return data.read() +- +- # If we don't have importlib.resources, then we will just do the old logic +- # of assuming we're on the filesystem and munge the path directly. +- def where() -> str: - f = os.path.dirname(__file__) - - return os.path.join(f, "cacert.pem") -+ return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents() -> str: +- +- def contents() -> str: +- return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") -- -2.35.3 +2.37.3 diff --git a/python-pip.spec b/python-pip.spec index 1817621..dfdcfa4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.2.2 +%global base_version 22.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -77,6 +77,7 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 +# The same patch is a part of the RPM-packaged python-certifi Patch: dummy-certifi.patch # Don't warn the user about pip._internal.main() entrypoint @@ -89,11 +90,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Ignore distributions with invalid name in metadata instead of crashing, when -# using the importlib.metadata backend. -# Resolved upstream: https://github.com/pypa/pip/pull/11353 -Patch: bad-metadata-fix.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -130,27 +126,27 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2022.6.15 +Provides: bundled(python%{1}dist(certifi)) = 2022.9.24 Provides: bundled(python%{1}dist(chardet)) = 5 Provides: bundled(python%{1}dist(colorama)) = 0.4.5 -Provides: bundled(python%{1}dist(distlib)) = 0.3.5 +Provides: bundled(python%{1}dist(distlib)) = 0.3.6 Provides: bundled(python%{1}dist(distro)) = 1.7 -Provides: bundled(python%{1}dist(idna)) = 3.3 +Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(pep517)) = 0.12 +Provides: bundled(python%{1}dist(pep517)) = 0.13 Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 -Provides: bundled(python%{1}dist(pygments)) = 2.12 +Provides: bundled(python%{1}dist(pygments)) = 2.13 Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 Provides: bundled(python%{1}dist(requests)) = 2.28.1 Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 Provides: bundled(python%{1}dist(rich)) = 12.5.1 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 +Provides: bundled(python%{1}dist(tenacity)) = 8.1 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.3 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.10 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.12 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -351,26 +347,14 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} # Upstream tests # bash completion tests only work from installed package -# needs unaltered sys.path and we cannot do that in %%check -# test_pep517_and_build_options -# test_config_file_venv_option -# Incompatible with the latest virtualenv -# test_from_link_vcs_with_source_dir_obtains_commit_id -# test_from_link_vcs_without_source_dir -# test_should_cache_git_sha -pytest_k='not completion and - not test_pep517_and_build_options and - not test_config_file_venv_option and - not test_from_link_vcs_with_source_dir_obtains_commit_id and - not test_from_link_vcs_without_source_dir and - not test_should_cache_git_sha' +pytest_k='not completion' # --deselect'ed tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py + --deselect tests/functional --deselect tests/lib/test_lib.py %endif @@ -406,6 +390,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Nov 14 2022 Karolina Surma - 22.3.1-1 +- Update to 22.3.1 +Resolves: rhbz#2135044 + * Mon Sep 05 2022 Python Maint - 22.2.2-2 - Fix crash when an empty dist-info/egg-info is present Resolves: rhbz#2115001 diff --git a/sources b/sources index 026b677..ac6d676 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.2.2.tar.gz) = bd59e28b55475b77a8f11ea771cbad3b2602ff974e219f9a55288963a9522c9279a5b00fde40fb65cfebefae0e905d3da3c06fe50b402aa5326b25f70a98a015 +SHA512 (pip-22.3.1.tar.gz) = c7865c4ce79b0fea7ba469fe593af3be205b3bdb574a6ae019842e0f82a0af406ec905d8c6ff02fbbafe01630c8899a398d071ce74501ca830249160f2f6df98 From 25bc125898ba86f8ed5cc1179d2f64c1096c09f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 15 Nov 2022 15:22:33 +0100 Subject: [PATCH 207/287] CI: Add Python 3.12 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 8f0a5de..8278b55 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,6 +31,9 @@ - smoke311: dir: python/smoke run: VERSION=3.11 ./venv.sh + - smoke312: + dir: python/smoke + run: VERSION=3.12 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -55,6 +58,9 @@ - smoke311_virtualenv: dir: python/smoke run: VERSION=3.11 METHOD=virtualenv ./venv.sh + - smoke312_virtualenv: + dir: python/smoke + run: VERSION=3.12 METHOD=virtualenv ./venv.sh - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -80,6 +86,7 @@ - python3.9 - python3.10-devel - python3.11-devel + - python3.12-devel - python2-devel - python3-devel - python3-tox From a1e1c1dfc94168da1d9130179a86297c64a9488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 16 Nov 2022 13:46:12 +0100 Subject: [PATCH 208/287] Convert the License tag to SPDX --- python-pip.spec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index dfdcfa4..2e4fbfd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -28,33 +28,33 @@ Summary: A tool for installing and managing Python packages # Here is the list of the libraries with corresponding licenses: # appdirs: MIT -# certifi: MPLv2.0 -# chardet: LGPLv2 -# colorama: BSD -# CacheControl: ASL 2.0 -# distlib: Python -# distro: ASL 2.0 +# certifi: MPL-2.0 +# chardet: LGPL-2.1-only +# colorama: BSD-3-Clause +# CacheControl: Apache-2.0 +# distlib: Python-2.0.1 +# distro: Apache-2.0 # html5lib: MIT -# idna: BSD -# ipaddress: Python -# msgpack: ASL 2.0 -# packaging: ASL 2.0 or BSD +# idna: BSD-3-Clause +# ipaddress: Python-2.0.1 +# msgpack: Apache-2.0 +# packaging: Apache-2.0 OR BSD-2-Clause # pep517: MIT # progress: ISC -# pygments: BSD +# pygments: BSD-2-Clause # pyparsing: MIT -# requests: ASL 2.0 +# requests: Apache-2.0 # resolvelib: ISC # rich: MIT # setuptools: MIT # six: MIT -# tenacity: ASL 2.0 +# tenacity: Apache-2.0 # tomli: MIT -# typing-extensions: Python +# typing-extensions: Python-2.0.1 # urllib3: MIT -# webencodings: BSD +# webencodings: BSD-3-Clause -License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) +License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz From 6cbe3a846c02eb63a751e294a3a2c44cc93db864 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 15:40:55 +0000 Subject: [PATCH 209/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 2e4fbfd..08aedb1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -390,6 +390,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Nov 14 2022 Karolina Surma - 22.3.1-1 - Update to 22.3.1 Resolves: rhbz#2135044 From 7fdfa3a50a60f7f3a0a7bfdf3f084f44a3ec97dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Thu, 16 Feb 2023 10:02:00 +0100 Subject: [PATCH 210/287] Update to 23.0.1 --- python-pip.spec | 28 ++++++++++++++++------------ sources | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 08aedb1..bee4362 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.3.1 +%global base_version 23.0.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -39,10 +39,10 @@ Summary: A tool for installing and managing Python packages # ipaddress: Python-2.0.1 # msgpack: Apache-2.0 # packaging: Apache-2.0 OR BSD-2-Clause -# pep517: MIT # progress: ISC # pygments: BSD-2-Clause # pyparsing: MIT +# pyproject-hooks: MIT # requests: Apache-2.0 # resolvelib: ISC # rich: MIT @@ -126,27 +126,27 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2022.9.24 -Provides: bundled(python%{1}dist(chardet)) = 5 -Provides: bundled(python%{1}dist(colorama)) = 0.4.5 +Provides: bundled(python%{1}dist(certifi)) = 2022.12.7 +Provides: bundled(python%{1}dist(chardet)) = 5.1 +Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 -Provides: bundled(python%{1}dist(distro)) = 1.7 +Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(pep517)) = 0.13 -Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 +Provides: bundled(python%{1}dist(platformdirs)) = 2.6.2 Provides: bundled(python%{1}dist(pygments)) = 2.13 Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 -Provides: bundled(python%{1}dist(requests)) = 2.28.1 +Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 +Provides: bundled(python%{1}dist(requests)) = 2.28.2 Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 12.5.1 +Provides: bundled(python%{1}dist(rich)) = 12.6 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.1 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.12 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.14 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -390,6 +390,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 +- Update to 23.0.1 +Resolves: rhbz#2165760 + * Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index ac6d676..cde9066 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.3.1.tar.gz) = c7865c4ce79b0fea7ba469fe593af3be205b3bdb574a6ae019842e0f82a0af406ec905d8c6ff02fbbafe01630c8899a398d071ce74501ca830249160f2f6df98 +SHA512 (pip-23.0.1.tar.gz) = ed14ce37293e749b4fd93d7f93d81356c77428b1fb14dfd760b59aea720ebb3cce5a49c2d32ab600e73b37389937830ff4dee04750e83078c8ab9d57513f294c From 83fe8f1d738e48d98727d829d6243f445df7dc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 10 Feb 2023 17:38:34 +0100 Subject: [PATCH 211/287] Update the RHEL %bconds comment and style It is obvious to me now that this is not going to be removed, but will be reused for RHEL 10, 11, etc. The new %bcond syntax is nicer. --- python-pip.spec | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index bee4362..d6fb850 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,16 +1,9 @@ -# The original RHEL 9 content set is defined by (build)dependencies +# The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. -# Once the RHEL 9 content set is defined and/or RHEL 9 forks from ELN, -# the conditional can be removed from the Fedora spec file. # We intentionally keep this enabled on EPEL. -%if 0%{?rhel} >= 9 && !0%{?epel} -%bcond_with tests -%bcond_with doc -%else -%bcond_without tests -%bcond_without doc -%endif +%bcond tests %[%{defined fedora} || %{defined epel}] +%bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip %global base_version 23.0.1 From f657771b14d64d4348d3f6f349bd567c8ce1ee98 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 27 Mar 2023 10:54:18 +0200 Subject: [PATCH 212/287] Fix compatibility with Sphinx 6+ (fixes FTBFS) --- 11883.patch | 41 ++++++++++++++++++++++++++++++ 11904.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 10 +++++++- 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 11883.patch create mode 100644 11904.patch diff --git a/11883.patch b/11883.patch new file mode 100644 index 0000000..0bb3865 --- /dev/null +++ b/11883.patch @@ -0,0 +1,41 @@ +From 4944f6ff75e0a5e28d9719ae30dba03f196f2acf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 21 Mar 2023 16:42:09 +0100 +Subject: [PATCH] Make sphinx.ext.extlinks captions actual string templates + +In Sphinx 3, this used to be a prefix, but it is the full caption since Sphinx 4: + +https://github.com/sphinx-doc/sphinx/commit/fb39974486ab09320f0cf45f3c0ba0175f04d7d6 + +With Sphinx 6, captions without %s fail: + +https://github.com/sphinx-doc/sphinx/commit/ce31e1c0c7b32f6be93186e0fef076ef65ff0b05 + + Exception occurred: + File "/usr/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 103, in role + title = caption % part + ~~~~~~~~^~~~~~ + TypeError: not all arguments converted during string formatting + +Fixes Fedora downstream report: https://bugzilla.redhat.com/2180479 +--- + docs/html/conf.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/docs/html/conf.py b/docs/html/conf.py +index cc967e0ba3c..aae1364b87a 100644 +--- a/docs/html/conf.py ++++ b/docs/html/conf.py +@@ -74,9 +74,9 @@ + # -- Options for extlinks ------------------------------------------------------------- + + extlinks = { +- "issue": ("https://github.com/pypa/pip/issues/%s", "#"), +- "pull": ("https://github.com/pypa/pip/pull/%s", "PR #"), +- "pypi": ("https://pypi.org/project/%s/", ""), ++ "issue": ("https://github.com/pypa/pip/issues/%s", "#%s"), ++ "pull": ("https://github.com/pypa/pip/pull/%s", "PR #%s"), ++ "pypi": ("https://pypi.org/project/%s/", "%s"), + } + + # -- Options for towncrier_draft extension -------------------------------------------- diff --git a/11904.patch b/11904.patch new file mode 100644 index 0000000..e478f78 --- /dev/null +++ b/11904.patch @@ -0,0 +1,67 @@ +From 30a13bcaa7b0139c200458878a21e5467121fa34 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:49:35 +0100 +Subject: [PATCH 1/3] Add `--kep-going` to documentation build flags + +This ensures that all warnings are printed for Sphinx builds. +--- + noxfile.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/noxfile.py b/noxfile.py +index 5c4683b7d79..565a5039955 100644 +--- a/noxfile.py ++++ b/noxfile.py +@@ -133,6 +133,7 @@ def get_sphinx_build_command(kind: str) -> List[str]: + # fmt: off + return [ + "sphinx-build", ++ "--keep-going", + "-W", + "-c", "docs/html", # see note above + "-d", "docs/build/doctrees/" + kind, + +From 4fccbf0c74d252fd2301df397002c783ac6ad057 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:50:43 +0100 +Subject: [PATCH 2/3] Use a standard Sphinx document reference rather than + Markdown syntax + +This avoids providing too much information or using weird mechanics to +build across various MyST-Parser versions. +--- + docs/html/getting-started.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/html/getting-started.md b/docs/html/getting-started.md +index 0967b0eb99f..2b3f0bc9310 100644 +--- a/docs/html/getting-started.md ++++ b/docs/html/getting-started.md +@@ -98,5 +98,5 @@ Successfully uninstalled sampleproject + ## Next Steps + + It is recommended to learn about what virtual environments are and how to use +-them. This is covered in the ["Installing Packages"](pypug:tutorials/installing-packages) ++them. This is covered in the {doc}`Installing Packages ` + tutorial on packaging.python.org. + +From 6810341fd010d721541e87ba3125b275d0108c45 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:51:17 +0100 +Subject: [PATCH 3/3] Bump to Sphinx 6 + +This is the current latest version of Sphinx. +--- + docs/requirements.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/requirements.txt b/docs/requirements.txt +index fa3a7390c15..ef72c8fb722 100644 +--- a/docs/requirements.txt ++++ b/docs/requirements.txt +@@ -1,4 +1,4 @@ +-sphinx ~= 4.2, != 4.4.0 ++sphinx ~= 6.0 + towncrier + furo + myst_parser diff --git a/python-pip.spec b/python-pip.spec index d6fb850..37ce4dd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -83,6 +83,10 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Fix compatibility with Sphinx 6+, merged upstream +Patch: https://github.com/pypa/pip/pull/11883.patch +Patch: https://github.com/pypa/pip/pull/11904.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -383,6 +387,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 +- Fix compatibility with Sphinx 6+ +Resolves: rhbz#2180479 + * Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 - Update to 23.0.1 Resolves: rhbz#2165760 From a2d6e7ddd8b3e962d6047206024a954b27e14dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 19 May 2023 13:10:04 +0200 Subject: [PATCH 213/287] CI: Remove `pipenv --three` from tests It does no longer exist: Usage: pipenv [OPTIONS] COMMAND [ARGS]... Try 'pipenv -h' for help. Error: No such option: --three (Possible options: --bare, --help, --where) The `pipenv install` command will create the environment. See https://src.fedoraproject.org/rpms/pipenv/c/5591b2df503495b --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8278b55..8c7064b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -62,7 +62,7 @@ dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh - pipenv: - run: pipenv --three && pipenv install six + run: pipenv install six - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From 384163c9b7fef0eb69c99fe34a3d4370e886a08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 19 May 2023 12:45:12 +0200 Subject: [PATCH 214/287] Update to 23.1.2 --- 11883.patch | 41 ------------------------------ 11904.patch | 67 ------------------------------------------------- python-pip.spec | 30 +++++++++++----------- sources | 2 +- 4 files changed, 16 insertions(+), 124 deletions(-) delete mode 100644 11883.patch delete mode 100644 11904.patch diff --git a/11883.patch b/11883.patch deleted file mode 100644 index 0bb3865..0000000 --- a/11883.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4944f6ff75e0a5e28d9719ae30dba03f196f2acf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 21 Mar 2023 16:42:09 +0100 -Subject: [PATCH] Make sphinx.ext.extlinks captions actual string templates - -In Sphinx 3, this used to be a prefix, but it is the full caption since Sphinx 4: - -https://github.com/sphinx-doc/sphinx/commit/fb39974486ab09320f0cf45f3c0ba0175f04d7d6 - -With Sphinx 6, captions without %s fail: - -https://github.com/sphinx-doc/sphinx/commit/ce31e1c0c7b32f6be93186e0fef076ef65ff0b05 - - Exception occurred: - File "/usr/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 103, in role - title = caption % part - ~~~~~~~~^~~~~~ - TypeError: not all arguments converted during string formatting - -Fixes Fedora downstream report: https://bugzilla.redhat.com/2180479 ---- - docs/html/conf.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/docs/html/conf.py b/docs/html/conf.py -index cc967e0ba3c..aae1364b87a 100644 ---- a/docs/html/conf.py -+++ b/docs/html/conf.py -@@ -74,9 +74,9 @@ - # -- Options for extlinks ------------------------------------------------------------- - - extlinks = { -- "issue": ("https://github.com/pypa/pip/issues/%s", "#"), -- "pull": ("https://github.com/pypa/pip/pull/%s", "PR #"), -- "pypi": ("https://pypi.org/project/%s/", ""), -+ "issue": ("https://github.com/pypa/pip/issues/%s", "#%s"), -+ "pull": ("https://github.com/pypa/pip/pull/%s", "PR #%s"), -+ "pypi": ("https://pypi.org/project/%s/", "%s"), - } - - # -- Options for towncrier_draft extension -------------------------------------------- diff --git a/11904.patch b/11904.patch deleted file mode 100644 index e478f78..0000000 --- a/11904.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 30a13bcaa7b0139c200458878a21e5467121fa34 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:49:35 +0100 -Subject: [PATCH 1/3] Add `--kep-going` to documentation build flags - -This ensures that all warnings are printed for Sphinx builds. ---- - noxfile.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/noxfile.py b/noxfile.py -index 5c4683b7d79..565a5039955 100644 ---- a/noxfile.py -+++ b/noxfile.py -@@ -133,6 +133,7 @@ def get_sphinx_build_command(kind: str) -> List[str]: - # fmt: off - return [ - "sphinx-build", -+ "--keep-going", - "-W", - "-c", "docs/html", # see note above - "-d", "docs/build/doctrees/" + kind, - -From 4fccbf0c74d252fd2301df397002c783ac6ad057 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:50:43 +0100 -Subject: [PATCH 2/3] Use a standard Sphinx document reference rather than - Markdown syntax - -This avoids providing too much information or using weird mechanics to -build across various MyST-Parser versions. ---- - docs/html/getting-started.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/html/getting-started.md b/docs/html/getting-started.md -index 0967b0eb99f..2b3f0bc9310 100644 ---- a/docs/html/getting-started.md -+++ b/docs/html/getting-started.md -@@ -98,5 +98,5 @@ Successfully uninstalled sampleproject - ## Next Steps - - It is recommended to learn about what virtual environments are and how to use --them. This is covered in the ["Installing Packages"](pypug:tutorials/installing-packages) -+them. This is covered in the {doc}`Installing Packages ` - tutorial on packaging.python.org. - -From 6810341fd010d721541e87ba3125b275d0108c45 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:51:17 +0100 -Subject: [PATCH 3/3] Bump to Sphinx 6 - -This is the current latest version of Sphinx. ---- - docs/requirements.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/requirements.txt b/docs/requirements.txt -index fa3a7390c15..ef72c8fb722 100644 ---- a/docs/requirements.txt -+++ b/docs/requirements.txt -@@ -1,4 +1,4 @@ --sphinx ~= 4.2, != 4.4.0 -+sphinx ~= 6.0 - towncrier - furo - myst_parser diff --git a/python-pip.spec b/python-pip.spec index 37ce4dd..c87cb54 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.0.1 +%global base_version 23.1.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -83,10 +83,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Fix compatibility with Sphinx 6+, merged upstream -Patch: https://github.com/pypa/pip/pull/11883.patch -Patch: https://github.com/pypa/pip/pull/11904.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -129,21 +125,21 @@ Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 2.6.2 -Provides: bundled(python%{1}dist(pygments)) = 2.13 +Provides: bundled(python%{1}dist(platformdirs)) = 3.2 +Provides: bundled(python%{1}dist(pygments)) = 2.14 Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 Provides: bundled(python%{1}dist(requests)) = 2.28.2 -Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 12.6 -Provides: bundled(python%{1}dist(setuptools)) = 44 +Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 +Provides: bundled(python%{1}dist(rich)) = 13.3.3 +Provides: bundled(python%{1}dist(setuptools)) = 67.7.2 Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.1 +Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.14 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.5 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.15 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -387,6 +383,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri May 19 2023 Miro Hrončok - 23.1.2-1 +- Update to 23.1.2 +Resolves: rhbz#2186979 + * Mon Mar 27 2023 Karolina Surma - 23.0.1-2 - Fix compatibility with Sphinx 6+ Resolves: rhbz#2180479 diff --git a/sources b/sources index cde9066..e714ca8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.0.1.tar.gz) = ed14ce37293e749b4fd93d7f93d81356c77428b1fb14dfd760b59aea720ebb3cce5a49c2d32ab600e73b37389937830ff4dee04750e83078c8ab9d57513f294c +SHA512 (pip-23.1.2.tar.gz) = b33070cb59a1258904a60b48ec8abfd9e316c5f87681fea13d89ddf6d516afac10965ae1db54fea299a0a72f98602ce02e8b3be46f239e857db84866045730e1 From f58b7e613e2a7831b44acea93bfe9227dcec1f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 22 May 2023 13:34:03 +0200 Subject: [PATCH 215/287] Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt --- python-pip.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index c87cb54..c9f527b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -261,6 +261,10 @@ ln -s %{python_wheel_dir} tests/data/common_wheels rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' setup.py +# Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt +# https://github.com/pypa/pip/pull/12046 +%{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' + %build %py3_build_wheel From a378787915598a15289a97b55bb1ebeb141242b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 22 May 2023 11:55:02 +0200 Subject: [PATCH 216/287] Update rpmlintrc rules to match rpmlint 2 and the current pip We got: python3-pip.noarch: E: unused-rpmlintrc-filter "(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b" python3-pip.noarch: E: unused-rpmlintrc-filter "zero-length .+/site-packages/.+\.dist-info/REQUESTED\b" python3-pip.noarch: E: unused-rpmlintrc-filter "W: spelling-error .* venv" python3-pip.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/pip/_vendor/distro/distro.py 644 /usr/bin/env python --- python-pip.rpmlintrc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index 3a17d79..d32664b 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -1,15 +1,9 @@ # This is just temporary, when upstream merges PRs it can be removed -# https://github.com/ActiveState/appdirs/pull/144 # https://github.com/psf/requests/pull/5410 -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b') addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b') -# REQUESTED dist-info file is not meant to have any content -# Discussion: https://src.fedoraproject.org/rpms/python-pip/pull-request/69#comment-52525 -addFilter(r'zero-length .+/site-packages/.+\.dist-info/REQUESTED\b') +# This file is actually a script but in the vendored context of pip, it is never executed +addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') - -# SPELLING ERRORS -addFilter(r'W: spelling-error .* venv') From 558f1a0e2bff5c4b41390447591ece53c2502e7c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 16:40:50 +0200 Subject: [PATCH 217/287] Bootstrap for Python 3.12 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index c9f527b..478c39a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -14,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -387,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Jun 13 2023 Python Maint - 23.1.2-2 +- Bootstrap for Python 3.12 + * Fri May 19 2023 Miro Hrončok - 23.1.2-1 - Update to 23.1.2 Resolves: rhbz#2186979 From 8b06ef16f808db3a62ac4a305cea7447694ef45c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 20 Jul 2023 11:54:01 +0200 Subject: [PATCH 218/287] Rebuilt for Python 3.12 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 478c39a..6b29a15 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Thu Jul 20 2023 Python Maint - 23.1.2-3 +- Rebuilt for Python 3.12 + * Tue Jun 13 2023 Python Maint - 23.1.2-2 - Bootstrap for Python 3.12 From 72a236c147823e6f5cb6e84aace5d76584da9c4c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:17:32 +0000 Subject: [PATCH 219/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 6b29a15..cb31243 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jul 20 2023 Python Maint - 23.1.2-3 - Rebuilt for Python 3.12 From 3292de8e3b48866d7c6e16e1ab714351cb2e7d90 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 25 Jul 2023 12:10:44 +0200 Subject: [PATCH 220/287] Rebuilt for Python 3.12 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index cb31243..94b6713 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Jul 25 2023 Python Maint - 23.1.2-5 +- Rebuilt for Python 3.12 + * Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From e82cd73bd4ba80246d0c14b6542665abfc5477e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 26 Jul 2023 16:03:11 +0200 Subject: [PATCH 221/287] Drop no-longer-needed custom changes to /usr/bin/pip* pip >= 20 has a mechanism that replaces our pip-allow-different-versions.patch However, we kept our patch to support users doing e.g.: $ pip install --user --upgrade 'pip<20' However, pip 19.3.1 (the latest <20 version) does not even operate without distutils: (venv3.12)$ pip list Package Version ---------- ------- pip 22.3.1 setuptools 65.5.0 (venv3.12)$ pip install --upgrade 'pip<20' ... (venv3.12) $ pip list Traceback (most recent call last): File ".../venv3.12/bin/pip", line 5, in from pip._internal.main import main File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/main.py", line 13, in from pip._internal.cli.autocompletion import autocomplete File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/autocompletion.py", line 11, in from pip._internal.cli.main_parser import create_main_parser File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/main_parser.py", line 7, in from pip._internal.cli import cmdoptions File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/cmdoptions.py", line 19, in from distutils.util import strtobool ModuleNotFoundError: No module named 'distutils' Hence, it no longer makes any sense to keep the patch with Python 3.12. --- pip-allow-different-versions.patch | 27 ------------------------ python-pip.spec | 34 +++++------------------------- 2 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 pip-allow-different-versions.patch diff --git a/pip-allow-different-versions.patch b/pip-allow-different-versions.patch deleted file mode 100644 index 4a11517..0000000 --- a/pip-allow-different-versions.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- /usr/bin/pip3 2019-11-12 17:37:34.793131862 +0100 -+++ pip3 2019-11-12 17:40:42.014107134 +0100 -@@ -2,7 +2,23 @@ - # -*- coding: utf-8 -*- - import re - import sys --from pip._internal.cli.main import main -+ -+try: -+ from pip._internal.cli.main import main -+except ImportError: -+ try: -+ from pip._internal.main import main -+ except ImportError: -+ try: -+ # If the user has downgraded pip, the above import will fail. -+ # Let's try older methods of invoking it: -+ -+ # pip 19 uses this -+ from pip._internal import main -+ except ImportError: -+ # older pip versions use this -+ from pip import main -+ - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/python-pip.spec b/python-pip.spec index 94b6713..8cf5b31 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -85,29 +85,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Downstream only patch -# Users might have local installations of pip from using -# `pip install --user --upgrade pip` on older/newer versions. -# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. -# However that's the one from this RPM package and the import in there might -# fail (it tries to import from ~/.local, but older or newer pip is there with -# a bit different API). -# We add this patch as a dirty workaround to make /usr/bin/pip* work with -# both pip10+ (from this RPM) and older or newer (19.3+) pip (from whatever). -# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, -# however others are against that and we cannot change it for existing -# installs/user homes anyway. -# https://bugzilla.redhat.com/show_bug.cgi?id=1569488 -# https://bugzilla.redhat.com/show_bug.cgi?id=1571650 -# https://bugzilla.redhat.com/show_bug.cgi?id=1767212 -# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! -# %%patch10 doesn't work outside of %%prep, so we add it as a source -# Note that since pip 20, old main() import paths are preserved for backwards -# compatibility: https://github.com/pypa/pip/issues/7498 -# Meaning we don't need to update any of the older pips to support 20+ -# We also don't need to update Pythons to use new import path in ensurepip -Source10: pip-allow-different-versions.patch - %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -309,11 +286,6 @@ done popd %endif -# before we ln -s anything, we apply Source10 patch to all pips: -for PIP in %{buildroot}%{_bindir}/pip*; do - patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} -done - mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ @@ -389,6 +361,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 +- Drop no-longer-needed custom changes to /usr/bin/pip* +Resolves: rhbz#2150373 + * Tue Jul 25 2023 Python Maint - 23.1.2-5 - Rebuilt for Python 3.12 From 960d5f25daa752e99ca479c3066dcf204649a2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 2 Aug 2023 22:42:14 +0200 Subject: [PATCH 222/287] Drop a pinned dependency only relevant with early Python 3.11 --- python-pip.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 8cf5b31..aa6a966 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -182,9 +182,6 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# The python3.11 version that stopped using the rpm_prefix scheme -Requires: python3-libs >= 3.11.0~rc1-2 - %{crypt_compat_recommends 3} From da117b531686c73ecfcb7e2a2dec0bcc4c59e985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 2 Aug 2023 22:47:04 +0200 Subject: [PATCH 223/287] Stop Recommending libcrypt.so.1 on Python 3.12+ See https://discuss.python.org/t/29455/ --- python-pip.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index aa6a966..9fe9cfd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -133,6 +133,9 @@ Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 # a long time until manylinux1 is phased out). # See: https://github.com/pypa/manylinux/issues/305 # Note that manylinux is only applicable to x86 (both 32 and 64 bits) +# As of Python 3.12, we no longer use this, +# see https://discuss.python.org/t/29455/ +# However, we keep it around for previous Python versions that use the wheel package. %global crypt_compat_recommends() %{expand: Recommends: (libcrypt.so.1()(64bit) if python%{1}(x86-64)) Recommends: (libcrypt.so.1 if python%{1}(x86-32)) @@ -182,9 +185,6 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} - -%{crypt_compat_recommends 3} - %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -212,7 +212,12 @@ Requires: ca-certificates # Virtual provides for the packages bundled by pip: %{bundled 3} -%{crypt_compat_recommends 3} +# This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels +%{crypt_compat_recommends 3.11} +%{crypt_compat_recommends 3.10} +%{crypt_compat_recommends 3.9} +%{crypt_compat_recommends 3.8} +%{crypt_compat_recommends 3.7} %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. @@ -360,6 +365,7 @@ pytest_k='not completion' %changelog * Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 - Drop no-longer-needed custom changes to /usr/bin/pip* +- Stop Recommending libcrypt.so.1 on Python 3.12+ Resolves: rhbz#2150373 * Tue Jul 25 2023 Python Maint - 23.1.2-5 From 432aea6d5c17187d627265f38b3baa331642ebdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Aug 2023 18:09:17 +0200 Subject: [PATCH 224/287] Remove leftovers from Python 3.12 bootstrap --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 9fe9cfd..9ce8462 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -16,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -363,6 +361,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 +- Actually run the tests and build the docs when building this package + * Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 - Drop no-longer-needed custom changes to /usr/bin/pip* - Stop Recommending libcrypt.so.1 on Python 3.12+ From fb213c6f74c1894448184d22ccc867538dd97709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Aug 2023 21:33:37 +0200 Subject: [PATCH 225/287] Update to 23.2.1 --- python-pip.spec | 26 +++++++++++++++----------- sources | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 9ce8462..fb0e399 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.1.2 +%global base_version 23.2.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 7%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -96,7 +96,7 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2022.12.7 +Provides: bundled(python%{1}dist(certifi)) = 2023.5.7 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 @@ -104,19 +104,19 @@ Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 3.2 -Provides: bundled(python%{1}dist(pygments)) = 2.14 -Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 +Provides: bundled(python%{1}dist(platformdirs)) = 3.8.1 +Provides: bundled(python%{1}dist(pygments)) = 2.15.1 +Provides: bundled(python%{1}dist(pyparsing)) = 3.1 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 -Provides: bundled(python%{1}dist(requests)) = 2.28.2 +Provides: bundled(python%{1}dist(requests)) = 2.31 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 67.7.2 +Provides: bundled(python%{1}dist(rich)) = 13.4.2 +Provides: bundled(python%{1}dist(setuptools)) = 68 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.5 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.15 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.16 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -361,6 +361,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 +- Update to 23.2.1 +Resolves: rhbz#2223082 + * Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 - Actually run the tests and build the docs when building this package diff --git a/sources b/sources index e714ca8..428ed9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.1.2.tar.gz) = b33070cb59a1258904a60b48ec8abfd9e316c5f87681fea13d89ddf6d516afac10965ae1db54fea299a0a72f98602ce02e8b3be46f239e857db84866045730e1 +SHA512 (pip-23.2.1.tar.gz) = a6c629976c332cffe5dff0ec1e201d694c7a42fa8def202ebf1db251a6dbd90091eaac89c36a354a0cf0c60cdb267b4e0ec9ff6a88b0ac61cfaafdf159e34fc8 From be83e98e05c47c01435e3e514d6a566c17684471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 14:13:36 +0200 Subject: [PATCH 226/287] When built without tests, run a smoke test and bundled() Provides verification --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index fb0e399..b02777c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -311,11 +311,16 @@ mkdir -p %{buildroot}%{python_wheel_dir} install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} -%if %{with tests} %check # Verify bundled provides are up to date %{_rpmconfigdir}/pythonbundles.py src/pip/_vendor/vendor.txt --compare-with '%{bundled 3}' +# Verify we can at least run basic commands without crashing +%{py3_test_envvars} %{buildroot}%{_bindir}/pip --help +%{py3_test_envvars} %{buildroot}%{_bindir}/pip list +%{py3_test_envvars} %{buildroot}%{_bindir}/pip show pip + +%if %{with tests} # Upstream tests # bash completion tests only work from installed package pytest_k='not completion' From e03098bace92ef6cb31e5ecf0594cb043e9d8f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 14:17:07 +0200 Subject: [PATCH 227/287] Don't generate conditional Recommends when the wheel is built for a single Python version --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index b02777c..3e7dce8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -211,11 +211,14 @@ Requires: ca-certificates %{bundled 3} # This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels +# It is also only relevant when this wheel is shared across multiple Pythons +%if "%{python_wheel_pkg_prefix}" == "python" %{crypt_compat_recommends 3.11} %{crypt_compat_recommends 3.10} %{crypt_compat_recommends 3.9} %{crypt_compat_recommends 3.8} %{crypt_compat_recommends 3.7} +%endif %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. From 6648d06bdf42719d2b6c55a1490d8b02028b91a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 15:20:12 +0200 Subject: [PATCH 228/287] CI: Make Python 3.7 tests optional Python 3.7 has been retired from Fedora 40+: https://fedoraproject.org/wiki/Changes/RetirePython3.7 --- tests/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8c7064b..76f0da1 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -18,7 +18,7 @@ run: VERSION=3.6 ./venv.sh - smoke37: dir: python/smoke - run: VERSION=3.7 ./venv.sh + run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh @@ -45,7 +45,7 @@ run: VERSION=3.6 METHOD=virtualenv ./venv.sh - smoke37_virtualenv: dir: python/smoke - run: VERSION=3.7 METHOD=virtualenv ./venv.sh + run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh @@ -81,7 +81,6 @@ - virtualenv - python2.7 - python3.6 - - python3.7 - python3.8 - python3.9 - python3.10-devel From 0cc15183972bd9db3c6049e6b27964702b48a0b7 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 16 Nov 2023 16:24:11 +0100 Subject: [PATCH 229/287] Update to 23.3.1 --- python-pip.spec | 14 ++++++++++---- sources | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 3e7dce8..06d7c0e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.2.1 +%global base_version 23.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -42,6 +42,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # six: MIT # tenacity: Apache-2.0 +# truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT @@ -95,8 +96,8 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2023.5.7 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 +Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 @@ -114,9 +115,10 @@ Provides: bundled(python%{1}dist(rich)) = 13.4.2 Provides: bundled(python%{1}dist(setuptools)) = 68 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 +Provides: bundled(python%{1}dist(truststore)) = 0.8 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.16 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.17 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -369,6 +371,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 +- Update to 23.3.1 +Resolves: rhbz#2244306 + * Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 - Update to 23.2.1 Resolves: rhbz#2223082 diff --git a/sources b/sources index 428ed9f..8aba295 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.2.1.tar.gz) = a6c629976c332cffe5dff0ec1e201d694c7a42fa8def202ebf1db251a6dbd90091eaac89c36a354a0cf0c60cdb267b4e0ec9ff6a88b0ac61cfaafdf159e34fc8 +SHA512 (pip-23.3.1.tar.gz) = eddca29e8c3727d1d8d793ab0b05f069781cac06df805fcf7a363da738d39498135ccbbb6d2d442604a7bf78ba6c3d101ec2043431ac1832a3f2710db7cc5e56 From b9cefb7bc1c5b9501a2ca3ab8596062389eafd04 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 3 Jan 2024 18:40:48 +0000 Subject: [PATCH 230/287] Remove weak dependency on python3-setuptools Now that pip defaults to building in an isolated environment, there's no reason to pull in the python3-setuptools package. --- python-pip.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 06d7c0e..b575a09 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -171,14 +171,6 @@ BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates Requires: ca-certificates -# This was previously required and we keep it recommended because a lot of -# sdists installed via pip will try to import setuptools. -# But pip doesn't actually require setuptools. -# It can install wheels without them and it can build wheels in isolation mode -# (using setuptools/flit/poetry/... installed from PyPI). -# Side note: pip bundles pkg_resources from setuptools for internal usage. -Recommends: python%{python3_pkgversion}-setuptools - # Virtual provides for the packages bundled by pip: %{bundled 3} @@ -371,6 +363,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Jan 03 2024 Maxwell G - 23.3.1-2 +- Remove weak dependency on python3-setuptools + * Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 - Update to 23.3.1 Resolves: rhbz#2244306 From e286eac28b91839a9f17c95bcc6935e5acdef2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 3 Jan 2024 20:07:48 +0100 Subject: [PATCH 231/287] CI: Remove pipenv test, pipenv was retired from Rawhide https://src.fedoraproject.org/rpms/pipenv/c/892789a4d91e00f80f7ebc2a187d51038b7b5223 --- tests/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 76f0da1..51248e2 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -61,8 +61,6 @@ - smoke312_virtualenv: dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh - - pipenv: - run: pipenv install six - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -89,7 +87,6 @@ - python2-devel - python3-devel - python3-tox - - pipenv - mock - rpmdevtools - rpm-build From 26b3caa9259fd3bb53c6f4ab290ca816fe54f2eb Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 12 Jan 2024 23:12:02 +0000 Subject: [PATCH 232/287] Remove unused python3-mock dependency --- python-pip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b575a09..7c0305b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -156,7 +156,6 @@ BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if %{with tests} BuildRequires: python%{python3_pkgversion}-cryptography -BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-freezegun @@ -363,6 +362,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jan 12 2024 Maxwell G - 23.3.1-3 +- Remove unused python3-mock dependency + * Wed Jan 03 2024 Maxwell G - 23.3.1-2 - Remove weak dependency on python3-setuptools From 2a7f38350182342b01c8568b0cc5ab6924067549 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 04:56:31 +0000 Subject: [PATCH 233/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 7c0305b..f8ba025 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -362,6 +362,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 12 2024 Maxwell G - 23.3.1-3 - Remove unused python3-mock dependency From 9cd97d13383e51a9e9cdc7149f64c133ee0b3209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 13 Jan 2024 12:45:25 +0100 Subject: [PATCH 234/287] Generate test BuildRequires --- python-pip.spec | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f8ba025..606cab6 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -153,20 +153,8 @@ BuildRequires: python%{python3_pkgversion}-devel # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: bash-completion -%if %{with tests} -BuildRequires: python%{python3_pkgversion}-cryptography -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-pretend -BuildRequires: python%{python3_pkgversion}-freezegun -BuildRequires: python%{python3_pkgversion}-scripttest -BuildRequires: python%{python3_pkgversion}-virtualenv -BuildRequires: python%{python3_pkgversion}-werkzeug -BuildRequires: python%{python3_pkgversion}-pyyaml -BuildRequires: python%{python3_pkgversion}-tomli-w -BuildRequires: python%{python3_pkgversion}-installer -%endif BuildRequires: python%{python3_pkgversion}-wheel +BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates @@ -240,6 +228,18 @@ sed -i '/\.exe/d' setup.py # https://github.com/pypa/pip/pull/12046 %{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' +# Remove unused test requirements +sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt + + +%if %{with tests} +%generate_buildrequires +# we only use this to generate test requires +# the "pyproject" part is explicitly disabled as it generates a requirement on pip +%pyproject_buildrequires -N tests/requirements.txt +%endif + + %build %py3_build_wheel @@ -362,6 +362,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 +- Switched to autogenerated BuildRequires for test dependencies, + which removed some that were no longer necessary + * Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From bd7e7a076a2afc11670b2bb1e1d55ecd238ac2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:47:58 +0100 Subject: [PATCH 235/287] Replace custom %{bashcompdir} macro with %{bash_completions_dir} $ pkg-config --variable=completionsdir bash-completion /usr/share/bash-completion/completions $ rpm --eval '%{bash_completions_dir}' /usr/share/bash-completion/completions --- python-pip.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 606cab6..8c5b05d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -10,8 +10,6 @@ %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl -%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) - Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} Release: 5%{?dist} @@ -282,15 +280,15 @@ done popd %endif -mkdir -p %{buildroot}%{bashcompdir} +mkdir -p %{buildroot}%{bash_completions_dir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bashcompdir}/pip3 + > %{buildroot}%{bash_completions_dir}/pip3 # Make bash completion apply to all the 5 symlinks we install sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bashcompdir}/pip3 + %{buildroot}%{bash_completions_dir}/pip3 # Provide symlinks to executables to comply with Fedora guidelines for Python @@ -345,8 +343,8 @@ pytest_k='not completion' %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* -%dir %{bashcompdir} -%{bashcompdir}/pip3 +%dir %{bash_completions_dir} +%{bash_completions_dir}/pip3 %if %{with doc} %files doc From b582198d1c36def4a4b3e586553952840387e634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:43:16 +0100 Subject: [PATCH 236/287] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 496 +++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 500 +----------------------------------------------- 2 files changed, 498 insertions(+), 498 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..f16cb91 --- /dev/null +++ b/changelog @@ -0,0 +1,496 @@ +* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 +- Switched to autogenerated BuildRequires for test dependencies, + which removed some that were no longer necessary + +* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 12 2024 Maxwell G - 23.3.1-3 +- Remove unused python3-mock dependency + +* Wed Jan 03 2024 Maxwell G - 23.3.1-2 +- Remove weak dependency on python3-setuptools + +* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 +- Update to 23.3.1 +Resolves: rhbz#2244306 + +* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 +- Update to 23.2.1 +Resolves: rhbz#2223082 + +* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 +- Actually run the tests and build the docs when building this package + +* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 +- Drop no-longer-needed custom changes to /usr/bin/pip* +- Stop Recommending libcrypt.so.1 on Python 3.12+ +Resolves: rhbz#2150373 + +* Tue Jul 25 2023 Python Maint - 23.1.2-5 +- Rebuilt for Python 3.12 + +* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jul 20 2023 Python Maint - 23.1.2-3 +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint - 23.1.2-2 +- Bootstrap for Python 3.12 + +* Fri May 19 2023 Miro Hrončok - 23.1.2-1 +- Update to 23.1.2 +Resolves: rhbz#2186979 + +* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 +- Fix compatibility with Sphinx 6+ +Resolves: rhbz#2180479 + +* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 +- Update to 23.0.1 +Resolves: rhbz#2165760 + +* Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Nov 14 2022 Karolina Surma - 22.3.1-1 +- Update to 22.3.1 +Resolves: rhbz#2135044 + +* Mon Sep 05 2022 Python Maint - 22.2.2-2 +- Fix crash when an empty dist-info/egg-info is present +Resolves: rhbz#2115001 +- No longer use the rpm_install prefix to determine RPM-installed packages +Related: rhbz#2026979 + +* Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 +- Update to 22.2.2 +Resolves: rhbz#2109468 + +* Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 +- Update to 22.2 +Resolves: rhbz#2109468 + +* Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jun 15 2022 Python Maint - 22.0.4-4 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 22.0.4-3 +- Bootstrap for Python 3.11 + +* Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 +- Fallback to pep517 if setup.py is present and setuptools cannot be imported +- Fixes: rhbz#2020635 + +* Mon Mar 21 2022 Karolina Surma - 22.0.4-1 +- Update to 22.0.4 +Resolves: rhbz#2061262 + +* Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 +- Update to 22.0.3 +Resolves: rhbz#2048243 + +* Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 +- Update to 21.3.1 +- Resolves: rhbz#2016682 + +* Wed Oct 13 2021 Miro Hrončok - 21.3-1 +- Update to 21.3 +- Resolves: rhbz#2013026 +- Fix incomplete pip-updates in virtual environments + +* Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 +- Remove bundled windows executables +- Resolves: rhbz#2005453 + +* Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 +- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme + +* Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 +- Fix broken uninstallation by a bogus downstream patch + +* Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 +- Update to 21.2.3 +- Resolves: rhbz#1985635 + +* Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 +- Update to 21.1.3 +Resolves: rhbz#1976449 + +* Mon Jun 07 2021 Karolina Surma - 21.1.2-1 +- Update to 21.1.2 +Resolves: rhbz#1963433 + +* Fri Jun 04 2021 Python Maint - 21.1.1-3 +- Rebuilt for Python 3.10 + +* Tue Jun 01 2021 Python Maint - 21.1.1-2 +- Bootstrap for Python 3.10 + +* Mon May 10 2021 Karolina Surma - 21.1.1-1 +- Update to 21.1.1 + +* Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 +- python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 + (The wheel is Python 3 only for a while) + +* Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 +- Update to 21.0.1 +Resolves: rhbz#1922592 + +* Tue Jan 26 2021 Lumír Balhar - 21.0-1 +- Update to 21.0 (#1919530) + +* Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 +- Update to 20.3.3 + +* Mon Nov 30 2020 Miro Hrončok - 20.3-1 +- Update to 20.3 +- Add support for PEP 600: Future manylinux Platform Tags +- New resolver +- Fixes: rhbz#1893470 + +* Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 +- Update to 20.2.4 (#1889112) + +* Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 +- Update to 20.2.2 (#1838553) + +* Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 +- Do not emit a warning about root privileges when --root is used + +* Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 +- Update bundled provides to match 20.1.1 + +* Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 +- Deselect tests incompatible with the latest virtualenv + +* Sun May 24 2020 Miro Hrončok - 20.1.1-3 +- Rebuilt for Python 3.9 + +* Thu May 21 2020 Miro Hrončok - 20.1.1-2 +- Bootstrap for Python 3.9 + +* Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 +- Update to 20.1.1 + +* Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 +- Update to 20.1 + +* Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 +- Update to 20.1~b1 + +* Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 +- Only recommend setuptools, don't require them + +* Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 +- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) + +* Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 +- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip + +* Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 +- Update to 20.0.2 (#1793456) + +* Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 +- Update to 19.3.1 (#1761508) +- Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions + +* Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 +- Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) + +* Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 +- Update to 19.2.3 (#1742230) +- Drop patch that should strip path prefixes from RECORD files, the paths are relative + +* Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 +- Remove python2-pip +- Make pip bootstrap itself, rather than with an extra bootstrap RPM build + +* Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 +- Rebuilt for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 +- Bootstrap for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 +- Bootstrap for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 +- Recommend libcrypt.so.1 for manylinux1 compatibility +- Make /usr/bin/pip Python 3 + +* Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 +- Fix root warning when pip is invoked via python -m pip +- Remove a redundant second WARNING prefix form the abovementioned warning + +* Wed May 15 2019 Miro Hrončok - 19.1.1-1 +- Update to 19.1.1 (#1706995) + +* Thu Apr 25 2019 Miro Hrončok - 19.1-1 +- Update to 19.1 (#1702525) + +* Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 +- Update to 19.0.3 (#1679277) + +* Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 +- Update to 19.0.2 (#1668492) + +* Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Dec 03 2018 Miro Hrončok - 18.1-2 +- Use the system level root certificate instead of the one bundled in certifi + +* Thu Nov 22 2018 Miro Hrončok - 18.1-1 +- Update to 18.1 (#1652089) + +* Tue Sep 18 2018 Victor Stinner - 18.0-4 +- Prevent removing of the system packages installed under /usr/lib + when pip install -U is executed. Original patch by Michal Cyprian. + Resolves: rhbz#1550368. + +* Wed Aug 08 2018 Miro Hrončok - 18.0-3 +- Create python-pip-wheel package with the wheel + +* Tue Jul 31 2018 Miro Hrončok - 18.0-2 +- Remove redundant "Unicode" from License + +* Mon Jul 23 2018 Marcel Plch - 18.0-7 +- Update to 18.0 + +* Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 +- Bootstrap for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 +- Bootstrap for Python 3.7 + +* Fri May 04 2018 Miro Hrončok - 9.0.3-2 +- Allow to import pip10's main from pip9's /usr/bin/pip +- Do not show the "new version of pip" warning outside of venv +Resolves: rhbz#1569488 +Resolves: rhbz#1571650 +Resolves: rhbz#1573755 + +* Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 +- Update to 9.0.3 + +* Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 +- Include built HTML documentation (in the new -doc subpackage) and man page + +* Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 +- Reintroduce the ipaddress module in the python3 subpackage. + +* Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 +- Add virtual provides for the bundled libraries. (rhbz#1096912) + +* Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 +- Switch macros to bcond's and make Python 2 optional to facilitate building + the Python 2 and Python 3 modules + +* Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue May 23 2017 Tomas Orsava - 9.0.1-10 +- Modernized package descriptions +Resolves: rhbz#1452568 + +* Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 +- Fix typo in the sudo pip warning + +* Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 +- Patch 1 update: No sudo pip warning in venv or virtualenv + +* Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 +- Patch 1 update: Customize the warning with the proper version of the pip + command + +* Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 +- Added patch 1: Emit a warning when running with root privileges + +* Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 +- Provide symlinks to executables to comply with Fedora guidelines for Python +Resolves: rhbz#1406922 + +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 +- Rebuild for Python 3.6 with wheel + +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 +- Rebuild for Python 3.6 without wheel + +* Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 +- Update to 9.0.1 + +* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 +- Enable EPEL Python 3 builds +- Use new python macros +- Cleanup spec + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 +- Updated the test sources + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 +- Moved python-pip into the python2-pip subpackage +- Added the python_provide macro + +* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 17 2016 Tomas Orsava - 8.1.2-1 +- Update to 8.1.2 +- Moved to a new PyPI URL format +- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py + +* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 +- Update to 8.0.2 + +* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 +- Rebuilt for Python3.5 rebuild +- With wheel set to 1 + +* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 +- Rebuilt for Python3.5 rebuild + +* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 +- Update to 7.1.0 + +* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 +- Install bash completion +- Ship LICENSE.txt as %%license where available + +* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 +- Update to 7.0.3 + +* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 +- Update to 6.0.8 + +* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 +- Only enable tests on Fedora. + +* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 +- Add tests +- Add patch skipping tests requiring Internet access + +* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 +- Added patch for local dos with predictable temp dictionary names + (http://seclists.org/oss-sec/2014/q4/655) + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 +- Update to 1.5.6 + +* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 +- Rebuild as wheel for Python 3.4 + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 +- Disable build_wheel + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 +- Rebuild as wheel for Python 3.4 + +* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 +- Updated to 1.5.4 + +* Mon Oct 14 2013 Tim Flink - 1.4.1-1 +- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release +- Updated version to 1.4.1 + +* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 +- Fix for CVE 2013-2099 + +* Thu May 23 2013 Tim Flink - 1.3.1-3 +- undo python2 executable rename to python-pip. fixes #958377 +- fix summary to match upstream + +* Mon May 06 2013 Kevin Kofler - 1.3.1-2 +- Fix main package Summary, it's for Python 2, not 3 (#877401) + +* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 +- Update to 1.3.1, fix for CVE-2013-1888. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 09 2012 Tim Flink - 1.2.1-2 +- Fixing files for python3-pip + +* Thu Oct 04 2012 Tim Flink - 1.2.1-1 +- Update to upstream 1.2.1 +- Change binary from pip-python to python-pip (RHBZ#855495) +- Add alias from python-pip to pip-python, to be removed at a later date + +* Tue May 15 2012 Tim Flink - 1.1.0-1 +- Update to upstream 1.1.0 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sat Oct 22 2011 Tim Flink - 1.0.2-1 +- update to 1.0.2 and added python3 subpackage + +* Wed Jun 22 2011 Tim Flink - 0.8.3-1 +- update to 0.8.3 and project home page + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Luke Macken - 0.8.2-1 +- update to 0.8.2 of pip +* Mon Aug 30 2010 Peter Halliday - 0.8-1 +- update to 0.8 of pip +* Thu Jul 22 2010 David Malcolm - 0.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 +- update to 0.7.2 of pip +* Sun May 23 2010 Peter Halliday - 0.7.1-1 +- update to 0.7.1 of pip +* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 +- fix dependency issue +* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 +- fix spec file +* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 +- upgrade to 0.6.1 of pip +* Mon Aug 31 2009 Peter Halliday - 0.4-1 +- Initial package diff --git a/python-pip.spec b/python-pip.spec index 8c5b05d..e709a0e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -12,7 +12,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: %autorelease Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -360,500 +360,4 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog -* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 -- Switched to autogenerated BuildRequires for test dependencies, - which removed some that were no longer necessary - -* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 12 2024 Maxwell G - 23.3.1-3 -- Remove unused python3-mock dependency - -* Wed Jan 03 2024 Maxwell G - 23.3.1-2 -- Remove weak dependency on python3-setuptools - -* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 -- Update to 23.3.1 -Resolves: rhbz#2244306 - -* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 -- Update to 23.2.1 -Resolves: rhbz#2223082 - -* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 -- Actually run the tests and build the docs when building this package - -* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 -- Drop no-longer-needed custom changes to /usr/bin/pip* -- Stop Recommending libcrypt.so.1 on Python 3.12+ -Resolves: rhbz#2150373 - -* Tue Jul 25 2023 Python Maint - 23.1.2-5 -- Rebuilt for Python 3.12 - -* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jul 20 2023 Python Maint - 23.1.2-3 -- Rebuilt for Python 3.12 - -* Tue Jun 13 2023 Python Maint - 23.1.2-2 -- Bootstrap for Python 3.12 - -* Fri May 19 2023 Miro Hrončok - 23.1.2-1 -- Update to 23.1.2 -Resolves: rhbz#2186979 - -* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 -- Fix compatibility with Sphinx 6+ -Resolves: rhbz#2180479 - -* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 -- Update to 23.0.1 -Resolves: rhbz#2165760 - -* Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Nov 14 2022 Karolina Surma - 22.3.1-1 -- Update to 22.3.1 -Resolves: rhbz#2135044 - -* Mon Sep 05 2022 Python Maint - 22.2.2-2 -- Fix crash when an empty dist-info/egg-info is present -Resolves: rhbz#2115001 -- No longer use the rpm_install prefix to determine RPM-installed packages -Related: rhbz#2026979 - -* Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 -- Update to 22.2.2 -Resolves: rhbz#2109468 - -* Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 -- Update to 22.2 -Resolves: rhbz#2109468 - -* Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 15 2022 Python Maint - 22.0.4-4 -- Rebuilt for Python 3.11 - -* Mon Jun 13 2022 Python Maint - 22.0.4-3 -- Bootstrap for Python 3.11 - -* Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 -- Fallback to pep517 if setup.py is present and setuptools cannot be imported -- Fixes: rhbz#2020635 - -* Mon Mar 21 2022 Karolina Surma - 22.0.4-1 -- Update to 22.0.4 -Resolves: rhbz#2061262 - -* Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 -- Update to 22.0.3 -Resolves: rhbz#2048243 - -* Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 -- Update to 21.3.1 -- Resolves: rhbz#2016682 - -* Wed Oct 13 2021 Miro Hrončok - 21.3-1 -- Update to 21.3 -- Resolves: rhbz#2013026 -- Fix incomplete pip-updates in virtual environments - -* Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 -- Remove bundled windows executables -- Resolves: rhbz#2005453 - -* Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 -- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme - -* Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 -- Fix broken uninstallation by a bogus downstream patch - -* Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 -- Update to 21.2.3 -- Resolves: rhbz#1985635 - -* Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 -- Update to 21.1.3 -Resolves: rhbz#1976449 - -* Mon Jun 07 2021 Karolina Surma - 21.1.2-1 -- Update to 21.1.2 -Resolves: rhbz#1963433 - -* Fri Jun 04 2021 Python Maint - 21.1.1-3 -- Rebuilt for Python 3.10 - -* Tue Jun 01 2021 Python Maint - 21.1.1-2 -- Bootstrap for Python 3.10 - -* Mon May 10 2021 Karolina Surma - 21.1.1-1 -- Update to 21.1.1 - -* Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 -- python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 - (The wheel is Python 3 only for a while) - -* Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 -- Update to 21.0.1 -Resolves: rhbz#1922592 - -* Tue Jan 26 2021 Lumír Balhar - 21.0-1 -- Update to 21.0 (#1919530) - -* Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 -- Update to 20.3.3 - -* Mon Nov 30 2020 Miro Hrončok - 20.3-1 -- Update to 20.3 -- Add support for PEP 600: Future manylinux Platform Tags -- New resolver -- Fixes: rhbz#1893470 - -* Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 -- Update to 20.2.4 (#1889112) - -* Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 -- Update to 20.2.2 (#1838553) - -* Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 -- Do not emit a warning about root privileges when --root is used - -* Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 -- Update bundled provides to match 20.1.1 - -* Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 -- Deselect tests incompatible with the latest virtualenv - -* Sun May 24 2020 Miro Hrončok - 20.1.1-3 -- Rebuilt for Python 3.9 - -* Thu May 21 2020 Miro Hrončok - 20.1.1-2 -- Bootstrap for Python 3.9 - -* Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 -- Update to 20.1.1 - -* Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 -- Update to 20.1 - -* Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 -- Update to 20.1~b1 - -* Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 -- Only recommend setuptools, don't require them - -* Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 -- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) - -* Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 -- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip - -* Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 -- Update to 20.0.2 (#1793456) - -* Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 -- Update to 19.3.1 (#1761508) -- Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions - -* Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 -- Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) - -* Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 -- Update to 19.2.3 (#1742230) -- Drop patch that should strip path prefixes from RECORD files, the paths are relative - -* Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 -- Remove python2-pip -- Make pip bootstrap itself, rather than with an extra bootstrap RPM build - -* Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 -- Rebuilt for Python 3.8 - -* Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 -- Bootstrap for Python 3.8 - -* Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 -- Bootstrap for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 -- Recommend libcrypt.so.1 for manylinux1 compatibility -- Make /usr/bin/pip Python 3 - -* Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 -- Fix root warning when pip is invoked via python -m pip -- Remove a redundant second WARNING prefix form the abovementioned warning - -* Wed May 15 2019 Miro Hrončok - 19.1.1-1 -- Update to 19.1.1 (#1706995) - -* Thu Apr 25 2019 Miro Hrončok - 19.1-1 -- Update to 19.1 (#1702525) - -* Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 -- Update to 19.0.3 (#1679277) - -* Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 -- Update to 19.0.2 (#1668492) - -* Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Dec 03 2018 Miro Hrončok - 18.1-2 -- Use the system level root certificate instead of the one bundled in certifi - -* Thu Nov 22 2018 Miro Hrončok - 18.1-1 -- Update to 18.1 (#1652089) - -* Tue Sep 18 2018 Victor Stinner - 18.0-4 -- Prevent removing of the system packages installed under /usr/lib - when pip install -U is executed. Original patch by Michal Cyprian. - Resolves: rhbz#1550368. - -* Wed Aug 08 2018 Miro Hrončok - 18.0-3 -- Create python-pip-wheel package with the wheel - -* Tue Jul 31 2018 Miro Hrončok - 18.0-2 -- Remove redundant "Unicode" from License - -* Mon Jul 23 2018 Marcel Plch - 18.0-7 -- Update to 18.0 - -* Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 -- Rebuilt for Python 3.7 - -* Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 -- Bootstrap for Python 3.7 - -* Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 -- Bootstrap for Python 3.7 - -* Fri May 04 2018 Miro Hrončok - 9.0.3-2 -- Allow to import pip10's main from pip9's /usr/bin/pip -- Do not show the "new version of pip" warning outside of venv -Resolves: rhbz#1569488 -Resolves: rhbz#1571650 -Resolves: rhbz#1573755 - -* Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 -- Update to 9.0.3 - -* Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 -- Include built HTML documentation (in the new -doc subpackage) and man page - -* Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 -- Reintroduce the ipaddress module in the python3 subpackage. - -* Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 -- Add virtual provides for the bundled libraries. (rhbz#1096912) - -* Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 -- Switch macros to bcond's and make Python 2 optional to facilitate building - the Python 2 and Python 3 modules - -* Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue May 23 2017 Tomas Orsava - 9.0.1-10 -- Modernized package descriptions -Resolves: rhbz#1452568 - -* Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 -- Fix typo in the sudo pip warning - -* Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 -- Patch 1 update: No sudo pip warning in venv or virtualenv - -* Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 -- Patch 1 update: Customize the warning with the proper version of the pip - command - -* Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 -- Added patch 1: Emit a warning when running with root privileges - -* Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 -- Provide symlinks to executables to comply with Fedora guidelines for Python -Resolves: rhbz#1406922 - -* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 -- Rebuild for Python 3.6 with wheel - -* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 -- Rebuild for Python 3.6 without wheel - -* Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 -- Update to 9.0.1 - -* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 -- Enable EPEL Python 3 builds -- Use new python macros -- Cleanup spec - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 -- Updated the test sources - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 -- Moved python-pip into the python2-pip subpackage -- Added the python_provide macro - -* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Tue May 17 2016 Tomas Orsava - 8.1.2-1 -- Update to 8.1.2 -- Moved to a new PyPI URL format -- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py - -* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 -- Update to 8.0.2 - -* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 -- Rebuilt for Python3.5 rebuild -- With wheel set to 1 - -* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 -- Rebuilt for Python3.5 rebuild - -* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 -- Update to 7.1.0 - -* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 -- Install bash completion -- Ship LICENSE.txt as %%license where available - -* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 -- Update to 7.0.3 - -* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 -- Update to 6.0.8 - -* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 -- Only enable tests on Fedora. - -* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 -- Add tests -- Add patch skipping tests requiring Internet access - -* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 -- Added patch for local dos with predictable temp dictionary names - (http://seclists.org/oss-sec/2014/q4/655) - -* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 -- Update to 1.5.6 - -* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 -- Rebuild as wheel for Python 3.4 - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 -- Disable build_wheel - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 -- Rebuild as wheel for Python 3.4 - -* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 -- Updated to 1.5.4 - -* Mon Oct 14 2013 Tim Flink - 1.4.1-1 -- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release -- Updated version to 1.4.1 - -* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 -- Fix for CVE 2013-2099 - -* Thu May 23 2013 Tim Flink - 1.3.1-3 -- undo python2 executable rename to python-pip. fixes #958377 -- fix summary to match upstream - -* Mon May 06 2013 Kevin Kofler - 1.3.1-2 -- Fix main package Summary, it's for Python 2, not 3 (#877401) - -* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 -- Update to 1.3.1, fix for CVE-2013-1888. - -* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Oct 09 2012 Tim Flink - 1.2.1-2 -- Fixing files for python3-pip - -* Thu Oct 04 2012 Tim Flink - 1.2.1-1 -- Update to upstream 1.2.1 -- Change binary from pip-python to python-pip (RHBZ#855495) -- Add alias from python-pip to pip-python, to be removed at a later date - -* Tue May 15 2012 Tim Flink - 1.1.0-1 -- Update to upstream 1.1.0 - -* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sat Oct 22 2011 Tim Flink - 1.0.2-1 -- update to 1.0.2 and added python3 subpackage - -* Wed Jun 22 2011 Tim Flink - 0.8.3-1 -- update to 0.8.3 and project home page - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Dec 20 2010 Luke Macken - 0.8.2-1 -- update to 0.8.2 of pip -* Mon Aug 30 2010 Peter Halliday - 0.8-1 -- update to 0.8 of pip -* Thu Jul 22 2010 David Malcolm - 0.7.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 -- update to 0.7.2 of pip -* Sun May 23 2010 Peter Halliday - 0.7.1-1 -- update to 0.7.1 of pip -* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 -- fix dependency issue -* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 -- fix spec file -* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 -- upgrade to 0.6.1 of pip -* Mon Aug 31 2009 Peter Halliday - 0.4-1 -- Initial package - +%autochangelog From 3c290026a93483b427fd88b8defc0fe11262a3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:52:13 +0100 Subject: [PATCH 237/287] Update to 23.3.2 --- python-pip.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e709a0e..452ec3d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.3.1 +%global base_version 23.3.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl diff --git a/sources b/sources index 8aba295..3ed3c55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.3.1.tar.gz) = eddca29e8c3727d1d8d793ab0b05f069781cac06df805fcf7a363da738d39498135ccbbb6d2d442604a7bf78ba6c3d101ec2043431ac1832a3f2710db7cc5e56 +SHA512 (pip-23.3.2.tar.gz) = 976c6ab9959805f4d20d4bdedb4dabc95dd55f1ec78773f63f738599bbe44e766ad3a1394bee052a2c2386826d67686ad456726373345ba9e0d555fd251dff09 From 4899b5284a3cd5c6a8f7432d2b5ca816f25b6641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 28 Feb 2024 16:58:05 +0100 Subject: [PATCH 238/287] Update to 24.0 Resolves: rhbz#2262492 --- python-pip.spec | 4 ++-- sources | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 452ec3d..13f8830 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.3.2 +%global base_version 24.0 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -98,7 +98,7 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 -Provides: bundled(python%{1}dist(distlib)) = 0.3.6 +Provides: bundled(python%{1}dist(distlib)) = 0.3.8 Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 diff --git a/sources b/sources index 3ed3c55..2a0559e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.3.2.tar.gz) = 976c6ab9959805f4d20d4bdedb4dabc95dd55f1ec78773f63f738599bbe44e766ad3a1394bee052a2c2386826d67686ad456726373345ba9e0d555fd251dff09 +SHA512 (pip-24.0.tar.gz) = 0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df From 30632b6e8c11f6fa2ba3d6311ed77dc46321ca34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 7 Mar 2024 11:54:26 +0100 Subject: [PATCH 239/287] CI: Add Python 3.13 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 51248e2..cd36027 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -34,6 +34,9 @@ - smoke312: dir: python/smoke run: VERSION=3.12 ./venv.sh + - smoke313: + dir: python/smoke + run: VERSION=3.13 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -61,6 +64,9 @@ - smoke312_virtualenv: dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh + - smoke313_virtualenv: + dir: python/smoke + run: VERSION=3.13 METHOD=virtualenv ./venv.sh - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -84,6 +90,7 @@ - python3.10-devel - python3.11-devel - python3.12-devel + - python3.13-devel - python2-devel - python3-devel - python3-tox From 8a984c45656a6e0f7eeabc62c574e088f339759b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 28 May 2024 14:06:13 +0200 Subject: [PATCH 240/287] Fix tests with Python 3.13.0b1 --- 12698.patch | 30 ++++++++++++++++++++++++++++++ python-pip.spec | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 12698.patch diff --git a/12698.patch b/12698.patch new file mode 100644 index 0000000..6251567 --- /dev/null +++ b/12698.patch @@ -0,0 +1,30 @@ +From a2b23ffd477dcd90de6f1cb1f4cb75e0229d0e16 Mon Sep 17 00:00:00 2001 +From: Richard Si +Date: Sat, 11 May 2024 13:26:30 -0400 +Subject: [PATCH] Also patch time.time_ns() in unit tests + +The logging implementation in Python 3.13.0b1 uses time.time_ns() instead +of time.time(). +--- + tests/unit/test_base_command.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/unit/test_base_command.py b/tests/unit/test_base_command.py +index 80c93799d94..f9fae651422 100644 +--- a/tests/unit/test_base_command.py ++++ b/tests/unit/test_base_command.py +@@ -17,8 +17,12 @@ + + @pytest.fixture + def fixed_time() -> Iterator[None]: +- with patch("time.time", lambda: 1547704837.040001 + time.timezone): +- yield ++ # Patch time so logs contain a constant timestamp. time.time_ns is used by ++ # logging starting with Python 3.13. ++ year2019 = 1547704837.040001 + time.timezone ++ with patch("time.time", lambda: year2019): ++ with patch("time.time_ns", lambda: int(year2019 * 1e9)): ++ yield + + + class FakeCommand(Command): diff --git a/python-pip.spec b/python-pip.spec index 13f8830..5969cd0 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -82,6 +82,9 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Python 3.13 support: Also patch time.time_ns() in unit tests +Patch: https://github.com/pypa/pip/pull/12698.patch + %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index From af4d3ddf2608de00da9ff5912ec6b1b04341b094 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 6 Jun 2024 16:32:01 +0200 Subject: [PATCH 241/287] Bootstrap for Python 3.13 --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 5969cd0..a3bdada 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_tests 1 +%global _without_doc 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. From 531939a7cad9955fb7dced8896513591fdf1b1d7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 9 Jun 2024 10:15:36 +0200 Subject: [PATCH 242/287] Rebuilt for Python 3.13 --- python-pip.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a3bdada..5969cd0 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_tests 1 -%global _without_doc 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. From 05483f6f2049f4ac1235a47f9d1e7cd814a24bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 24 May 2024 15:06:49 +0200 Subject: [PATCH 243/287] Stop invoking setup.py during the build This is a preparation for pip 24.1 which drops setup.py entirely. [skip changelog] --- python-pip.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 5969cd0..5e35e5f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -153,6 +153,7 @@ BuildRequires: python%{python3_pkgversion}-devel # Note that the package prefix is always python3-, even if we build for 3.X # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 +BuildRequires: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: bash-completion @@ -242,10 +243,10 @@ sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt %build -%py3_build_wheel +export PYTHONPATH=./src/ +%pyproject_wheel %if %{with doc} -export PYTHONPATH=./src/ # from tox.ini sphinx-build-3 -b html docs/html docs/build/html sphinx-build-3 -b man docs/man docs/build/man -c docs/html @@ -258,7 +259,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) -%{python3} dist/%{python_wheel_name}/pip install \ +%{python3} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \ --root %{buildroot} \ --no-deps \ --disable-pip-version-check \ @@ -268,7 +269,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} --no-warn-script-location \ --no-index \ --no-cache-dir \ - --find-links dist \ + --find-links %{_pyproject_wheeldir} \ 'pip==%{upstream_version}' %if %{with doc} @@ -305,7 +306,7 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INST rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD mkdir -p %{buildroot}%{python_wheel_dir} -install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} +install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %check From 3dcabb5165ed599d9df5522adc17e936c98893eb Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 27 Jun 2024 12:06:09 +0200 Subject: [PATCH 244/287] Update to 24.1.1 --- 12698.patch | 30 --------- dummy-certifi.patch | 26 +++++--- no-version-warning.patch | 16 ----- nowarn-pip._internal.main.patch | 19 +++--- python-pip.spec | 66 +++++++------------ ...existing-dist-only-if-path-conflicts.patch | 34 +++++----- sources | 2 +- 7 files changed, 68 insertions(+), 125 deletions(-) delete mode 100644 12698.patch delete mode 100644 no-version-warning.patch diff --git a/12698.patch b/12698.patch deleted file mode 100644 index 6251567..0000000 --- a/12698.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a2b23ffd477dcd90de6f1cb1f4cb75e0229d0e16 Mon Sep 17 00:00:00 2001 -From: Richard Si -Date: Sat, 11 May 2024 13:26:30 -0400 -Subject: [PATCH] Also patch time.time_ns() in unit tests - -The logging implementation in Python 3.13.0b1 uses time.time_ns() instead -of time.time(). ---- - tests/unit/test_base_command.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/tests/unit/test_base_command.py b/tests/unit/test_base_command.py -index 80c93799d94..f9fae651422 100644 ---- a/tests/unit/test_base_command.py -+++ b/tests/unit/test_base_command.py -@@ -17,8 +17,12 @@ - - @pytest.fixture - def fixed_time() -> Iterator[None]: -- with patch("time.time", lambda: 1547704837.040001 + time.timezone): -- yield -+ # Patch time so logs contain a constant timestamp. time.time_ns is used by -+ # logging starting with Python 3.13. -+ year2019 = 1547704837.040001 + time.timezone -+ with patch("time.time", lambda: year2019): -+ with patch("time.time_ns", lambda: int(year2019 * 1e9)): -+ yield - - - class FakeCommand(Command): diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 8896ce8..371a74c 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,30 +1,31 @@ -From 09c983fdeabe3fa0b90b73f32ddf84a61e498e09 Mon Sep 17 00:00:00 2001 +From 0741e5a665308184ddbd20900f92e4417204092f Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Tue, 15 Nov 2022 09:22:46 +0100 +Date: Thu, 27 Jun 2024 10:38:53 +0200 Subject: [PATCH] Dummy certifi patch --- - src/pip/_vendor/certifi/core.py | 105 ++------------------------------ - 1 file changed, 6 insertions(+), 99 deletions(-) + src/pip/_vendor/certifi/core.py | 110 ++------------------------------ + 1 file changed, 6 insertions(+), 104 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index c3e5466..eb297f7 100644 +index 70e0c3b..eaf4210 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -4,105 +4,12 @@ certifi.py +@@ -4,111 +4,13 @@ certifi.py This module returns the installation location of cacert.pem or its contents. """ -import sys +-import atexit + +-def exit_cacert_ctx() -> None: +- _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr] +# The RPM-packaged certifi always uses the system certificates +def where() -> str: + return '/etc/pki/tls/certs/ca-bundle.crt' -if sys.version_info >= (3, 11): -+def contents() -> str: -+ with open(where(), encoding='utf=8') as data: -+ return data.read() - from importlib.resources import as_file, files - @@ -52,6 +53,7 @@ index c3e5466..eb297f7 100644 - # we will also store that at the global level as well. - _CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem")) - _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- atexit.register(exit_cacert_ctx) - - return _CACERT_PATH - @@ -87,6 +89,7 @@ index c3e5466..eb297f7 100644 - # we will also store that at the global level as well. - _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem") - _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- atexit.register(exit_cacert_ctx) - - return _CACERT_PATH - @@ -123,6 +126,9 @@ index c3e5466..eb297f7 100644 - - def contents() -> str: - return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") ++def contents() -> str: ++ with open(where(), encoding='utf=8') as data: ++ return data.read() -- -2.37.3 +2.45.1 diff --git a/no-version-warning.patch b/no-version-warning.patch deleted file mode 100644 index 6c34bec..0000000 --- a/no-version-warning.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/pip/_vendor/packaging/version.py b/src/pip/_vendor/packaging/version.py -index de9a09a..154e94d 100644 ---- a/src/pip/_vendor/packaging/version.py -+++ b/src/pip/_vendor/packaging/version.py -@@ -108,11 +108,6 @@ class LegacyVersion(_BaseVersion): - self._version = str(version) - self._key = _legacy_cmpkey(self._version) - -- warnings.warn( -- "Creating a LegacyVersion has been deprecated and will be " -- "removed in the next major release", -- DeprecationWarning, -- ) - - def __str__(self) -> str: - return self._version diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 68f5971..c8c98ed 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,6 +1,6 @@ -From 8dd3793d1bab226cec9c5c49b01718a9634bc403 Mon Sep 17 00:00:00 2001 +From 9d1e0a0e91cad143702b3a2d8c54bd765a5d9eb2 Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Mon, 10 May 2021 16:48:49 +0200 +Date: Thu, 27 Jun 2024 10:48:03 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint In Fedora, we use that in ensurepip and users cannot do anything about it, @@ -14,17 +14,17 @@ Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 6afb5c6..faf25af 100755 +index 1a5b7f8..682b9e4 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -16,4 +16,4 @@ def main(args: (Optional[List[str]]) = None) -> int: +@@ -15,4 +15,4 @@ def main(args: Optional[List[str]] = None) -> int: """ from pip._internal.utils.entrypoints import _wrapper - return _wrapper(args) + return _wrapper(args, _nowarn=True) diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index f292c64..2e29a5e 100644 +index 1501369..70034eb 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py @@ -20,7 +20,7 @@ if WINDOWS: @@ -61,16 +61,19 @@ index f292c64..2e29a5e 100644 diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index 3e85703..f86c392 100644 +index e1ccf04..30b8f74 100644 --- a/tests/functional/test_cli.py +++ b/tests/functional/test_cli.py -@@ -43,4 +43,5 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: +@@ -49,7 +49,8 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: result = script.pip("-V") result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) assert result.stdout == result2.stdout - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr + + + @pytest.mark.parametrize( -- -2.35.3 +2.45.1 diff --git a/python-pip.spec b/python-pip.spec index 5e35e5f..61662ba 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.0 +%global base_version 24.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -18,35 +18,27 @@ Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. # Here is the list of the libraries with corresponding licenses: -# appdirs: MIT # certifi: MPL-2.0 -# chardet: LGPL-2.1-only -# colorama: BSD-3-Clause # CacheControl: Apache-2.0 # distlib: Python-2.0.1 # distro: Apache-2.0 -# html5lib: MIT # idna: BSD-3-Clause -# ipaddress: Python-2.0.1 # msgpack: Apache-2.0 # packaging: Apache-2.0 OR BSD-2-Clause -# progress: ISC +# platformdirs: MIT # pygments: BSD-2-Clause -# pyparsing: MIT # pyproject-hooks: MIT # requests: Apache-2.0 # resolvelib: ISC # rich: MIT # setuptools: MIT -# six: MIT # tenacity: Apache-2.0 # truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT -# webencodings: BSD-3-Clause -License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) +License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz @@ -77,13 +69,6 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch -# Don't warn the user about packaging's LegacyVersion being deprecated. -# (This also breaks Python's test suite when warnings are treated as errors.) -# Upstream issue: https://github.com/pypa/packaging/issues/368 -Patch: no-version-warning.patch - -# Python 3.13 support: Also patch time.time_ns() in unit tests -Patch: https://github.com/pypa/pip/pull/12698.patch %description pip is a package management system used to install and manage software packages @@ -97,30 +82,25 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 -Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 -Provides: bundled(python%{1}dist(chardet)) = 5.1 -Provides: bundled(python%{1}dist(colorama)) = 0.4.6 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 +Provides: bundled(python%{1}dist(certifi)) = 2024.2.2 Provides: bundled(python%{1}dist(distlib)) = 0.3.8 -Provides: bundled(python%{1}dist(distro)) = 1.8 -Provides: bundled(python%{1}dist(idna)) = 3.4 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 -Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 3.8.1 -Provides: bundled(python%{1}dist(pygments)) = 2.15.1 -Provides: bundled(python%{1}dist(pyparsing)) = 3.1 +Provides: bundled(python%{1}dist(distro)) = 1.9 +Provides: bundled(python%{1}dist(idna)) = 3.7 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 +Provides: bundled(python%{1}dist(packaging)) = 24.1 +Provides: bundled(python%{1}dist(platformdirs)) = 4.2.1 +Provides: bundled(python%{1}dist(pygments)) = 2.17.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 -Provides: bundled(python%{1}dist(requests)) = 2.31 +Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.4.2 -Provides: bundled(python%{1}dist(setuptools)) = 68 -Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 -Provides: bundled(python%{1}dist(truststore)) = 0.8 +Provides: bundled(python%{1}dist(rich)) = 13.7.1 +Provides: bundled(python%{1}dist(setuptools)) = 69.5.1 +Provides: bundled(python%{1}dist(tenacity)) = 8.2.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.17 -Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 +Provides: bundled(python%{1}dist(truststore)) = 0.9.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.11 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 } # Some manylinux1 wheels need libcrypt.so.1. @@ -224,14 +204,14 @@ ln -s %{python_wheel_dir} tests/data/common_wheels # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe -sed -i '/\.exe/d' setup.py +sed -i '/\.exe/d' pyproject.toml # Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt # https://github.com/pypa/pip/pull/12046 %{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' # Remove unused test requirements -sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt +sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt %if %{with tests} @@ -323,12 +303,14 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w # bash completion tests only work from installed package pytest_k='not completion' -# --deselect'ed tests are not compatible with the latest virtualenv +# --ignore'd tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 +# among them, tests/functional/test_proxy.py needs proxy.py which is not +# yet packaged in Fedora %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --deselect tests/functional --deselect tests/lib/test_lib.py + --ignore tests/functional --ignore tests/lib/test_lib.py %endif diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 3a9ea25..20e5f28 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,11 +1,8 @@ -From 2c3f3a590ddfc151a456b44a5f96f0f603d178e9 Mon Sep 17 00:00:00 2001 -From: Lumir Balhar +From 9020f56e88a7dbaef688c147c281909f95b4e1d1 Mon Sep 17 00:00:00 2001 +From: Karolina Surma Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install --upgrade is executed. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit Resolves: rhbz#1550368 @@ -15,6 +12,7 @@ Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok Co-Authored-By: Karolina Surma + --- src/pip/_internal/metadata/base.py | 12 +++++++++++- src/pip/_internal/req/req_install.py | 2 +- @@ -23,11 +21,11 @@ Co-Authored-By: Karolina Surma 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py -index 151fd6d..f9109cd 100644 +index 9eabcdb..9816691 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName - from pip._vendor.packaging.version import LegacyVersion, Version +@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name + from pip._vendor.packaging.version import Version from pip._internal.exceptions import NoneMetadataError -from pip._internal.locations import site_packages, user_site @@ -35,7 +33,7 @@ index 151fd6d..f9109cd 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -560,6 +560,16 @@ class BaseDistribution(Protocol): +@@ -578,6 +578,16 @@ class BaseDistribution(Protocol): for extra in self._iter_egg_info_extras(): metadata["Provides-Extra"] = extra @@ -53,10 +51,10 @@ index 151fd6d..f9109cd 100644 class BaseEnvironment: """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index a1e376c..ed7facf 100644 +index 2132785..0340890 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -416,7 +416,7 @@ class InstallRequirement: +@@ -449,7 +449,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -66,13 +64,13 @@ index a1e376c..ed7facf 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index fb49d41..040f2c1 100644 +index 1dd0d70..414bdbe 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -325,7 +325,9 @@ class Resolver(BaseResolver): - """ +@@ -319,7 +319,9 @@ class Resolver(BaseResolver): # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. + assert req.satisfied_by is not None - if not self.use_user_site or req.satisfied_by.in_usersite: + if ((not self.use_user_site + or req.satisfied_by.in_usersite) @@ -81,7 +79,7 @@ index fb49d41..040f2c1 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index a4c24b5..e7e2da9 100644 +index 1f31d83..3804774 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -92,8 +90,8 @@ index a4c24b5..e7e2da9 100644 +import sysconfig from typing import ( TYPE_CHECKING, - Dict, -@@ -549,6 +551,16 @@ class Factory: + Callable, +@@ -617,6 +619,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -111,5 +109,5 @@ index a4c24b5..e7e2da9 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.35.3 +2.45.1 diff --git a/sources b/sources index 2a0559e..95d9fff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.0.tar.gz) = 0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df +SHA512 (pip-24.1.1.tar.gz) = 523e7273134b68252693ba7a032e7992c72075aebd2bcd895fbd90ad28d76f98b13ea1a7df0b6da1802650782ae977868177f740dc6f0a2eaccb95915c27b318 From bac2129304df292fd4eb6dcc94137afbb6baf1fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 14:03:51 +0000 Subject: [PATCH 245/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 454b4fe5620a30f94bdd40d710cae6277998ac09 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 26 Jul 2024 16:17:50 +0200 Subject: [PATCH 246/287] CI: Python 3.5 is gone from all Fedoras (removed in F35) https://fedoraproject.org/wiki/Changes/RetirePython3.5 --- tests/tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index cd36027..8f7ee62 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,9 +10,6 @@ - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" dest: "pyproject-rpm-macros" tests: - - smoke35_optional: - dir: python/smoke - run: VERSION=3.5 INSTALL_OR_SKIP=true ./venv.sh - smoke36: dir: python/smoke run: VERSION=3.6 ./venv.sh @@ -40,9 +37,6 @@ - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - - smoke35_virtualenv_optional: - dir: python/smoke - run: VERSION=3.5 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke36_virtualenv: dir: python/smoke run: VERSION=3.6 METHOD=virtualenv ./venv.sh From 77a1a20083a01470cb5f413db3d74d1a149cb0ba Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 26 Jul 2024 16:18:44 +0200 Subject: [PATCH 247/287] CI: Prepare for Python 2 removal https://fedoraproject.org/wiki/Changes/RetirePython2.7 --- tests/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8f7ee62..ca2ecac 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -36,7 +36,7 @@ run: VERSION=3.13 ./venv.sh - smoke27: dir: python/smoke - run: VERSION=2.7 METHOD=virtualenv ./venv.sh + run: VERSION=2.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke36_virtualenv: dir: python/smoke run: VERSION=3.6 METHOD=virtualenv ./venv.sh @@ -77,7 +77,6 @@ required_packages: - gcc - virtualenv - - python2.7 - python3.6 - python3.8 - python3.9 @@ -85,7 +84,6 @@ - python3.11-devel - python3.12-devel - python3.13-devel - - python2-devel - python3-devel - python3-tox - mock From f7056f5f8a39baea78491d9b6aacc0409a024e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:22:10 +0200 Subject: [PATCH 248/287] Use %pyproject_install [skip changelog] --- python-pip.spec | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 61662ba..39df308 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -69,6 +69,9 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch +# Remove -s from Python shebang - ensure that packages installed with pip +# to user locations are seen by pip itself +%undefine _py3_shebang_s %description pip is a package management system used to install and manage software packages @@ -235,22 +238,9 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} %install -# The following is similar to %%pyproject_install, but we don't have -# /usr/bin/pip yet, so we install using the wheel directly. -# (This is not standard wheel usage, but the pip wheel supports it -- see -# pip/__main__.py) -%{python3} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \ - --root %{buildroot} \ - --no-deps \ - --disable-pip-version-check \ - --progress-bar off \ - --verbose \ - --ignore-installed \ - --no-warn-script-location \ - --no-index \ - --no-cache-dir \ - --find-links %{_pyproject_wheeldir} \ - 'pip==%{upstream_version}' +export PYTHONPATH=./src/ +%pyproject_install +%pyproject_save_files -l pip %if %{with doc} pushd docs/build/man @@ -280,11 +270,6 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -# Make sure the INSTALLER is not pip and remove RECORD -# %%pyproject macros do this for all packages -echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER -rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD - mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} @@ -314,9 +299,8 @@ pytest_k='not completion' %endif -%files -n python%{python3_pkgversion}-%{srcname} +%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst -%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* @@ -328,7 +312,6 @@ pytest_k='not completion' %{_bindir}/pip-3 %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} -%{python3_sitelib}/pip* %dir %{bash_completions_dir} %{bash_completions_dir}/pip3 From f0db4e7df0e8801cc370f5921c1482c01d3e5da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:27:19 +0200 Subject: [PATCH 249/287] rpmlint: Ignore venv spelling error [skip changelog] --- python-pip.rpmlintrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index d32664b..afa5713 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -7,3 +7,6 @@ addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') + +# Spelling errors +addFilter(r"E: spelling-error .+'venv'") From 09c6b24cb016d793281ab504a962ee410aa616a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:41:53 +0200 Subject: [PATCH 250/287] Update to 24.2 - Fixes: rhbz#2296203 --- python-pip.spec | 14 ++++++-------- sources | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 39df308..bb84847 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.1.1 +%global base_version 24.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -32,7 +32,6 @@ Summary: A tool for installing and managing Python packages # resolvelib: ISC # rich: MIT # setuptools: MIT -# tenacity: Apache-2.0 # truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 @@ -86,23 +85,22 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 -Provides: bundled(python%{1}dist(certifi)) = 2024.2.2 +Provides: bundled(python%{1}dist(certifi)) = 2024.7.4 Provides: bundled(python%{1}dist(distlib)) = 0.3.8 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.7 Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 Provides: bundled(python%{1}dist(packaging)) = 24.1 -Provides: bundled(python%{1}dist(platformdirs)) = 4.2.1 -Provides: bundled(python%{1}dist(pygments)) = 2.17.2 +Provides: bundled(python%{1}dist(platformdirs)) = 4.2.2 +Provides: bundled(python%{1}dist(pygments)) = 2.18 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 Provides: bundled(python%{1}dist(rich)) = 13.7.1 -Provides: bundled(python%{1}dist(setuptools)) = 69.5.1 -Provides: bundled(python%{1}dist(tenacity)) = 8.2.3 +Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(truststore)) = 0.9.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.11 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 } diff --git a/sources b/sources index 95d9fff..fb4d816 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.1.1.tar.gz) = 523e7273134b68252693ba7a032e7992c72075aebd2bcd895fbd90ad28d76f98b13ea1a7df0b6da1802650782ae977868177f740dc6f0a2eaccb95915c27b318 +SHA512 (pip-24.2.tar.gz) = 2c44881f62f7b89cedeb0b739409ad67c6144bfdffc347efeb7bcf85aed77bcd7ddd10868d24577fbba0ef84dd752473d6b6dff329b42841939fae2ff2f63d28 From 858b6685fac01550996ff8b0bbf8a824564ab108 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 6 Sep 2024 16:09:45 +0200 Subject: [PATCH 251/287] Verify no unwanted files are present in the package --- python-pip.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index bb84847..4748690 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -276,6 +276,10 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w # Verify bundled provides are up to date %{_rpmconfigdir}/pythonbundles.py src/pip/_vendor/vendor.txt --compare-with '%{bundled 3}' +# Verify no unwanted files are present in the package +grep "exe$" %{pyproject_files} && exit 1 || true +grep "pem$" %{pyproject_files} && exit 1 || true + # Verify we can at least run basic commands without crashing %{py3_test_envvars} %{buildroot}%{_bindir}/pip --help %{py3_test_envvars} %{buildroot}%{_bindir}/pip list From 4965892859aa4ccc40c20c98772c7c8d588f1b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:20:12 +0100 Subject: [PATCH 252/287] CI: Disable Python 2.7 and 3.6 virtualenv tests virtualenv in Fedora 42+ no longer supports them [skip changelog] --- tests/tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index ca2ecac..af25af8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -12,7 +12,7 @@ tests: - smoke36: dir: python/smoke - run: VERSION=3.6 ./venv.sh + run: VERSION=3.6 TOX=false ./venv.sh - smoke37: dir: python/smoke run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh @@ -34,12 +34,6 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh - - smoke27: - dir: python/smoke - run: VERSION=2.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - - smoke36_virtualenv: - dir: python/smoke - run: VERSION=3.6 METHOD=virtualenv ./venv.sh - smoke37_virtualenv: dir: python/smoke run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh From 476f8247428b39f1faf254d344b654ce9bec46c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:23:06 +0100 Subject: [PATCH 253/287] CI: Drop Python 3.7 entirely It is not available in F40+ and the tests.yml is already diverged. [skip changelog] --- tests/tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index af25af8..a7ef2e7 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -13,9 +13,6 @@ - smoke36: dir: python/smoke run: VERSION=3.6 TOX=false ./venv.sh - - smoke37: - dir: python/smoke - run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh @@ -34,9 +31,6 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh - - smoke37_virtualenv: - dir: python/smoke - run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh From 533a4ecd2d7f04938b33ccadba88ea191a9dd68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:24:37 +0100 Subject: [PATCH 254/287] CI: Add Python 3.14 [skip changelog] --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index a7ef2e7..02b7040 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,6 +31,9 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh + - smoke314: + dir: python/smoke + run: VERSION=3.14 ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh @@ -49,6 +52,9 @@ - smoke313_virtualenv: dir: python/smoke run: VERSION=3.13 METHOD=virtualenv ./venv.sh + - smoke314_virtualenv: + dir: python/smoke + run: VERSION=3.14 METHOD=virtualenv ./venv.sh - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -72,6 +78,7 @@ - python3.11-devel - python3.12-devel - python3.13-devel + - python3.14-devel - python3-devel - python3-tox - mock From 990a77f1c0d35f95e7a9f99dd445154857d4901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 6 Nov 2024 09:29:56 +0100 Subject: [PATCH 255/287] Update to 24.3.1 - Fixes: rhbz#2321997 --- python-pip.spec | 10 +++++----- sources | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4748690..4e3a41d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.2 +%global base_version 24.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -85,8 +85,8 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 -Provides: bundled(python%{1}dist(certifi)) = 2024.7.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.8 +Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 +Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.7 Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 @@ -99,9 +99,9 @@ Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 Provides: bundled(python%{1}dist(rich)) = 13.7.1 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(truststore)) = 0.9.1 +Provides: bundled(python%{1}dist(truststore)) = 0.10 Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } # Some manylinux1 wheels need libcrypt.so.1. diff --git a/sources b/sources index fb4d816..2569c69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.2.tar.gz) = 2c44881f62f7b89cedeb0b739409ad67c6144bfdffc347efeb7bcf85aed77bcd7ddd10868d24577fbba0ef84dd752473d6b6dff329b42841939fae2ff2f63d28 +SHA512 (pip-24.3.1.tar.gz) = 9cf5f18eefd559cf27bc026e5206b0028ea77fd904a61fea9a6682b519305c962dd19170b841581bd05ff72192a9c458ec0eba173fa66db0438b046111ff5856 From 10e0ef58aa6f305a77d8226b3e550287adf98c05 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:14:20 +0000 Subject: [PATCH 256/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 048126313bd5dc5f856f2d5d1948641c6557f41b Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 27 Feb 2025 01:11:53 +0100 Subject: [PATCH 257/287] Update to 25.0.1 - Fixes: rhbz#2342135 --- python-pip.spec | 19 ++++++++++--------- sources | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4e3a41d..69d9723 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.3.1 +%global base_version 25.0.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -84,21 +84,21 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.1 Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 -Provides: bundled(python%{1}dist(idna)) = 3.7 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 -Provides: bundled(python%{1}dist(packaging)) = 24.1 -Provides: bundled(python%{1}dist(platformdirs)) = 4.2.2 +Provides: bundled(python%{1}dist(idna)) = 3.10 +Provides: bundled(python%{1}dist(msgpack)) = 1.1 +Provides: bundled(python%{1}dist(packaging)) = 24.2 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.6 Provides: bundled(python%{1}dist(pygments)) = 2.18 -Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 +Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.7.1 +Provides: bundled(python%{1}dist(rich)) = 13.9.4 Provides: bundled(python%{1}dist(setuptools)) = 70.3 -Provides: bundled(python%{1}dist(tomli)) = 2.0.1 +Provides: bundled(python%{1}dist(tomli)) = 2.2.1 Provides: bundled(python%{1}dist(truststore)) = 0.10 Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 @@ -159,6 +159,7 @@ Summary: A documentation for a tool for installing and managing Python pa BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs +BuildRequires: python%{python3_pkgversion}-sphinx-issues BuildRequires: python%{python3_pkgversion}-sphinx-copybutton BuildRequires: python%{python3_pkgversion}-myst-parser diff --git a/sources b/sources index 2569c69..e92388f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.3.1.tar.gz) = 9cf5f18eefd559cf27bc026e5206b0028ea77fd904a61fea9a6682b519305c962dd19170b841581bd05ff72192a9c458ec0eba173fa66db0438b046111ff5856 +SHA512 (pip-25.0.1.tar.gz) = a6850c8567082bbf98483a45e523c4de12132136d2b0aa388ac619c02ffd0c8f6aea7d727f7d84167dadec5f1e56dd478b2233b0caa5d9b3e5cadc9e1f3dc12c From d681b5b429a32a5fd431eb6b37d9ade3474d947b Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 27 Feb 2025 02:39:37 +0100 Subject: [PATCH 258/287] Remove testing of retired python3.8 from the CI See https://fedoraproject.org/wiki/Changes/RetirePython3.8 [skip changelog] --- tests/tests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 02b7040..1448bc8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -13,9 +13,6 @@ - smoke36: dir: python/smoke run: VERSION=3.6 TOX=false ./venv.sh - - smoke38: - dir: python/smoke - run: VERSION=3.8 ./venv.sh - smoke39: dir: python/smoke run: VERSION=3.9 ./venv.sh @@ -34,9 +31,6 @@ - smoke314: dir: python/smoke run: VERSION=3.14 ./venv.sh - - smoke38_virtualenv: - dir: python/smoke - run: VERSION=3.8 METHOD=virtualenv ./venv.sh - smoke39_virtualenv: dir: python/smoke run: VERSION=3.9 METHOD=virtualenv ./venv.sh @@ -72,7 +66,6 @@ - gcc - virtualenv - python3.6 - - python3.8 - python3.9 - python3.10-devel - python3.11-devel From 97a9e3e2155364562c2438142982fbb7afb4629a Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 6 Mar 2025 13:03:52 +0100 Subject: [PATCH 259/287] Fix CI tests to account for normalization of dist-info dirs (PEP 491) setuptools now normalizes the dist-info directory names to lowercase according to PEP 491 Also egg-info directories are not created anymore [skip changelog] --- tests/pip_install_upgrade/runtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pip_install_upgrade/runtest.sh b/tests/pip_install_upgrade/runtest.sh index 40e14a3..4c520f5 100755 --- a/tests/pip_install_upgrade/runtest.sh +++ b/tests/pip_install_upgrade/runtest.sh @@ -18,14 +18,14 @@ RPM_BUILD_ROOT=/ /usr/bin/pip install 'Pello==1.0.1' /usr/bin/pip freeze | grep '^Pello==1\.0\.2$' # Both installations should still exist -test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +test -d "${RPM_SITELIB}/pello-1.0.1.dist-info" test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" # Let's ditch the local one /usr/bin/pip uninstall --yes Pello # It should only remove one of them -test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +test -d "${RPM_SITELIB}/pello-1.0.1.dist-info" ! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" # And pip should still see the RPM-installed one From 8c346262d536ba9705940f456d765c4fa200fd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 24 Apr 2025 13:34:32 +0200 Subject: [PATCH 260/287] Bootstrap: wheel is not needed Also, test this on the CI. [skip changelog] --- python-pip.spec | 1 - tests/tests.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 69d9723..443c617 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -136,7 +136,6 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates diff --git a/tests/tests.yml b/tests/tests.yml index 1448bc8..69d8c0b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,5 +1,13 @@ --- - hosts: localhost + tags: + - classic + pre_tasks: + - import_role: + name: standard-test-source + vars: + fetch_only: True + roles: - role: standard-test-basic tags: @@ -49,6 +57,9 @@ - smoke314_virtualenv: dir: python/smoke run: VERSION=3.14 METHOD=virtualenv ./venv.sh + - mock_bootstrap_build: + dir: . + run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without doc - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From d4edbde90247196d2d511e9e1af492b7a928b442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Mon, 28 Apr 2025 10:06:59 +0200 Subject: [PATCH 261/287] Update to 25.1.0 (rhbz#2362438) --- python-pip.spec | 24 ++++++++++++++---------- sources | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 443c617..06a11eb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 25.0.1 +%global base_version 25.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -20,6 +20,7 @@ Summary: A tool for installing and managing Python packages # certifi: MPL-2.0 # CacheControl: Apache-2.0 +# dependency-groups: MIT # distlib: Python-2.0.1 # distro: Apache-2.0 # idna: BSD-3-Clause @@ -34,6 +35,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # truststore: MIT # tomli: MIT +# tomli-w: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT @@ -84,23 +86,25 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.1 -Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 +Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 +Provides: bundled(python%{1}dist(dependency-groups)) = 1.3 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 Provides: bundled(python%{1}dist(msgpack)) = 1.1 -Provides: bundled(python%{1}dist(packaging)) = 24.2 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.6 -Provides: bundled(python%{1}dist(pygments)) = 2.18 +Provides: bundled(python%{1}dist(packaging)) = 25 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.7 +Provides: bundled(python%{1}dist(pygments)) = 2.19.1 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 Provides: bundled(python%{1}dist(requests)) = 2.32.3 -Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.9.4 +Provides: bundled(python%{1}dist(resolvelib)) = 1.1 +Provides: bundled(python%{1}dist(rich)) = 14 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.2.1 -Provides: bundled(python%{1}dist(truststore)) = 0.10 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 +Provides: bundled(python%{1}dist(tomli-w)) = 1.2 +Provides: bundled(python%{1}dist(truststore)) = 0.10.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.13.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } diff --git a/sources b/sources index e92388f..cacb27f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-25.0.1.tar.gz) = a6850c8567082bbf98483a45e523c4de12132136d2b0aa388ac619c02ffd0c8f6aea7d727f7d84167dadec5f1e56dd478b2233b0caa5d9b3e5cadc9e1f3dc12c +SHA512 (pip-25.1.tar.gz) = d6b93aeabe6a4e046caf85c028fca380936ab65cb3c5028a7fa7dbc61cef2cf7d0c46c499fe548dc0af8f7bc30f7ecace8f257b20a60c0cc905b531f193b5a9d From 274df105b5c43a4ce01e3f9f2be496681853c3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:43:56 +0200 Subject: [PATCH 262/287] Remove no longer needed RIGHT-TO-LEFT OVERRIDE stripping See https://github.com/pypa/pip/pull/12517 [skip changelog] --- python-pip.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 06a11eb..80ac098 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -211,10 +211,6 @@ ln -s %{python_wheel_dir} tests/data/common_wheels rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml -# Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt -# https://github.com/pypa/pip/pull/12046 -%{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' - # Remove unused test requirements sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt From be112f861aec617af55b1372730287799a02d73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 11:09:49 +0200 Subject: [PATCH 263/287] Drop unused rpmlintrc filter python3-pip.noarch: E: unused-rpmlintrc-filter "E: spelling-error .+'venv'" [skip changelog] --- python-pip.rpmlintrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index afa5713..d32664b 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -7,6 +7,3 @@ addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') - -# Spelling errors -addFilter(r"E: spelling-error .+'venv'") From 8390734c31b5dc35c33e8bfb4b714def0a0bb640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:56:03 +0200 Subject: [PATCH 264/287] Stop building the HTML documentation, only build manual pages - Also build manual pages on RHEL - The python-pip-doc package is gone but not Obsoleted, it has no dependencies Also: Rename the bcond, update the CI test, use sphinx-build without the -3 suffix, always BR python3-sphinx (for RHEL alternate Python versions where we don't package Sphinx). --- python-pip.spec | 51 +++++++++++++++---------------------------------- tests/tests.yml | 2 +- 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 80ac098..947b7ae 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,9 +1,10 @@ # The original RHEL N+1 content set is defined by (build)dependencies -# of the packages in Fedora ELN. Hence we disable tests and documentation here +# of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. # We intentionally keep this enabled on EPEL. %bcond tests %[%{defined fedora} || %{defined epel}] -%bcond doc %[%{defined fedora} || %{defined epel}] +# Whether to build the manual pages (useful for bootstrapping Sphinx) +%bcond man 1 %global srcname pip %global base_version 25.1 @@ -54,6 +55,14 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif +%if %{with man} +# docs/requirements.txt contains many sphinx extensions +# however, we only build the manual pages thanks to +# https://github.com/pypa/pip/pull/13168 +# We also always use the "main" Sphinx, not python%%{python3_pkgversion}-sphinx +BuildRequires: python3-sphinx +%endif + # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 @@ -156,20 +165,6 @@ written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". -%if %{with doc} -%package doc -Summary: A documentation for a tool for installing and managing Python packages - -BuildRequires: python%{python3_pkgversion}-sphinx -BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs -BuildRequires: python%{python3_pkgversion}-sphinx-issues -BuildRequires: python%{python3_pkgversion}-sphinx-copybutton -BuildRequires: python%{python3_pkgversion}-myst-parser - -%description doc -A documentation for a tool for installing and managing Python packages - -%endif %package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel Summary: The pip wheel @@ -197,13 +192,6 @@ A Python wheel of pip to use with venv. # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem -# Do not use furo as HTML theme in docs -# furo is not available in Fedora -sed -i '/html_theme = "furo"/d' docs/html/conf.py - -# towncrier extension for Sphinx is not yet available in Fedora -sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py - # tests expect wheels in here ln -s %{python_wheel_dir} tests/data/common_wheels @@ -227,11 +215,8 @@ sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt export PYTHONPATH=./src/ %pyproject_wheel -%if %{with doc} -# from tox.ini -sphinx-build-3 -b html docs/html docs/build/html -sphinx-build-3 -b man docs/man docs/build/man -c docs/html -rm -rf docs/build/html/{.doctrees,.buildinfo} +%if %{with man} +sphinx-build --tag man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man %endif @@ -240,7 +225,7 @@ export PYTHONPATH=./src/ %pyproject_install %pyproject_save_files -l pip -%if %{with doc} +%if %{with man} pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do @@ -303,7 +288,7 @@ pytest_k='not completion' %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst -%if %{with doc} +%if %{with man} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* %{_mandir}/man1/pip3.* @@ -317,12 +302,6 @@ pytest_k='not completion' %dir %{bash_completions_dir} %{bash_completions_dir}/pip3 -%if %{with doc} -%files doc -%license LICENSE.txt -%doc README.rst -%doc docs/build/html -%endif %files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel %license LICENSE.txt diff --git a/tests/tests.yml b/tests/tests.yml index 69d8c0b..b2347e3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -59,7 +59,7 @@ run: VERSION=3.14 METHOD=virtualenv ./venv.sh - mock_bootstrap_build: dir: . - run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without doc + run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without man - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From 2fbd290be070a552e0c7861efd554b07770f9157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:41:03 +0200 Subject: [PATCH 265/287] Update to 25.1.1 - Fixes: rhbz#2363801 --- python-pip.spec | 4 ++-- sources | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 947b7ae..1b953ec 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -7,7 +7,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.1 +%global base_version 25.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -97,7 +97,7 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 -Provides: bundled(python%{1}dist(dependency-groups)) = 1.3 +Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 diff --git a/sources b/sources index cacb27f..8c41529 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-25.1.tar.gz) = d6b93aeabe6a4e046caf85c028fca380936ab65cb3c5028a7fa7dbc61cef2cf7d0c46c499fe548dc0af8f7bc30f7ecace8f257b20a60c0cc905b531f193b5a9d +SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc From f467900a68999f4695b94e29770e942de0a15332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 00:02:06 +0200 Subject: [PATCH 266/287] Remove Recommends only related to unsupported Pythons This pip version no longer supports Python 3.7 and 3.8. --- python-pip.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 1b953ec..6235e9f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -179,8 +179,6 @@ Requires: ca-certificates %{crypt_compat_recommends 3.11} %{crypt_compat_recommends 3.10} %{crypt_compat_recommends 3.9} -%{crypt_compat_recommends 3.8} -%{crypt_compat_recommends 3.7} %endif %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel From b4fe5333a1342b62289749ef56a9e4dbc40b601c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 May 2025 23:33:04 +0200 Subject: [PATCH 267/287] Run functional tests - Drop test requirement of python-wheel-wheel - Use pytest-xdist to run tests faster The motivation for this was the need to drop python-wheel-wheel in wheel 0.46+. Due to newly gained runtime dependencies of wheel, such wheel cannot be used as is. I realized that when the explicit BuildRequires is removed, the package is brought in by python3-virtualenv. But even when python3-virtualenv drops the dependency, the tests still passed without python-wheel-wheel. Because the tests that require packaged wheels were all --ignored for obsolete reasons. When unignored, they errored due to missing coverage.whl. While attempting to fix this, I realized we cannot use the RPM packaged wheel anyway. When the functional tests run, it takes a while, hence pytest-xdist. --- For the record, the coverage-0-py3-none-any.whl was created as: [project] name = "coverage" version = "0" [build-system] requires = ["setuptools >= 77.0.3"] build-backend = "setuptools.build_meta" And coverage.py with: def process_startup(): pass Wheel generated by `python3 -m build` (with python3-build-1.2.1-4.fc41.noarch). --- .gitignore | 2 +- python-pip.spec | 55 +++++++++++++++++++++++++++++++++++++------------ sources | 3 +++ 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 8e24ed4..72d39d5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ /pip/ /results_python-pip/ *.rpm - +*.whl diff --git a/python-pip.spec b/python-pip.spec index 6235e9f..78219b9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -44,6 +44,28 @@ License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-C URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz +# The following sources are wheels used only for tests. +# They are not bundled in the built package and do not contribute to the overall license. +# They are pre-built but only contain text files, rebuilding them in %%build has very little benefit. + +# setuptools.whl +# We cannot use RPM-packaged python-setuptools-wheel because upstream pins to <80. +# See https://github.com/pypa/pip/pull/13357 for rationale. +Source1: https://files.pythonhosted.org/packages/0d/6d/b4752b044bf94cb802d88a888dc7d288baaf77d7910b7dedda74b5ceea0c/setuptools-79.0.1-py3-none-any.whl + +# wheel.whl +# We cannot use RPM-packaged python-wheel-wheel because we intent to drop that package in wheel 0.46+. +# That version of wheel has runtime dependencies and is generally useless as a standalone wheel. +# See https://github.com/pypa/pip/pull/13382 as an attempt to drop the requirement from pip tests. +Source2: https://files.pythonhosted.org/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl + +# coverage.whl +# There is no RPM-packaged python-coverage-wheel, the package is archful. +# Upstream uses this to measure coverage, which we don't. +# This is a dummy placeholder package that only contains empty coverage.process_startup(). +# That way, we don't need to patch the usage out of conftest.py. +Source3: coverage-0-py3-none-any.whl + BuildArch: noarch %if %{with tests} @@ -51,8 +73,7 @@ BuildRequires: /usr/bin/git BuildRequires: /usr/bin/hg BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/svn -BuildRequires: python-setuptools-wheel -BuildRequires: python-wheel-wheel +BuildRequires: python%{python3_pkgversion}-pytest-xdist %endif %if %{with man} @@ -190,9 +211,6 @@ A Python wheel of pip to use with venv. # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem -# tests expect wheels in here -ln -s %{python_wheel_dir} tests/data/common_wheels - # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml @@ -200,6 +218,12 @@ sed -i '/\.exe/d' pyproject.toml # Remove unused test requirements sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt +%if %{with tests} +# tests expect wheels in here +mkdir tests/data/common_wheels +cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels +%endif + %if %{with tests} %generate_buildrequires @@ -272,15 +296,20 @@ grep "pem$" %{pyproject_files} && exit 1 || true # Upstream tests # bash completion tests only work from installed package pytest_k='not completion' +# this clashes with our PYTHONPATH +pytest_k="$pytest_k and not environments_with_no_pip" +# this seems to require internet (despite no network marker) +# added in https://github.com/pypa/pip/pull/13378 TODO drop this in the next release +pytest_k="$pytest_k and not test_prompt_for_keyring_if_needed and not test_double_install_fail and not test_install_sdist_links and not test_lock_vcs and not test_lock_archive and not test_backend_sees_config_via_sdist" +# this cannot import breezy, TODO investigate +pytest_k="$pytest_k and not (functional and bazaar)" +# failures to investigate +pytest_k="$pytest_k and not test_all_fields and not test_report_mixed_not_found and not test_basic_show" # "Editable project location" missing +pytest_k="$pytest_k and not test_basic_install_from_wheel" +pytest_k="$pytest_k and not test_check_unsupported" -# --ignore'd tests are not compatible with the latest virtualenv -# These files contain almost 500 tests so we should enable them back -# as soon as pip will be compatible upstream -# https://github.com/pypa/pip/pull/8441 -# among them, tests/functional/test_proxy.py needs proxy.py which is not -# yet packaged in Fedora -%pytest -m 'not network' -k "$(echo $pytest_k)" \ - --ignore tests/functional --ignore tests/lib/test_lib.py +%pytest -n auto -m 'not network' -k "$(echo $pytest_k)" \ + --ignore tests/functional/test_proxy.py # no proxy.py in Fedora %endif diff --git a/sources b/sources index 8c41529..4c3846d 100644 --- a/sources +++ b/sources @@ -1 +1,4 @@ SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc +SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a +SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d +SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e From 8e291b0b6ca0895ccb6c870c4f9bdc0a56e38a2c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 11:23:07 +0200 Subject: [PATCH 268/287] Bootstrap for Python 3.14 --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 78219b9..1035dbe 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_tests 1 +%global _without_man 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. From b0472d2883529db994ba95664ba9196e48d62162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Jun 2025 11:01:07 +0200 Subject: [PATCH 269/287] Rebuilt for Python 3.14 - Fix test failures - Fixes: rhbz#2335909 --- python-pip.spec | 6 ++-- python3.14-file-urls.patch | 67 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 python3.14-file-urls.patch diff --git a/python-pip.spec b/python-pip.spec index 1035dbe..29f46b3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_tests 1 -%global _without_man 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. @@ -102,6 +100,10 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch +# Adjust path_to_url et al. to produce the same results on Python 3.14+ +# https://github.com/pypa/pip/pull/13423 +Patch: python3.14-file-urls.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/python3.14-file-urls.patch b/python3.14-file-urls.patch new file mode 100644 index 0000000..77e89de --- /dev/null +++ b/python3.14-file-urls.patch @@ -0,0 +1,67 @@ +From 03b4b94a0338d80d1f45697a5ea083a5e5c937db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 12 Jun 2025 23:36:24 +0200 +Subject: [PATCH] Adjust path_to_url et al. to produce the same results on + Python 3.14+ + +See https://github.com/python/cpython/issues/125974 +and https://github.com/pypa/pip/pull/13138#issuecomment-2567715303 +--- + src/pip/_internal/models/link.py | 6 +++++- + src/pip/_internal/utils/urls.py | 2 +- + tests/unit/test_urls.py | 2 +- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/pip/_internal/models/link.py b/src/pip/_internal/models/link.py +index f0560f6..38423d1 100644 +--- a/src/pip/_internal/models/link.py ++++ b/src/pip/_internal/models/link.py +@@ -4,6 +4,7 @@ import logging + import os + import posixpath + import re ++import sys + import urllib.parse + from dataclasses import dataclass + from typing import ( +@@ -134,7 +135,10 @@ def _clean_file_url_path(part: str) -> str: + # should not be quoted. On Linux where drive letters do not + # exist, the colon should be quoted. We rely on urllib.request + # to do the right thing here. +- return urllib.request.pathname2url(urllib.request.url2pathname(part)) ++ ret = urllib.request.pathname2url(urllib.request.url2pathname(part)) ++ if sys.version_info >= (3, 14): ++ ret = ret.removeprefix("//") ++ return ret + + + # percent-encoded: / +diff --git a/src/pip/_internal/utils/urls.py b/src/pip/_internal/utils/urls.py +index 9f34f88..e951a5e 100644 +--- a/src/pip/_internal/utils/urls.py ++++ b/src/pip/_internal/utils/urls.py +@@ -12,7 +12,7 @@ def path_to_url(path: str) -> str: + quoted path parts. + """ + path = os.path.normpath(os.path.abspath(path)) +- url = urllib.parse.urljoin("file:", urllib.request.pathname2url(path)) ++ url = urllib.parse.urljoin("file://", urllib.request.pathname2url(path)) + return url + + +diff --git a/tests/unit/test_urls.py b/tests/unit/test_urls.py +index 0c14525..2a56e45 100644 +--- a/tests/unit/test_urls.py ++++ b/tests/unit/test_urls.py +@@ -11,7 +11,7 @@ from pip._internal.utils.urls import path_to_url, url_to_path + def test_path_to_url_unix() -> None: + assert path_to_url("/tmp/file") == "file:///tmp/file" + path = os.path.join(os.getcwd(), "file") +- assert path_to_url("file") == "file://" + urllib.request.pathname2url(path) ++ assert path_to_url("file") == "file://" + path + + + @pytest.mark.skipif("sys.platform != 'win32'") +-- +2.49.0 + From 2b190b00bf65d1898b73b6b770eeb94270b24ef5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:06:18 +0200 Subject: [PATCH 270/287] We don't want to run tests on EPEL by default It adds unwanted complexity, and in some alternative stacks the dependencies are not available. [skip changelog] --- python-pip.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 29f46b3..0690d01 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,8 +1,7 @@ # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. -# We intentionally keep this enabled on EPEL. -%bcond tests %[%{defined fedora} || %{defined epel}] +%bcond tests %{defined fedora} # Whether to build the manual pages (useful for bootstrapping Sphinx) %bcond man 1 From 1ae923743179e226ab75e08f9035c8fba6666bfb Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:08:00 +0200 Subject: [PATCH 271/287] Macronize the Python version of the bundled provides We build it in alternative Python stacks and want it to pick up the redefined %{python3_pkgversion}. For main Python it evaluates to 3, meaning no change in Fedora proper. It will result in a smaller diff when creating alternative package definitions. [skip changelog] --- python-pip.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 0690d01..9b1e25e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -178,7 +178,7 @@ BuildRequires: ca-certificates Requires: ca-certificates # Virtual provides for the packages bundled by pip: -%{bundled 3} +%{bundled %{python3_pkgversion}} Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} @@ -195,7 +195,7 @@ Summary: The pip wheel Requires: ca-certificates # Virtual provides for the packages bundled by pip: -%{bundled 3} +%{bundled %{python3_pkgversion}} # This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels # It is also only relevant when this wheel is shared across multiple Pythons From 6c37700fd567226cefad01baee145c15741ec410 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:14:06 +0200 Subject: [PATCH 272/287] Remove the obsolete Conflicts from the Python 2 -> 3 transition [skip changelog] --- python-pip.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 9b1e25e..4d3221a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -181,7 +181,6 @@ Requires: ca-certificates %{bundled %{python3_pkgversion}} Provides: pip = %{version}-%{release} -Conflicts: python-pip < %{version}-%{release} %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages From 435a2e9aa1eaad128aed2d6ad0e9ad8bc525dc30 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 15:06:04 +0200 Subject: [PATCH 273/287] Use the short -t CLI option for sphinx-build The long options were added in Sphinx 7.3.0, which is not available in RHEL 9 and 10. The short option works for each of the currently supported systems. Ref: https://www.sphinx-doc.org/en/master/changes/7.3.html [skip changelog] --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 4d3221a..ec68d37 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -240,7 +240,7 @@ export PYTHONPATH=./src/ %pyproject_wheel %if %{with man} -sphinx-build --tag man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man +sphinx-build -t man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man %endif From 5802dc6818d2387677ad31f3f51c52835836df23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 20 Jun 2025 19:12:08 +0200 Subject: [PATCH 274/287] Handle alternate executable names for cases this isn't the main Python This is based on work in https://gitlab.com/redhat/centos-stream/rpms/python3.12-pip/-/commit/f1b86318fc6f21d5514fb7933172798cb4ea3db4 and https://src.fedoraproject.org/rpms/python-pip/pull-request/71 (not merged) With one notable difference: The Bash completion function has no dot in it now. I believe that having a dot in it breaks it: https://issues.redhat.com/browse/RHEL-99083 [skip changelog] --- python-pip.spec | 59 ++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ec68d37..055999d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -249,13 +249,28 @@ export PYTHONPATH=./src/ %pyproject_install %pyproject_save_files -l pip +# We'll install pip as pip3.X +# Later we'll provide symbolic links, manpage links and bashcompletion fixes for alternative names +%if "%{python3_pkgversion}" == "3" +%global alternate_names pip-%{python3_version} pip-3 pip3 pip +%else +%global alternate_names pip-%{python3_version} +%endif + +# Provide symlinks to executables +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip%{python3_version} +rm %{buildroot}%{_bindir}/pip3 +for pip in %{alternate_names}; do +ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/$pip +done + %if %{with man} pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN -for pip in "pip3" "pip-3" "pip%{python3_version}" "pip-%{python3_version}"; do -echo ".so $MAN" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip} +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip%{python3_version}} +for pip in %{alternate_names}; do +echo ".so ${MAN/pip/pip%{python3_version}}" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip} done done popd @@ -263,19 +278,13 @@ popd mkdir -p %{buildroot}%{bash_completions_dir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bash_completions_dir}/pip3 - -# Make bash completion apply to all the 5 symlinks we install -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ - -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bash_completions_dir}/pip3 - - -# Provide symlinks to executables to comply with Fedora guidelines for Python -ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} -ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 + %{buildroot}%{_bindir}/pip%{python3_version} completion --bash \ + > %{buildroot}%{bash_completions_dir}/pip%{python3_version} +# Make bash completion apply to all alternate names symlinks we install +sed -i -e "s/^\\(complete.*\\) pip%{python3_version}\$/\\1 pip%{python3_version} %{alternate_names}/" \ + -e s/_pip_completion/_pip%{python3_version_nodots}_completion/ \ + %{buildroot}%{bash_completions_dir}/pip%{python3_version} mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} @@ -290,9 +299,9 @@ grep "exe$" %{pyproject_files} && exit 1 || true grep "pem$" %{pyproject_files} && exit 1 || true # Verify we can at least run basic commands without crashing -%{py3_test_envvars} %{buildroot}%{_bindir}/pip --help -%{py3_test_envvars} %{buildroot}%{_bindir}/pip list -%{py3_test_envvars} %{buildroot}%{_bindir}/pip show pip +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} --help +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} list +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} show pip %if %{with tests} # Upstream tests @@ -318,18 +327,22 @@ pytest_k="$pytest_k and not test_check_unsupported" %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst %if %{with man} -%{_mandir}/man1/pip.* -%{_mandir}/man1/pip-*.* -%{_mandir}/man1/pip3.* -%{_mandir}/man1/pip3-*.* +%if "%{python3_pkgversion}" == "3" +%{_mandir}/man1/pip{,3,-3}.1.* +%{_mandir}/man1/pip{,3,-3}-[^3]*.1.* %endif +%{_mandir}/man1/pip{,-}%{python3_version}.1.* +%{_mandir}/man1/pip{,-}%{python3_version}-*.1.* +%endif +%if "%{python3_pkgversion}" == "3" %{_bindir}/pip %{_bindir}/pip3 %{_bindir}/pip-3 +%endif %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %dir %{bash_completions_dir} -%{bash_completions_dir}/pip3 +%{bash_completions_dir}/pip%{python3_version} %files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel From c61c7b352ccc2d71cab41decb4d0ed0a99f6f1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 25 Mar 2025 15:14:31 +0100 Subject: [PATCH 275/287] Use /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem - https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile --- dummy-certifi.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 371a74c..01e8756 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -23,7 +23,7 @@ index 70e0c3b..eaf4210 100644 +# The RPM-packaged certifi always uses the system certificates +def where() -> str: -+ return '/etc/pki/tls/certs/ca-bundle.crt' ++ return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem' -if sys.version_info >= (3, 11): From 685d136d854f58a5e432f65142e1df9cb1b08f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Thu, 3 Jul 2025 07:58:05 +0200 Subject: [PATCH 276/287] CI: Test bash completion Originally generated by CursorAI, manually edited. [skip changelog] --- tests/bash_completion/main.fmf | 35 ++++++ .../pip_completion_full_test.sh | 88 +++++++++++++ tests/bash_completion/test_pip_completion.exp | 117 ++++++++++++++++++ tests/tests.yml | 4 + 4 files changed, 244 insertions(+) create mode 100644 tests/bash_completion/main.fmf create mode 100755 tests/bash_completion/pip_completion_full_test.sh create mode 100755 tests/bash_completion/test_pip_completion.exp diff --git a/tests/bash_completion/main.fmf b/tests/bash_completion/main.fmf new file mode 100644 index 0000000..cde6f68 --- /dev/null +++ b/tests/bash_completion/main.fmf @@ -0,0 +1,35 @@ +summary: PIP bash completion functionality smoke test +description: | + Comprehensive test for pip bash completion functionality on Fedora/RHEL systems. + + The test performs the following steps: + 1. Finds the bash completion script in the given (e.g. python3-pip) RPM package + 2. Discovers all pip executables in the package (e.g. /usr/bin/pip and /usr/bin/pip3.14) + 3. Sources the completion script and verifies completion for all executables is registered + 4. Runs functional TAB completion tests using expect (for regular and POSIX mode of Bash) + 5. Validates that completion works for basic pip commands + + This is a smoke test to ensure pip bash completion is properly + installed and functional after package installation. + +component: + - python3-pip + +test: ./pip_completion_full_test.sh + +framework: shell + +duration: 5m +tier: 1 + + +require: + - python3-pip + - bash-completion + - expect + - rpm + - bash + + +environment: + PACKAGE: python3-pip diff --git a/tests/bash_completion/pip_completion_full_test.sh b/tests/bash_completion/pip_completion_full_test.sh new file mode 100755 index 0000000..94fcdb9 --- /dev/null +++ b/tests/bash_completion/pip_completion_full_test.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +# Comprehensive PIP bash completion test for RHEL +# Finds completion scripts from RPM, tests all pip binaries, and runs functional tests + +PACKAGE="${PACKAGE:-python3-pip}" + + +# Step 1: Find bash completion scripts in python3-pip RPM package +echo "Step 1: Finding bash completion scripts in $PACKAGE RPM package..." + +COMPLETION_FILE=$(rpm -ql $PACKAGE 2>/dev/null | grep -E "/usr/share/bash-completion/completions/" || true) + +if [[ -z "$COMPLETION_FILE" ]]; then + echo "✗ No bash completion files found in $PACKAGE package" + exit 1 +fi + +# Check if there's exactly one completion file +COMPLETION_FILE_COUNT=$(echo "$COMPLETION_FILE" | wc -l) + +if [[ $COMPLETION_FILE_COUNT -gt 1 ]]; then + echo "✗ Multiple bash completion files found in $PACKAGE package:" + echo "$COMPLETION_FILE" | sed 's/^/ - /' + echo "Expected exactly one completion file, found $COMPLETION_FILE_COUNT" + exit 1 +fi + + +echo "✓ Found completion file from $PACKAGE package:" +echo "$COMPLETION_FILE" | sed 's/^/ - /' + +# Step 2: Find all pip binaries +echo +echo "Step 2: Finding all pip binaries..." +PIP_BINARIES=() +PIP_FILES=$(rpm -ql $PACKAGE | grep /bin/p) +for pip_file in $PIP_FILES; do + if [[ -x "$pip_file" ]]; then + pip_cmd=$(basename "$pip_file") + PIP_BINARIES+=("$pip_cmd") + echo "✓ Found: $pip_cmd -> $pip_file" + fi +done + +if [[ ${#PIP_BINARIES[@]} -eq 0 ]]; then + echo "✗ No pip binaries found" + exit 1 +fi + +echo "Total pip binaries found: ${#PIP_BINARIES[@]}" + +# Step 3: Source completion scripts and test each binary +echo +echo "Step 3: Testing completion for each pip binary..." + +for AS_POSIX in 0 1; do + if [[ $AS_POSIX -eq 1 ]]; then + echo "Testing in POSIX mode" + POSIX="--posix" + else + echo "Testing in non-POSIX mode" + POSIX="" + fi + + echo "Sourcing: $COMPLETION_FILE" + if bash --norc $POSIX -c "source $COMPLETION_FILE" ; then + echo "✓ Successfully sourced $COMPLETION_FILE" + else + echo "! Warning: Failed to source $COMPLETION_FILE" + exit 1 + fi + + export AS_POSIX + for pip_exec in "${PIP_BINARIES[@]}"; do + echo "Running expect test with $COMPLETION_FILE and $pip_exec..." + if ./test_pip_completion.exp "$COMPLETION_FILE" "$pip_exec"; then + echo "✓ Functional test passed" + else + echo "✗ Functional test failed" + exit 1 + fi + done + +done + + +echo "✓ All tests completed successfully!" diff --git a/tests/bash_completion/test_pip_completion.exp b/tests/bash_completion/test_pip_completion.exp new file mode 100755 index 0000000..4389174 --- /dev/null +++ b/tests/bash_completion/test_pip_completion.exp @@ -0,0 +1,117 @@ +#!/usr/bin/expect -f + +# PIP bash completion smoke test using expect +# Tests actual TAB completion functionality +# Usage: test_pip_completion.exp [completion_file] [pip_binary] + +set timeout 5 + + +set completion_file [lindex $argv 0] +set pip_exec [lindex $argv 1] + + +puts "=== PIP Bash Completion Test (using expect) ===" +puts "Testing completion file: $completion_file" +puts "Testing pip binary: $pip_exec" + +# Check if completion file exists first +if {![file exists $completion_file]} { + puts "✗ Completion file not found: $completion_file" + exit 1 +} +puts "✓ Completion file found: $completion_file" + +# Start bash shell +if {[info exists env(AS_POSIX)] && $env(AS_POSIX) == "1"} { + spawn bash --norc --posix +} else { + spawn bash --norc +} +expect "$ " + +# Source the completion file +send "source $completion_file\r" +expect "$ " +puts "Attempted to source completion file" + +# Test 1: Basic pip command completion +puts "\nTest 1: Testing '$pip_exec ' + TAB completion..." +send "$pip_exec " +sleep 0.1 +# Send TAB TAB using hex codes +send "\x09\x09" +expect { + -re "(install|uninstall|list|show)" { + puts "✓ Basic pip commands found in completion" + expect "$ " + } + -re "Display all" { + puts "✓ Completion showing options menu" + send "n\r" + expect "$ " + } + timeout { + puts "✗ Timeout waiting for completion - test failed" + exit 1 + } +} + +# Clear the line and ensure clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Test 2: Test partial command completion (simpler test) +puts "\nTest 2: Testing '$pip_exec insta' + TAB completion..." +send "$pip_exec insta" +sleep 0.1 +# Single TAB for completion +send "\x09" +expect { + -re "install" { + puts "✓ Partial command completion works (insta -> install)" + expect "$ " + } + timeout { + puts "✗ Timeout on partial completion test - test failed" + exit 1 + } +} + +# Clear the line and ensure clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Test 3: Test help completion +puts "\nTest 3: Testing '$pip_exec --' + TAB completion..." +send "$pip_exec --" +sleep 0.1 +send "\x09\x09" +expect { + -re "(--help|--version)" { + puts "✓ Command options found in completion" + expect "$ " + } + timeout { + puts "✗ Timeout on options completion test - test failed" + exit 1 + } +} + +# Final cleanup - make sure we're at clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Exit bash cleanly +send "exit\r" +expect eof + +puts "\n=== Completion Test Complete ===" +puts "PIP bash completion functionality tested!" + diff --git a/tests/tests.yml b/tests/tests.yml index b2347e3..d1ff148 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -73,6 +73,9 @@ dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-clikit - pip_install_upgrade + - bash_completion: + dir: tests/bash_completion + run: ./pip_completion_full_test.sh required_packages: - gcc - virtualenv @@ -91,3 +94,4 @@ - grep - util-linux - shadow-utils + - expect From cea7bb935ff44be641518aa5e12f90fb0ff1357e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 22 Jul 2025 11:45:35 +0200 Subject: [PATCH 277/287] Use /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem even in truststore - https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile - Fixes: rhbz#2380441 --- python-pip.spec | 4 ++++ truststore-pem-path.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 truststore-pem-path.patch diff --git a/python-pip.spec b/python-pip.spec index 055999d..cc3f013 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -103,6 +103,10 @@ Patch: nowarn-pip._internal.main.patch # https://github.com/pypa/pip/pull/13423 Patch: python3.14-file-urls.patch +# https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile +# https://github.com/sethmlarson/truststore/pull/183 +Patch: truststore-pem-path.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/truststore-pem-path.patch b/truststore-pem-path.patch new file mode 100644 index 0000000..f771a33 --- /dev/null +++ b/truststore-pem-path.patch @@ -0,0 +1,26 @@ +From 2c8231f03987daaf9524f9568884a7b296480b32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 17 Jul 2025 09:50:35 +0200 +Subject: [PATCH] Fedora 43 removes some symbolic links + +See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile +--- + src/pip/_vendor/truststore/_openssl.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_vendor/truststore/_openssl.py b/src/pip/_vendor/truststore/_openssl.py +index 9951cf7..3e25a56 100644 +--- a/src/pip/_vendor/truststore/_openssl.py ++++ b/src/pip/_vendor/truststore/_openssl.py +@@ -6,8 +6,10 @@ + + # candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes + _CA_FILE_CANDIDATES = [ +- # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD ++ # Alpine, Arch, Fedora 34-42, OpenWRT, RHEL 9-10, BSD + "/etc/ssl/cert.pem", ++ # Fedora 43+, RHEL 11+ ++ "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + # Fedora <= 34, RHEL <= 9, CentOS <= 9 + "/etc/pki/tls/cert.pem", + # Debian, Ubuntu (requires ca-certificates) From 69759f29723c829766e59e5b6b52ff5bc652c839 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:21:56 +0000 Subject: [PATCH 278/287] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c830f0f9ae1466a7e72c70bd6d44612ce8c507d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Mon, 28 Jul 2025 17:57:26 +0200 Subject: [PATCH 279/287] CI: Drop STI and use tmt instead Use 'discovery --how shell' for bash completion test as well, even though it contains metadata, to be same as all other migrated plans. Resolves: rhbz#2383041 [skip changelog] --- .fmf/version | 1 + plan.fmf | 104 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 97 -------------------------------------------- 3 files changed, 105 insertions(+), 97 deletions(-) create mode 100644 .fmf/version create mode 100644 plan.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..79f9d9c --- /dev/null +++ b/plan.fmf @@ -0,0 +1,104 @@ +execute: + how: tmt + +discover: + - name: tests_python + how: shell + url: https://src.fedoraproject.org/tests/python.git + tests: + - name: smoke36 + path: /smoke + test: VERSION=3.6 TOX=false ./venv.sh + - name: smoke39 + path: /smoke + test: VERSION=3.9 ./venv.sh + - name: smoke310 + path: /smoke + test: VERSION=3.10 ./venv.sh + - name: smoke311 + path: /smoke + test: VERSION=3.11 ./venv.sh + - name: smoke312 + path: /smoke + test: VERSION=3.12 ./venv.sh + - name: smoke313 + path: /smoke + test: VERSION=3.13 ./venv.sh + - name: smoke314 + path: /smoke + test: VERSION=3.14 ./venv.sh + - name: smoke39_virtualenv + path: /smoke + test: VERSION=3.9 METHOD=virtualenv ./venv.sh + - name: smoke310_virtualenv + path: /smoke + test: VERSION=3.10 METHOD=virtualenv ./venv.sh + - name: smoke311_virtualenv + path: /smoke + test: VERSION=3.11 METHOD=virtualenv ./venv.sh + - name: smoke312_virtualenv + path: /smoke + test: VERSION=3.12 METHOD=virtualenv ./venv.sh + - name: smoke313_virtualenv + path: /smoke + test: VERSION=3.13 METHOD=virtualenv ./venv.sh + - name: smoke314_virtualenv + path: /smoke + test: VERSION=3.14 METHOD=virtualenv ./venv.sh + - name: rpms_pyproject-rpm-macros + how: shell + url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git + tests: + - name: pyproject_pytest + path: /tests + test: ./mocktest.sh python-pytest + - name: pyproject_entrypoints + path: /tests + test: ./mocktest.sh python-entrypoints + - name: pyproject_pluggy + path: /tests + test: ./mocktest.sh python-pluggy + - name: pyproject_clikit + path: /tests + test: ./mocktest.sh python-clikit + - name: same_repo + how: shell + dist-git-source: true + dist-git-download-only: true + tests: + - name: mock_bootstrap_build + test: | + cd $TMT_SOURCE_DIR && + $TMT_TREE/../discover/rpms_pyproject-rpm-macros/tests/tests/mocktest.sh python-pip --without tests --without man + - name: pip_install_upgrade + path: /tests/pip_install_upgrade/ + test: ./runtest.sh + - name: bash_completion + path: /tests/bash_completion + test: ./pip_completion_full_test.sh +prepare: + - name: Install dependencies + how: install + package: + - gcc + - virtualenv + - python3.6 + - python3.9 + - python3.10-devel + - python3.11-devel + - python3.12-devel + - python3.13-devel + - python3.14-devel + - python3-devel + - python3-tox + - mock + - rpmdevtools + - rpm-build + - grep + - util-linux + - shadow-utils + - expect + - dnf + - name: Update packages + how: shell + script: dnf upgrade -y diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d1ff148..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -- hosts: localhost - tags: - - classic - pre_tasks: - - import_role: - name: standard-test-source - vars: - fetch_only: True - - roles: - - role: standard-test-basic - tags: - - classic - repositories: - - repo: "https://src.fedoraproject.org/tests/python.git" - dest: "python" - - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" - dest: "pyproject-rpm-macros" - tests: - - smoke36: - dir: python/smoke - run: VERSION=3.6 TOX=false ./venv.sh - - smoke39: - dir: python/smoke - run: VERSION=3.9 ./venv.sh - - smoke310: - dir: python/smoke - run: VERSION=3.10 ./venv.sh - - smoke311: - dir: python/smoke - run: VERSION=3.11 ./venv.sh - - smoke312: - dir: python/smoke - run: VERSION=3.12 ./venv.sh - - smoke313: - dir: python/smoke - run: VERSION=3.13 ./venv.sh - - smoke314: - dir: python/smoke - run: VERSION=3.14 ./venv.sh - - smoke39_virtualenv: - dir: python/smoke - run: VERSION=3.9 METHOD=virtualenv ./venv.sh - - smoke310_virtualenv: - dir: python/smoke - run: VERSION=3.10 METHOD=virtualenv ./venv.sh - - smoke311_virtualenv: - dir: python/smoke - run: VERSION=3.11 METHOD=virtualenv ./venv.sh - - smoke312_virtualenv: - dir: python/smoke - run: VERSION=3.12 METHOD=virtualenv ./venv.sh - - smoke313_virtualenv: - dir: python/smoke - run: VERSION=3.13 METHOD=virtualenv ./venv.sh - - smoke314_virtualenv: - dir: python/smoke - run: VERSION=3.14 METHOD=virtualenv ./venv.sh - - mock_bootstrap_build: - dir: . - run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without man - - pyproject_pytest: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pytest - - pyproject_entrypoints: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-entrypoints - - pyproject_pluggy: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pluggy - - pyproject_clikit: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-clikit - - pip_install_upgrade - - bash_completion: - dir: tests/bash_completion - run: ./pip_completion_full_test.sh - required_packages: - - gcc - - virtualenv - - python3.6 - - python3.9 - - python3.10-devel - - python3.11-devel - - python3.12-devel - - python3.13-devel - - python3.14-devel - - python3-devel - - python3-tox - - mock - - rpmdevtools - - rpm-build - - grep - - util-linux - - shadow-utils - - expect From 13d07e4daf7999d9be8595d9db9ddafd0af6479e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:23:19 +0200 Subject: [PATCH 280/287] Rebuilt for Python 3.14.0rc2 bytecode From 3a83d6ce5d289434a11516e18c5cee8dd0873449 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 7 Aug 2025 15:40:40 +0200 Subject: [PATCH 281/287] Update to 25.2 (rhbz#2385294) Drop nowarn-pip._internal.main.patch as the warning is no longer emitted via ensurepip in Fedora Pythons. --- downstream-remove-pytest-subket.patch | 54 +++++++++++++ dummy-certifi.patch | 49 +++--------- nowarn-pip._internal.main.patch | 79 ------------------- python-pip.spec | 43 +++++----- python3.14-file-urls.patch | 67 ---------------- ...existing-dist-only-if-path-conflicts.patch | 30 +++---- sources | 2 +- 7 files changed, 100 insertions(+), 224 deletions(-) create mode 100644 downstream-remove-pytest-subket.patch delete mode 100644 nowarn-pip._internal.main.patch delete mode 100644 python3.14-file-urls.patch diff --git a/downstream-remove-pytest-subket.patch b/downstream-remove-pytest-subket.patch new file mode 100644 index 0000000..564794c --- /dev/null +++ b/downstream-remove-pytest-subket.patch @@ -0,0 +1,54 @@ +From 35378ae02912d704d466e4809070e17a8d13ad0a Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Thu, 7 Aug 2025 15:05:34 +0200 +Subject: [PATCH] Downstream-Only: Remove pytest-subket from tests + +--- + tests/conftest.py | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index c98b871..ada7a7e 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -451,18 +451,6 @@ def coverage_install( + return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage") + + +-@pytest.fixture(scope="session") +-def socket_install(tmpdir_factory: pytest.TempPathFactory, common_wheels: Path) -> Path: +- lib_dir = _common_wheel_editable_install( +- tmpdir_factory, common_wheels, "pytest_subket" +- ) +- # pytest-subket is only included so it can intercept and block unexpected +- # network requests. It should NOT be visible to the pip under test. +- dist_info = next(lib_dir.glob("*.dist-info")) +- shutil.rmtree(dist_info) +- return lib_dir +- +- + def install_pth_link( + venv: VirtualEnvironment, project_name: str, lib_dir: Path + ) -> None: +@@ -480,7 +468,6 @@ def virtualenv_template( + setuptools_install: Path, + wheel_install: Path, + coverage_install: Path, +- socket_install: Path, + ) -> VirtualEnvironment: + venv_type: VirtualEnvironmentType + if request.config.getoption("--use-venv"): +@@ -495,10 +482,6 @@ def virtualenv_template( + # Install setuptools, wheel, pytest-subket, and pip. + install_pth_link(venv, "setuptools", setuptools_install) + install_pth_link(venv, "wheel", wheel_install) +- install_pth_link(venv, "pytest_subket", socket_install) +- # Also copy pytest-subket's .pth file so it can intercept socket calls. +- with open(venv.site / "pytest_socket.pth", "w") as f: +- f.write(socket_install.joinpath("pytest_socket.pth").read_text()) + + pth, dist_info = pip_editable_parts + +-- +2.50.1 + diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 01e8756..ce34415 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,17 +1,17 @@ -From 0741e5a665308184ddbd20900f92e4417204092f Mon Sep 17 00:00:00 2001 +From 7b5fbac83944e3a0dd975ff17b69358791b68721 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 27 Jun 2024 10:38:53 +0200 Subject: [PATCH] Dummy certifi patch --- - src/pip/_vendor/certifi/core.py | 110 ++------------------------------ - 1 file changed, 6 insertions(+), 104 deletions(-) + src/pip/_vendor/certifi/core.py | 80 +++------------------------------ + 1 file changed, 6 insertions(+), 74 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 70e0c3b..eaf4210 100644 +index 2f2f7e0..bec6595 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -4,111 +4,13 @@ certifi.py +@@ -4,80 +4,12 @@ certifi.py This module returns the installation location of cacert.pem or its contents. """ @@ -20,13 +20,13 @@ index 70e0c3b..eaf4210 100644 -def exit_cacert_ctx() -> None: - _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr] - +# The RPM-packaged certifi always uses the system certificates +def where() -> str: + return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem' --if sys.version_info >= (3, 11): +-if sys.version_info >= (3, 11): +- - from importlib.resources import as_file, files - - _CACERT_CTX = None @@ -60,7 +60,7 @@ index 70e0c3b..eaf4210 100644 - def contents() -> str: - return files("pip._vendor.certifi").joinpath("cacert.pem").read_text(encoding="ascii") - --elif sys.version_info >= (3, 7): +-else: - - from importlib.resources import path as get_path, read_text - @@ -95,40 +95,9 @@ index 70e0c3b..eaf4210 100644 - - def contents() -> str: - return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") -- --else: -- import os -- import types -- from typing import Union -- -- Package = Union[types.ModuleType, str] -- Resource = Union[str, "os.PathLike"] -- -- # This fallback will work for Python versions prior to 3.7 that lack the -- # importlib.resources module but relies on the existing `where` function -- # so won't address issues with environments like PyOxidizer that don't set -- # __file__ on modules. -- def read_text( -- package: Package, -- resource: Resource, -- encoding: str = 'utf-8', -- errors: str = 'strict' -- ) -> str: -- with open(where(), encoding=encoding) as data: -- return data.read() -- -- # If we don't have importlib.resources, then we will just do the old logic -- # of assuming we're on the filesystem and munge the path directly. -- def where() -> str: -- f = os.path.dirname(__file__) -- -- return os.path.join(f, "cacert.pem") -- -- def contents() -> str: -- return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") +def contents() -> str: + with open(where(), encoding='utf=8') as data: + return data.read() -- -2.45.1 +2.50.1 diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch deleted file mode 100644 index c8c98ed..0000000 --- a/nowarn-pip._internal.main.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 9d1e0a0e91cad143702b3a2d8c54bd765a5d9eb2 Mon Sep 17 00:00:00 2001 -From: Karolina Surma -Date: Thu, 27 Jun 2024 10:48:03 +0200 -Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint - -In Fedora, we use that in ensurepip and users cannot do anything about it, -this warning is juts moot. Also, the warning breaks CPython test suite. - -Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= ---- - src/pip/_internal/__init__.py | 2 +- - src/pip/_internal/utils/entrypoints.py | 19 ++++++++++--------- - tests/functional/test_cli.py | 3 ++- - 3 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 1a5b7f8..682b9e4 100755 ---- a/src/pip/_internal/__init__.py -+++ b/src/pip/_internal/__init__.py -@@ -15,4 +15,4 @@ def main(args: Optional[List[str]] = None) -> int: - """ - from pip._internal.utils.entrypoints import _wrapper - -- return _wrapper(args) -+ return _wrapper(args, _nowarn=True) -diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index 1501369..70034eb 100644 ---- a/src/pip/_internal/utils/entrypoints.py -+++ b/src/pip/_internal/utils/entrypoints.py -@@ -20,7 +20,7 @@ if WINDOWS: - ] - - --def _wrapper(args: Optional[List[str]] = None) -> int: -+def _wrapper(args: Optional[List[str]] = None, _nowarn: bool = False) -> int: - """Central wrapper for all old entrypoints. - - Historically pip has had several entrypoints defined. Because of issues -@@ -32,14 +32,15 @@ def _wrapper(args: Optional[List[str]] = None) -> int: - directing them to an appropriate place for help, we now define all of - our old entrypoints as wrappers for the current one. - """ -- sys.stderr.write( -- "WARNING: pip is being invoked by an old script wrapper. This will " -- "fail in a future version of pip.\n" -- "Please see https://github.com/pypa/pip/issues/5599 for advice on " -- "fixing the underlying issue.\n" -- "To avoid this problem you can invoke Python with '-m pip' instead of " -- "running pip directly.\n" -- ) -+ if not _nowarn: -+ sys.stderr.write( -+ "WARNING: pip is being invoked by an old script wrapper. This will " -+ "fail in a future version of pip.\n" -+ "Please see https://github.com/pypa/pip/issues/5599 for advice on " -+ "fixing the underlying issue.\n" -+ "To avoid this problem you can invoke Python with '-m pip' instead of " -+ "running pip directly.\n" -+ ) - return main(args) - - -diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index e1ccf04..30b8f74 100644 ---- a/tests/functional/test_cli.py -+++ b/tests/functional/test_cli.py -@@ -49,7 +49,8 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: - result = script.pip("-V") - result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) - assert result.stdout == result2.stdout -- assert "old script wrapper" in result2.stderr -+ if entrypoint[0] != "fake_pip = pip._internal:main": -+ assert "old script wrapper" in result2.stderr - - - @pytest.mark.parametrize( --- -2.45.1 - diff --git a/python-pip.spec b/python-pip.spec index cc3f013..fdea020 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.1.1 +%global base_version 25.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -36,7 +36,6 @@ Summary: A tool for installing and managing Python packages # truststore: MIT # tomli: MIT # tomli-w: MIT -# typing-extensions: Python-2.0.1 # urllib3: MIT License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) @@ -94,19 +93,15 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # The same patch is a part of the RPM-packaged python-certifi Patch: dummy-certifi.patch -# Don't warn the user about pip._internal.main() entrypoint -# In Fedora, we use that in ensurepip and users cannot do anything about it, -# this warning is juts moot. Also, the warning breaks CPython test suite. -Patch: nowarn-pip._internal.main.patch - -# Adjust path_to_url et al. to produce the same results on Python 3.14+ -# https://github.com/pypa/pip/pull/13423 -Patch: python3.14-file-urls.patch - # https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile # https://github.com/sethmlarson/truststore/pull/183 Patch: truststore-pem-path.patch +# pytest-subket has been introduced to intercept network calls +# https://github.com/pypa/pip/commit/a4b40f62332ccb3228b12cc5ae1493c75177247a +# We don't need a layer to check that, as we're by default in an offline environment +Patch: downstream-remove-pytest-subket.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s @@ -123,25 +118,24 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 -Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.3 +Provides: bundled(python%{1}dist(certifi)) = 2025.7.14 Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 -Provides: bundled(python%{1}dist(distlib)) = 0.3.9 +Provides: bundled(python%{1}dist(distlib)) = 0.4 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 -Provides: bundled(python%{1}dist(msgpack)) = 1.1 +Provides: bundled(python%{1}dist(msgpack)) = 1.1.1 Provides: bundled(python%{1}dist(packaging)) = 25 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.7 -Provides: bundled(python%{1}dist(pygments)) = 2.19.1 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.8 +Provides: bundled(python%{1}dist(pygments)) = 2.19.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 -Provides: bundled(python%{1}dist(requests)) = 2.32.3 -Provides: bundled(python%{1}dist(resolvelib)) = 1.1 -Provides: bundled(python%{1}dist(rich)) = 14 +Provides: bundled(python%{1}dist(requests)) = 2.32.4 +Provides: bundled(python%{1}dist(resolvelib)) = 1.2 +Provides: bundled(python%{1}dist(rich)) = 14.1 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.2.1 Provides: bundled(python%{1}dist(tomli-w)) = 1.2 Provides: bundled(python%{1}dist(truststore)) = 0.10.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.13.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } @@ -222,7 +216,10 @@ rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml # Remove unused test requirements -sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt +sed -Ei '/(pytest-(cov|xdist|rerunfailures|subket)|proxy\.py)/d' pyproject.toml + +# Remove unused pytest-subket options +sed -Ei '/(--disable-socket|--allow-unix-socket|--allow-hosts=localhost)/d' pyproject.toml %if %{with tests} # tests expect wheels in here @@ -235,7 +232,7 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels %generate_buildrequires # we only use this to generate test requires # the "pyproject" part is explicitly disabled as it generates a requirement on pip -%pyproject_buildrequires -N tests/requirements.txt +%pyproject_buildrequires -N -g test %endif diff --git a/python3.14-file-urls.patch b/python3.14-file-urls.patch deleted file mode 100644 index 77e89de..0000000 --- a/python3.14-file-urls.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 03b4b94a0338d80d1f45697a5ea083a5e5c937db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 12 Jun 2025 23:36:24 +0200 -Subject: [PATCH] Adjust path_to_url et al. to produce the same results on - Python 3.14+ - -See https://github.com/python/cpython/issues/125974 -and https://github.com/pypa/pip/pull/13138#issuecomment-2567715303 ---- - src/pip/_internal/models/link.py | 6 +++++- - src/pip/_internal/utils/urls.py | 2 +- - tests/unit/test_urls.py | 2 +- - 3 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/pip/_internal/models/link.py b/src/pip/_internal/models/link.py -index f0560f6..38423d1 100644 ---- a/src/pip/_internal/models/link.py -+++ b/src/pip/_internal/models/link.py -@@ -4,6 +4,7 @@ import logging - import os - import posixpath - import re -+import sys - import urllib.parse - from dataclasses import dataclass - from typing import ( -@@ -134,7 +135,10 @@ def _clean_file_url_path(part: str) -> str: - # should not be quoted. On Linux where drive letters do not - # exist, the colon should be quoted. We rely on urllib.request - # to do the right thing here. -- return urllib.request.pathname2url(urllib.request.url2pathname(part)) -+ ret = urllib.request.pathname2url(urllib.request.url2pathname(part)) -+ if sys.version_info >= (3, 14): -+ ret = ret.removeprefix("//") -+ return ret - - - # percent-encoded: / -diff --git a/src/pip/_internal/utils/urls.py b/src/pip/_internal/utils/urls.py -index 9f34f88..e951a5e 100644 ---- a/src/pip/_internal/utils/urls.py -+++ b/src/pip/_internal/utils/urls.py -@@ -12,7 +12,7 @@ def path_to_url(path: str) -> str: - quoted path parts. - """ - path = os.path.normpath(os.path.abspath(path)) -- url = urllib.parse.urljoin("file:", urllib.request.pathname2url(path)) -+ url = urllib.parse.urljoin("file://", urllib.request.pathname2url(path)) - return url - - -diff --git a/tests/unit/test_urls.py b/tests/unit/test_urls.py -index 0c14525..2a56e45 100644 ---- a/tests/unit/test_urls.py -+++ b/tests/unit/test_urls.py -@@ -11,7 +11,7 @@ from pip._internal.utils.urls import path_to_url, url_to_path - def test_path_to_url_unix() -> None: - assert path_to_url("/tmp/file") == "file:///tmp/file" - path = os.path.join(os.getcwd(), "file") -- assert path_to_url("file") == "file://" + urllib.request.pathname2url(path) -+ assert path_to_url("file") == "file://" + path - - - @pytest.mark.skipif("sys.platform != 'win32'") --- -2.49.0 - diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 20e5f28..d280f34 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,8 +1,11 @@ -From 9020f56e88a7dbaef688c147c281909f95b4e1d1 Mon Sep 17 00:00:00 2001 +From d5cb806a14bb50a96484bca6536e81f2ac316b9d Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install --upgrade is executed. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Resolves: rhbz#1550368 @@ -12,7 +15,6 @@ Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok Co-Authored-By: Karolina Surma - --- src/pip/_internal/metadata/base.py | 12 +++++++++++- src/pip/_internal/req/req_install.py | 2 +- @@ -21,10 +23,10 @@ Co-Authored-By: Karolina Surma 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py -index 9eabcdb..9816691 100644 +index 230e114..8bd5d31 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +@@ -23,7 +23,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name from pip._vendor.packaging.version import Version from pip._internal.exceptions import NoneMetadataError @@ -33,7 +35,7 @@ index 9eabcdb..9816691 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -578,6 +578,16 @@ class BaseDistribution(Protocol): +@@ -575,6 +575,16 @@ class BaseDistribution(Protocol): for extra in self._iter_egg_info_extras(): metadata["Provides-Extra"] = extra @@ -51,10 +53,10 @@ index 9eabcdb..9816691 100644 class BaseEnvironment: """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 2132785..0340890 100644 +index c9f6bff..c101826 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -449,7 +449,7 @@ class InstallRequirement: +@@ -453,7 +453,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -64,10 +66,10 @@ index 2132785..0340890 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 1dd0d70..414bdbe 100644 +index 33a4fdc..1fe886e 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -319,7 +319,9 @@ class Resolver(BaseResolver): +@@ -322,7 +322,9 @@ class Resolver(BaseResolver): # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. assert req.satisfied_by is not None @@ -79,19 +81,19 @@ index 1dd0d70..414bdbe 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 1f31d83..3804774 100644 +index f23e4cd..1bada79 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,6 +1,8 @@ +@@ -3,6 +3,8 @@ from __future__ import annotations import contextlib import functools import logging +import sys +import sysconfig + from collections.abc import Iterable, Iterator, Mapping, Sequence from typing import ( TYPE_CHECKING, - Callable, -@@ -617,6 +619,16 @@ class Factory: +@@ -615,6 +617,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -109,5 +111,5 @@ index 1f31d83..3804774 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.45.1 +2.50.1 diff --git a/sources b/sources index 4c3846d..7230ff9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc +SHA512 (pip-25.2.tar.gz) = 5cc65c9091fdda7905e26ce32ddaa3a1c2fd287d69fd3da67c814ba7e8e5be59301d8327c06cdca78c1b95f4a5b5f75c87f36a549022408cc0e8f9411c0db11e SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e From e2a1a1a9947c6f5b6ceff1148f2e32fe57249ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 27 Aug 2025 16:52:27 +0200 Subject: [PATCH 282/287] Include SBOM in the .whl file in python-pip-wheel --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index fdea020..91369d3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -287,8 +287,10 @@ sed -i -e "s/^\\(complete.*\\) pip%{python3_version}\$/\\1 pip%{python3_version} -e s/_pip_completion/_pip%{python3_version_nodots}_completion/ \ %{buildroot}%{bash_completions_dir}/pip%{python3_version} +# Install the built wheel and inject SBOM into it (if the macro is available) mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} +%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{python_wheel_dir}/%{python_wheel_name}} %check From 8ddd39d6cd1ba1ee38a8ee0e8a31a511807b2b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 10 Sep 2025 19:11:16 +0200 Subject: [PATCH 283/287] Security fix for the bundled urllib3 for CVE-2025-50181 --- python-pip.spec | 5 ++++ urllib3-CVE-2025-50181.patch | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 urllib3-CVE-2025-50181.patch diff --git a/python-pip.spec b/python-pip.spec index 91369d3..de7e8db 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -102,6 +102,11 @@ Patch: truststore-pem-path.patch # We don't need a layer to check that, as we're by default in an offline environment Patch: downstream-remove-pytest-subket.patch +# Patch for the bundled urllib3 for CVE-2025-50181 +# Redirects are not disabled when retries are disabled on PoolManager instantiation +# Upstream fix: https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857 +Patch: urllib3-CVE-2025-50181.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/urllib3-CVE-2025-50181.patch b/urllib3-CVE-2025-50181.patch new file mode 100644 index 0000000..05e6353 --- /dev/null +++ b/urllib3-CVE-2025-50181.patch @@ -0,0 +1,51 @@ +From b3d543d7e16af844394316360ef1bf0b9d10f1b1 Mon Sep 17 00:00:00 2001 +From: Illia Volochii +Date: Wed, 18 Jun 2025 16:25:01 +0300 +Subject: [PATCH] Security fix for CVE-2025-50181 + +Co-authored-by: Seth Michael Larson +Co-authored-by: Quentin Pradet +Co-authored-by: Seth Michael Larson +--- + src/pip/_vendor/urllib3/poolmanager.py | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_vendor/urllib3/poolmanager.py b/src/pip/_vendor/urllib3/poolmanager.py +index fb51bf7..a8de7c6 100644 +--- a/src/pip/_vendor/urllib3/poolmanager.py ++++ b/src/pip/_vendor/urllib3/poolmanager.py +@@ -170,6 +170,22 @@ class PoolManager(RequestMethods): + + def __init__(self, num_pools=10, headers=None, **connection_pool_kw): + RequestMethods.__init__(self, headers) ++ if "retries" in connection_pool_kw: ++ retries = connection_pool_kw["retries"] ++ if not isinstance(retries, Retry): ++ # When Retry is initialized, raise_on_redirect is based ++ # on a redirect boolean value. ++ # But requests made via a pool manager always set ++ # redirect to False, and raise_on_redirect always ends ++ # up being False consequently. ++ # Here we fix the issue by setting raise_on_redirect to ++ # a value needed by the pool manager without considering ++ # the redirect boolean. ++ raise_on_redirect = retries is not False ++ retries = Retry.from_int(retries, redirect=False) ++ retries.raise_on_redirect = raise_on_redirect ++ connection_pool_kw = connection_pool_kw.copy() ++ connection_pool_kw["retries"] = retries + self.connection_pool_kw = connection_pool_kw + self.pools = RecentlyUsedContainer(num_pools) + +@@ -389,7 +405,7 @@ class PoolManager(RequestMethods): + kw["body"] = None + kw["headers"] = HTTPHeaderDict(kw["headers"])._prepare_for_method_change() + +- retries = kw.get("retries") ++ retries = kw.get("retries", response.retries) + if not isinstance(retries, Retry): + retries = Retry.from_int(retries, redirect=redirect) + +-- +2.51.0 + From 566ed62a196ae263b08efb11f1389b83153876c6 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 13:59:29 +0200 Subject: [PATCH 284/287] Rebuilt for Python 3.14.0rc3 bytecode From 584939ebdd94304d085e21460ecb06063212713d Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 23 Oct 2025 15:14:18 +0200 Subject: [PATCH 285/287] CI: Run tests with Python 3.15 [skip changelog] --- plan.fmf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plan.fmf b/plan.fmf index 79f9d9c..b336d72 100644 --- a/plan.fmf +++ b/plan.fmf @@ -27,6 +27,9 @@ discover: - name: smoke314 path: /smoke test: VERSION=3.14 ./venv.sh + - name: smoke315 + path: /smoke + test: VERSION=3.15 ./venv.sh - name: smoke39_virtualenv path: /smoke test: VERSION=3.9 METHOD=virtualenv ./venv.sh @@ -45,6 +48,9 @@ discover: - name: smoke314_virtualenv path: /smoke test: VERSION=3.14 METHOD=virtualenv ./venv.sh + - name: smoke315_virtualenv + path: /smoke + test: VERSION=3.15 METHOD=virtualenv ./venv.sh - name: rpms_pyproject-rpm-macros how: shell url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git @@ -89,6 +95,7 @@ prepare: - python3.12-devel - python3.13-devel - python3.14-devel + - python3.15-devel - python3-devel - python3-tox - mock From 1f462a281f772282d8ade483860056f5175138c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 30 Nov 2025 10:13:45 +0100 Subject: [PATCH 286/287] CI: Ensure the devel subpackages for 3.6 and 3.9 are available See https://src.fedoraproject.org/rpms/python3.9/pull-request/213 and https://src.fedoraproject.org/rpms/python3.6/pull-request/153 [skip changelog] --- plan.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plan.fmf b/plan.fmf index b336d72..72ad07b 100644 --- a/plan.fmf +++ b/plan.fmf @@ -88,8 +88,8 @@ prepare: package: - gcc - virtualenv - - python3.6 - - python3.9 + - python3.6-devel + - python3.9-devel - python3.10-devel - python3.11-devel - python3.12-devel From 2b2a030e77e9665b23c9b6d0e415556ec1b73a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 28 Nov 2025 12:16:06 +0100 Subject: [PATCH 287/287] Update to 25.3 - Fixes: rhbz#2406299 --- python-pip.spec | 32 ++++++++++++++++---------------- sources | 3 ++- truststore-pem-path.patch | 26 -------------------------- 3 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 truststore-pem-path.patch diff --git a/python-pip.spec b/python-pip.spec index de7e8db..8dc0aff 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.2 +%global base_version 25.3 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -57,12 +57,16 @@ Source1: https://files.pythonhosted.org/packages/0d/6d/b4752b044bf94cb802 # See https://github.com/pypa/pip/pull/13382 as an attempt to drop the requirement from pip tests. Source2: https://files.pythonhosted.org/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl +# flit_core.whl +# This is not built as RPM-packaged wheel in Fedora at all. +Source3: https://files.pythonhosted.org/packages/f2/65/b6ba90634c984a4fcc02c7e3afe523fef500c4980fec67cc27536ee50acf/flit_core-3.12.0-py3-none-any.whl + # coverage.whl # There is no RPM-packaged python-coverage-wheel, the package is archful. # Upstream uses this to measure coverage, which we don't. # This is a dummy placeholder package that only contains empty coverage.process_startup(). # That way, we don't need to patch the usage out of conftest.py. -Source3: coverage-0-py3-none-any.whl +Source4: coverage-0-py3-none-any.whl BuildArch: noarch @@ -93,10 +97,6 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # The same patch is a part of the RPM-packaged python-certifi Patch: dummy-certifi.patch -# https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile -# https://github.com/sethmlarson/truststore/pull/183 -Patch: truststore-pem-path.patch - # pytest-subket has been introduced to intercept network calls # https://github.com/pypa/pip/commit/a4b40f62332ccb3228b12cc5ae1493c75177247a # We don't need a layer to check that, as we're by default in an offline environment @@ -124,23 +124,23 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.3 -Provides: bundled(python%{1}dist(certifi)) = 2025.7.14 +Provides: bundled(python%{1}dist(certifi)) = 2025.10.5 Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 Provides: bundled(python%{1}dist(distlib)) = 0.4 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 -Provides: bundled(python%{1}dist(msgpack)) = 1.1.1 +Provides: bundled(python%{1}dist(msgpack)) = 1.1.2 Provides: bundled(python%{1}dist(packaging)) = 25 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.8 +Provides: bundled(python%{1}dist(platformdirs)) = 4.5 Provides: bundled(python%{1}dist(pygments)) = 2.19.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 -Provides: bundled(python%{1}dist(requests)) = 2.32.4 -Provides: bundled(python%{1}dist(resolvelib)) = 1.2 -Provides: bundled(python%{1}dist(rich)) = 14.1 +Provides: bundled(python%{1}dist(requests)) = 2.32.5 +Provides: bundled(python%{1}dist(resolvelib)) = 1.2.1 +Provides: bundled(python%{1}dist(rich)) = 14.2 Provides: bundled(python%{1}dist(setuptools)) = 70.3 -Provides: bundled(python%{1}dist(tomli)) = 2.2.1 +Provides: bundled(python%{1}dist(tomli)) = 2.3 Provides: bundled(python%{1}dist(tomli-w)) = 1.2 -Provides: bundled(python%{1}dist(truststore)) = 0.10.1 +Provides: bundled(python%{1}dist(truststore)) = 0.10.4 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } @@ -175,7 +175,7 @@ BuildRequires: python%{python3_pkgversion}-devel # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: pyproject-rpm-macros -BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-flit-core BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates @@ -229,7 +229,7 @@ sed -Ei '/(--disable-socket|--allow-unix-socket|--allow-hosts=localhost)/d' pypr %if %{with tests} # tests expect wheels in here mkdir tests/data/common_wheels -cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels +cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} tests/data/common_wheels %endif diff --git a/sources b/sources index 7230ff9..48867fb 100644 --- a/sources +++ b/sources @@ -1,4 +1,5 @@ -SHA512 (pip-25.2.tar.gz) = 5cc65c9091fdda7905e26ce32ddaa3a1c2fd287d69fd3da67c814ba7e8e5be59301d8327c06cdca78c1b95f4a5b5f75c87f36a549022408cc0e8f9411c0db11e +SHA512 (pip-25.3.tar.gz) = f50db092213ec3bb819d3da5669f73d119b5ec7f7ac5e8a587a17c27eafa32bc17a057df09389c526a3769ef3577f5553187d54ceffa89aed63f4b4498ff044e SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d +SHA512 (flit_core-3.12.0-py3-none-any.whl) = 790c12b1f43201e365fb3f8f2f0a54e1a578876799dfdf8bfeea679a25ea096bf62946d006618c1458ae6e37ce6d00998f37e9aba426d5ab80d32ef2d75da4e0 SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e diff --git a/truststore-pem-path.patch b/truststore-pem-path.patch deleted file mode 100644 index f771a33..0000000 --- a/truststore-pem-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2c8231f03987daaf9524f9568884a7b296480b32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 17 Jul 2025 09:50:35 +0200 -Subject: [PATCH] Fedora 43 removes some symbolic links - -See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile ---- - src/pip/_vendor/truststore/_openssl.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/pip/_vendor/truststore/_openssl.py b/src/pip/_vendor/truststore/_openssl.py -index 9951cf7..3e25a56 100644 ---- a/src/pip/_vendor/truststore/_openssl.py -+++ b/src/pip/_vendor/truststore/_openssl.py -@@ -6,8 +6,10 @@ - - # candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes - _CA_FILE_CANDIDATES = [ -- # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD -+ # Alpine, Arch, Fedora 34-42, OpenWRT, RHEL 9-10, BSD - "/etc/ssl/cert.pem", -+ # Fedora 43+, RHEL 11+ -+ "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", - # Fedora <= 34, RHEL <= 9, CentOS <= 9 - "/etc/pki/tls/cert.pem", - # Debian, Ubuntu (requires ca-certificates)