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 001/264] 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 a89d58b356be1850c98ef30f6beef5cd20274d2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Sat, 7 Jun 2014 15:25:12 +0200
Subject: [PATCH 002/264] Make this for Python 3.5 only
---
python-pip.spec | 98 +++++++++----------------------------------------
1 file changed, 17 insertions(+), 81 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index e6d032e..96d785a 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,23 +1,14 @@
-%if (! 0%{?rhel}) || 0%{?rhel} > 6
-%global with_python3 1
-%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())")}
-%endif
+%global build_wheel 0
%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
+%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
%endif
-Name: python-%{srcname}
+Name: python35-%{srcname}
Version: 1.5.6
Release: 1%{?dist}
-Summary: A tool for installing and managing Python packages
+Summary: A tool for installing and managing Python 3 packages
Group: Development/Libraries
License: MIT
@@ -27,13 +18,13 @@ 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
+BuildRequires: python35-devel
+BuildRequires: python35-setuptools
%if 0%{?build_wheel}
-BuildRequires: python-pip
-BuildRequires: python-wheel
+BuildRequires: python35-pip
+BuildRequires: python35-wheel
%endif
-Requires: python-setuptools
+Requires: python35-setuptools
%description
Pip is a replacement for `easy_install
@@ -41,27 +32,6 @@ Pip is a replacement for `easy_install
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
-
-%if 0%{?with_python3}
-%package -n python3-pip
-Summary: A tool for installing and managing Python3 packages
-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
-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}
@@ -69,50 +39,25 @@ easy_installable should be pip-installable as well.
%{__sed} -i '1d' pip/__init__.py
-%if 0%{?with_python3}
-cp -a . %{py3dir}
-%endif # with_python3
-
-
%build
%if 0%{?build_wheel}
-%{__python} setup.py bdist_wheel
+%{__python35} setup.py bdist_wheel
%else
-%{__python} setup.py build
+%{__python35} 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
-
%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}
-# 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)
+%else
+%{__python35} setup.py install --skip-build --root %{buildroot}
+%endif
+
rm %{buildroot}%{_bindir}/pip
-%else
-%{__python3} setup.py install --skip-build --root %{buildroot}
-%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}
-%endif
-
+rm %{buildroot}%{_bindir}/pip3
%clean
%{__rm} -rf %{buildroot}
@@ -123,17 +68,8 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst docs
-%attr(755,root,root) %{_bindir}/pip
-%attr(755,root,root) %{_bindir}/pip2*
-%{python_sitelib}/pip*
-
-%if 0%{?with_python3}
-%files -n python3-pip
-%defattr(-,root,root,-)
-%doc LICENSE.txt README.rst docs
%attr(755,root,root) %{_bindir}/pip3*
-%{python3_sitelib}/pip*
-%endif # with_python3
+%{python35_sitelib}/pip*
%changelog
* Sun May 25 2014 Matej Stuchlik - 1.5.6-1
From 9786f82445fef0241e727ae5e305eba0e79e6bf8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Sat, 7 Jun 2014 16:18:32 +0200
Subject: [PATCH 003/264] Python nightly build bootstraping
---
python-pip.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 96d785a..4fa3a8f 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,4 +1,4 @@
-%global build_wheel 0
+%global build_wheel 1
%global srcname pip
%if 0%{?build_wheel}
@@ -7,7 +7,7 @@
Name: python35-%{srcname}
Version: 1.5.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A tool for installing and managing Python 3 packages
Group: Development/Libraries
@@ -51,7 +51,7 @@ easy_installable should be pip-installable as well.
%{__rm} -rf %{buildroot}
%if 0%{?build_wheel}
-pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
+pip3.5 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
%else
%{__python35} setup.py install --skip-build --root %{buildroot}
%endif
@@ -72,6 +72,9 @@ rm %{buildroot}%{_bindir}/pip3
%{python35_sitelib}/pip*
%changelog
+* Sat Jun 07 2014 Miro Hrončok - 1.5.6-2
+- Bootstraping
+
* Sun May 25 2014 Matej Stuchlik - 1.5.6-1
- Update to 1.5.6
From 0771ae659ccd4cfc2ed929e8f1476b01c5e31537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Sat, 7 Jun 2014 17:21:04 +0200
Subject: [PATCH 004/264] Allow nighly rebuilds of pip as well
---
python-pip.spec | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 4fa3a8f..a1752cb 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -6,14 +6,14 @@
%endif
Name: python35-%{srcname}
-Version: 1.5.6
-Release: 2%{?dist}
+Version: 1.6
+Release: 0.1.20140607git3eaea35f%{?dist}
Summary: A tool for installing and managing Python 3 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: python3-nightly-pip-3eaea35f.tar
Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -33,7 +33,7 @@ same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
%prep
-%setup -q -n %{srcname}-%{version}
+%setup -q -n python3-nightly-%{srcname}
%patch0 -p1
@@ -72,6 +72,9 @@ rm %{buildroot}%{_bindir}/pip3
%{python35_sitelib}/pip*
%changelog
+* Sat Jun 07 2014 Miro Hrončok - 1.6-0.1.20140607git3eaea35f
+- Update to git: 3eaea35f
+
* Sat Jun 07 2014 Miro Hrončok - 1.5.6-2
- Bootstraping
@@ -150,7 +153,7 @@ rm %{buildroot}%{_bindir}/pip3
* 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 61ab0cd65d95f0782ec319f689f448dc9dd60c16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Sat, 7 Jun 2014 18:18:53 +0200
Subject: [PATCH 005/264] Update the patch to git version
---
...pping-prefix-from-wheel-RECORD-files.patch | 48 ++++++++-----------
python-pip.spec | 2 +-
2 files changed, 22 insertions(+), 28 deletions(-)
rename pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch => pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch (69%)
diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
similarity index 69%
rename from pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
rename to pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
index f2e8487..0d12952 100644
--- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
+++ b/pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
@@ -1,15 +1,14 @@
-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
+index 20b54b9..b421d1b 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.")
+@@ -132,6 +132,14 @@ class InstallCommand(Command):
+ "directory.")
cmd_opts.add_option(
+ '--strip-file-prefix',
@@ -23,24 +22,19 @@ 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)
+@@ -311,6 +319,7 @@ class InstallCommand(Command):
+ 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'))
+diff --git a/pip/req/req_install.py b/pip/req/req_install.py
+index 6ec2a42..ac2f213 100644
+--- a/pip/req/req_install.py
++++ b/pip/req/req_install.py
+@@ -709,7 +709,7 @@ exec(compile(
name = name.replace(os.path.sep, '/')
return name
@@ -49,7 +43,7 @@ index 3ae306d..c171130 100644
if self.editable:
self.install_editable(install_options, global_options)
return
- if self.is_wheel:
+@@ -717,7 +717,11 @@ exec(compile(
version = pip.wheel.wheel_version(self.source_dir)
pip.wheel.check_compatibility(version, self.name)
@@ -62,9 +56,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
+@@ -912,13 +916,14 @@ exec(compile(
+ 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):
@@ -79,10 +73,10 @@ index 3ae306d..c171130 100644
@property
diff --git a/pip/wheel.py b/pip/wheel.py
-index fa3e270..3a366d0 100644
+index 2d4f4df..78a99e9 100644
--- a/pip/wheel.py
+++ b/pip/wheel.py
-@@ -136,7 +136,7 @@ def get_entrypoints(filename):
+@@ -127,7 +127,7 @@ def get_entrypoints(filename):
def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
@@ -91,7 +85,7 @@ index fa3e270..3a366d0 100644
"""Install a wheel"""
if not scheme:
-@@ -357,6 +357,8 @@ if __name__ == '__main__':
+@@ -365,6 +365,8 @@ if __name__ == '__main__':
writer.writerow(row)
for f in generated:
h, l = rehash(f)
diff --git a/python-pip.spec b/python-pip.spec
index a1752cb..c8d5524 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -14,7 +14,7 @@ Group: Development/Libraries
License: MIT
URL: http://www.pip-installer.org
Source0: python3-nightly-pip-3eaea35f.tar
-Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
+Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
From 4425f8db4acd9beedbc716746c33d24fd225eb98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Sat, 7 Jun 2014 18:21:36 +0200
Subject: [PATCH 006/264] Be less sctrict in wheel version in filename
---
python-pip.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python-pip.spec b/python-pip.spec
index c8d5524..78459e9 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -2,7 +2,7 @@
%global srcname pip
%if 0%{?build_wheel}
-%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
+%global python3_wheelname %{srcname}-*-py2.py3-none-any.whl
%endif
Name: python35-%{srcname}
From e24e478a400f5558642e3e29a50b4ad716bff9d3 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore
Date: Sat, 7 Jun 2014 17:05:22 -0500
Subject: [PATCH 007/264] - 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 5e67d56d2d8918f02945d8f53f7e709d9025b9bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Fri, 27 Jun 2014 19:46:57 +0200
Subject: [PATCH 008/264] SCL
---
python-pip.spec | 140 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 111 insertions(+), 29 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 78459e9..4ef3848 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,30 +1,42 @@
-%global build_wheel 1
+%global with_python2 0
+%global with_python3 1
+%global build_wheel 0
%global srcname pip
+
+%{?scl:%scl_package python-%{srcname}}
+%{!?scl:%global pkg_name %{name}}
+%{?scl:%global py3dir %{_builddir}/python3-%{name}-%{version}-%{release}}
+
%if 0%{?build_wheel}
-%global python3_wheelname %{srcname}-*-py2.py3-none-any.whl
+%global python2_wheelname %{srcname}-*-py2.py3-none-any.whl
+%if 0%{?with_python3}
+%global python3_wheelname %python2_wheelname
+%endif
%endif
-Name: python35-%{srcname}
+Name: %{?scl_prefix}python-%{srcname}
Version: 1.6
-Release: 0.1.20140607git3eaea35f%{?dist}
-Summary: A tool for installing and managing Python 3 packages
+Release: 0.3.20140626gitbb6c11ed%{?dist}
+Summary: A tool for installing and managing Python packages
Group: Development/Libraries
License: MIT
URL: http://www.pip-installer.org
-Source0: python3-nightly-pip-3eaea35f.tar
+Source0: python3-nightly-pip-bb6c11ed.tar
Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: python35-devel
-BuildRequires: python35-setuptools
+%if 0%{?with_python2}
+BuildRequires: python-devel
+BuildRequires: python-setuptools
%if 0%{?build_wheel}
-BuildRequires: python35-pip
-BuildRequires: python35-wheel
+BuildRequires: python-pip
+BuildRequires: python-wheel
%endif
-Requires: python35-setuptools
+Requires: python-setuptools
+%endif # with_python2
%description
Pip is a replacement for `easy_install
@@ -32,6 +44,27 @@ Pip is a replacement for `easy_install
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
+
+%if 0%{?with_python3}
+%package -n %{?scl_prefix}python3-%{srcname}
+Summary: A tool for installing and managing Python3 packages
+Group: Development/Libraries
+
+BuildRequires: %{?scl_prefix}python3-devel
+BuildRequires: %{?scl_prefix}python3-setuptools
+%if 0%{?build_wheel}
+BuildRequires: %{?scl_prefix}python3-pip
+BuildRequires: %{?scl_prefix}python3-wheel
+%endif
+Requires: %{?scl_prefix}python3-setuptools
+
+%description -n %{?scl_prefix}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 python3-nightly-%{srcname}
@@ -39,25 +72,60 @@ easy_installable should be pip-installable as well.
%{__sed} -i '1d' pip/__init__.py
-%build
-%if 0%{?build_wheel}
-%{__python35} setup.py bdist_wheel
-%else
-%{__python35} setup.py build
-%endif
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif # with_python3
+%build
+%{?scl:scl enable %scl - << \EOF}
+%if 0%{?with_python2}
+%if 0%{?build_wheel}
+%{__python2} setup.py bdist_wheel
+%else
+%{__python2} setup.py build
+%endif
+%endif # with_python2
+
+%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
+%{?scl:EOF}
+
%install
%{__rm} -rf %{buildroot}
+%{?scl:scl enable %scl - << \EOF}
+%if 0%{?with_python3}
+pushd %{py3dir}
%if 0%{?build_wheel}
-pip3.5 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
-%else
-%{__python35} setup.py install --skip-build --root %{buildroot}
-%endif
+pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
+%if 0%{?with_python2}
+# 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
-rm %{buildroot}%{_bindir}/pip3
+%endif # with_python2
+
+%else
+%{__python3} setup.py install --skip-build --root %{buildroot}
+%endif
+%endif # with_python3
+
+%if 0%{?with_python2}
+%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}
+%endif
+%endif # with_python2
+%{?scl:EOF}
%clean
%{__rm} -rf %{buildroot}
@@ -65,18 +133,32 @@ rm %{buildroot}%{_bindir}/pip3
# unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in
# fedora yet. Once it is, check can be implemented
+%if 0%{?with_python2}
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst docs
+%attr(755,root,root) %{_bindir}/pip
+%attr(755,root,root) %{_bindir}/pip2*
+%{python_sitelib}/pip*
+%endif # with_python2
+
+%if 0%{?with_python3}
+%files -n %{?scl_prefix}python3-%{srcname}
+%defattr(-,root,root,-)
+%doc LICENSE.txt README.rst docs
%attr(755,root,root) %{_bindir}/pip3*
-%{python35_sitelib}/pip*
+%{python3_sitelib}/pip*
+
+%if ! 0%{?with_python2}
+%attr(755,root,root) %{_bindir}/pip
+%endif # ! with_python2
+
+%endif # with_python3
%changelog
-* Sat Jun 07 2014 Miro Hrončok - 1.6-0.1.20140607git3eaea35f
-- Update to git: 3eaea35f
-
-* Sat Jun 07 2014 Miro Hrončok - 1.5.6-2
-- Bootstraping
+* Thu Jun 26 2014 Miro Hrončok - 1.6-0.3.20140626gitbb6c11ed
+- Update to git: bb6c11ed
+- SCL
* Sun May 25 2014 Matej Stuchlik - 1.5.6-1
- Update to 1.5.6
@@ -153,7 +235,7 @@ rm %{buildroot}%{_bindir}/pip3
* 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 6aae47b6a06b5b79347b888d7f0410d7046d6a75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Fri, 27 Jun 2014 21:13:22 +0200
Subject: [PATCH 009/264] Bootstrapping
---
python-pip.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 4ef3848..46e52c3 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,6 +1,6 @@
%global with_python2 0
%global with_python3 1
-%global build_wheel 0
+%global build_wheel 1
%global srcname pip
@@ -17,7 +17,7 @@
Name: %{?scl_prefix}python-%{srcname}
Version: 1.6
-Release: 0.3.20140626gitbb6c11ed%{?dist}
+Release: 0.4.20140626gitbb6c11ed%{?dist}
Summary: A tool for installing and managing Python packages
Group: Development/Libraries
@@ -156,6 +156,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
%endif # with_python3
%changelog
+* Fri Jun 27 2014 Miro Hrončok - 1.6-0.4.20140626gitbb6c11ed
+- Bootstrap
+
* Thu Jun 26 2014 Miro Hrončok - 1.6-0.3.20140626gitbb6c11ed
- Update to git: bb6c11ed
- SCL
From 90a19b96ca6d27a476fc198d659bf21da25abf1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Tue, 1 Jul 2014 12:16:00 +0200
Subject: [PATCH 010/264] dgroc bump
---
python-pip.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 46e52c3..2e69921 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -17,13 +17,13 @@
Name: %{?scl_prefix}python-%{srcname}
Version: 1.6
-Release: 0.4.20140626gitbb6c11ed%{?dist}
+Release: 0.5.20140701git6410ba43%{?dist}
Summary: A tool for installing and managing Python packages
Group: Development/Libraries
License: MIT
URL: http://www.pip-installer.org
-Source0: python3-nightly-pip-bb6c11ed.tar
+Source0: python3-nightly-pip-6410ba43.tar
Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -156,6 +156,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
%endif # with_python3
%changelog
+* Tue Jul 01 2014 Miro Hrončok - 1.6-0.5.20140701git6410ba43
+- Update to git: 6410ba43
+
* Fri Jun 27 2014 Miro Hrončok - 1.6-0.4.20140626gitbb6c11ed
- Bootstrap
@@ -238,7 +241,7 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
* 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 f61b997d2f21b976e1d5457ca4ad342f0cd41d5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Wed, 2 Jul 2014 00:02:52 +0200
Subject: [PATCH 011/264] dgroc bump
---
python-pip.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/python-pip.spec b/python-pip.spec
index 2e69921..19b0dc8 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -17,13 +17,13 @@
Name: %{?scl_prefix}python-%{srcname}
Version: 1.6
-Release: 0.5.20140701git6410ba43%{?dist}
+Release: 0.6.20140702gitc720ca67%{?dist}
Summary: A tool for installing and managing Python packages
Group: Development/Libraries
License: MIT
URL: http://www.pip-installer.org
-Source0: python3-nightly-pip-6410ba43.tar
+Source0: python3-nightly-pip-c720ca67.tar
Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -156,6 +156,9 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
%endif # with_python3
%changelog
+* Wed Jul 02 2014 Miro Hrončok - 1.6-0.6.20140702gitc720ca67
+- Update to git: c720ca67
+
* Tue Jul 01 2014 Miro Hrončok - 1.6-0.5.20140701git6410ba43
- Update to git: 6410ba43
From a7c7b123d7d980c2f73096b9956f78c629fc301b Mon Sep 17 00:00:00 2001
From: Matej Stuchlik
Date: Tue, 18 Nov 2014 13:49:10 +0100
Subject: [PATCH 012/264] 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 013/264] 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 014/264] 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 015/264] 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 016/264] 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 017/264] - 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 018/264] 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 019/264] 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 020/264] 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 021/264] 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 022/264] 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 023/264] - 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 024/264] 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 025/264] 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 026/264] 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 027/264] 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 028/264] -
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 029/264] 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 030/264] 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 031/264] 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 032/264] 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 033/264] 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 034/264] 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 035/264] 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 036/264] 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 037/264] 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 038/264] 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 039/264] - 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 040/264] 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 041/264] 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 042/264] 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 043/264] 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 044/264] 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 045/264] - 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 046/264] 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 047/264] 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 048/264] 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 049/264] 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 050/264] 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 051/264] 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 052/264] 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 053/264] - 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 054/264] 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 055/264] 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 056/264] 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 057/264] 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 058/264] 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 059/264] 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 060/264] 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 061/264] 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 062/264] - 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 063/264] 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 064/264] 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 065/264] 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 066/264] 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 067/264] 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 068/264] 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 069/264] 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 070/264] 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 071/264] 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 072/264] 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 073/264] 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 074/264] 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 075/264] - 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 076/264] 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 077/264] 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 078/264] 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 079/264] 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 080/264] 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 081/264] 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 082/264] 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 083/264] 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 084/264] 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 085/264] 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 086/264] 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