From dc8ba54d852ff18134d2a3f778fee450a7449c4d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 21 Nov 2016 11:41:10 -0700 Subject: [PATCH 01/10] Build without wheel --- python-pip.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e2c1e3f..5464dc5 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 @@ -64,7 +64,7 @@ BuildRequires: python-virtualenv %endif %if 0%{?build_wheel} BuildRequires: python2-pip -BuildRequires: python-wheel +BuildRequires: python2-wheel %endif Requires: python-setuptools %{?python_provide:%python_provide python2-%{srcname}} @@ -230,6 +230,7 @@ py.test-%{python3_version} -m 'not network' - Enable EPEL Python 3 builds - Use new python macros - Cleanup spec +- Without wheel * Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 - Updated the test sources From 50953dcc781672082b8cf27bbd19632474c67acd Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 17 Mar 2017 11:49:42 +0100 Subject: [PATCH 02/10] Added Patch 1: Fix `pip install` failure in FIPS mode (rhbz#1430774) --- Fix-pip-install-in-FIPS-mode.patch | 29 +++++++++++++++++++++++++++++ python-pip.spec | 11 ++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Fix-pip-install-in-FIPS-mode.patch diff --git a/Fix-pip-install-in-FIPS-mode.patch b/Fix-pip-install-in-FIPS-mode.patch new file mode 100644 index 0000000..0054e4f --- /dev/null +++ b/Fix-pip-install-in-FIPS-mode.patch @@ -0,0 +1,29 @@ +From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Fri, 17 Mar 2017 13:14:56 +0100 +Subject: [PATCH] Fix `pip install` in FIPS mode + +Resolves: rhbz#1430774 +--- + pip/utils/hashes.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py +index 9602970..c6d7524 100644 +--- a/pip/utils/hashes.py ++++ b/pip/utils/hashes.py +@@ -39,7 +39,10 @@ class Hashes(object): + gots = {} + for hash_name in iterkeys(self._allowed): + try: +- gots[hash_name] = hashlib.new(hash_name) ++ if hash_name == 'md5': ++ gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False) ++ else: ++ gots[hash_name] = hashlib.new(hash_name) + except (ValueError, TypeError): + raise InstallationError('Unknown hash name: %s' % hash_name) + +-- +2.11.0 + diff --git a/python-pip.spec b/python-pip.spec index 5464dc5..a3e36bd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -39,6 +39,10 @@ Source1: pip-8.1.2-tests.tar.gz # https://github.com/pypa/pip/issues/1351 Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch +# Fix `pip install` failure in FIPS mode +# Resolves: rhbz#1430774 +Patch1: Fix-pip-install-in-FIPS-mode.patch + %description Pip is a replacement for `easy_install `_. It uses mostly the @@ -115,6 +119,7 @@ tar -xf %{SOURCE1} %endif %patch0 -p1 +%patch1 -p1 sed -i '1d' pip/__init__.py @@ -226,6 +231,10 @@ py.test-%{python3_version} -m 'not network' %endif # with_python3 %changelog +* Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 +- Added Patch 1: Fix `pip install` failure in FIPS mode +Resolves: rhbz#1430774 + * Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 - Enable EPEL Python 3 builds - Use new python macros From e399cdb219d2285e0b54e42992b81f32cccc8501 Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 10 Jan 2019 14:05:33 -0600 Subject: [PATCH 03/10] Simplify bash-completion just for EL7 --- python-pip.spec | 48 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a3e36bd..e257be8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -10,14 +10,9 @@ %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: 8.1.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -87,7 +82,6 @@ Group: Development/Libraries BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: bash-completion %if 0%{?with_tests} BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest @@ -158,14 +152,14 @@ rm %{buildroot}%{_bindir}/pip %py2_install %endif -mkdir -p %{buildroot}%{bashcompdir} +mkdir -p %{buildroot}%{bash_completion_dir} PYTHONPATH=%{buildroot}%{python_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bashcompdir}/pip + > %{buildroot}%{bash_completion_dir}/pip %if 0%{?with_python3} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip3 completion --bash \ - > %{buildroot}%{bashcompdir}/pip3 + > %{buildroot}%{bash_completion_dir}/pip3 %endif pips2=pip pips3=pip3 @@ -174,16 +168,12 @@ for pip in %{buildroot}%{_bindir}/pip*; do case $pip in pip2*) pips2="$pips2 $pip" -%if 0%{?bashcomp2} - ln -s pip %{buildroot}%{bashcompdir}/$pip -%endif + ln -s pip %{buildroot}%{bash_completion_dir}/$pip ;; %if 0%{?with_python3} pip3?*) pips3="$pips3 $pip" -%if 0%{?bashcomp2} - ln -s pip3 %{buildroot}%{bashcompdir}/$pip -%endif + ln -s pip3 %{buildroot}%{bash_completion_dir}/$pip ;; %endif esac @@ -191,10 +181,10 @@ done %if 0%{?with_python3} sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bashcompdir}/pip3 + %{buildroot}%{bash_completion_dir}/pip3 %endif sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ - %{buildroot}%{bashcompdir}/pip + %{buildroot}%{bash_completion_dir}/pip %if 0%{?with_tests} %check @@ -209,12 +199,12 @@ py.test-%{python3_version} -m 'not network' %attr(755,root,root) %{_bindir}/pip %attr(755,root,root) %{_bindir}/pip2* %{python_sitelib}/pip* -%{bashcompdir} +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir} %if 0%{?with_python3} -%exclude %{bashcompdir}/pip3* -%endif -%if 0%{?bashcomp2} -%dir %(dirname %{bashcompdir}) +%exclude %{bash_completion_dir}/pip3 +%exclude %{bash_completion_dir}/pip%{python3_version} %endif %if 0%{?with_python3} @@ -223,14 +213,16 @@ py.test-%{python3_version} -m 'not network' %doc README.rst docs %attr(755,root,root) %{_bindir}/pip3* %{python3_sitelib}/pip* -%dir %{bashcompdir} -%{bashcompdir}/pip3* -%if 0%{?bashcomp2} -%dir %(dirname %{bashcompdir}) -%endif +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir}/pip3 +%{bash_completion_dir}/pip%{python3_version} %endif # with_python3 %changelog +* Thu Jan 10 2019 Carl George - 8.1.2-7 +- Simplify bash-completion just for EL7 + * Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 - Added Patch 1: Fix `pip install` failure in FIPS mode Resolves: rhbz#1430774 From 0c2cbb216dffdf9d18500aa03b77886aa27a9bbe Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 10 Jan 2019 14:09:55 -0600 Subject: [PATCH 04/10] Be more explicit in %files --- python-pip.spec | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e257be8..13a0bed 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -196,23 +196,25 @@ 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* -%{python_sitelib}/pip* +%{_bindir}/pip +%{_bindir}/pip2 +%{_bindir}/pip%{python2_version} +%{python_sitelib}/pip +%{python_sitelib}/pip-%{version}-py%{python2_version}.egg-info %dir %{_datadir}/bash-completion %dir %{bash_completion_dir} -%{bash_completion_dir} -%if 0%{?with_python3} -%exclude %{bash_completion_dir}/pip3 -%exclude %{bash_completion_dir}/pip%{python3_version} -%endif +%{bash_completion_dir}/pip +%{bash_completion_dir}/pip2 +%{bash_completion_dir}/pip%{python2_version} %if 0%{?with_python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst docs -%attr(755,root,root) %{_bindir}/pip3* -%{python3_sitelib}/pip* +%{_bindir}/pip3 +%{_bindir}/pip%{python3_version} +%{python3_sitelib}/pip +%{python3_sitelib}/pip-%{version}-py%{python3_version}.egg-info %dir %{_datadir}/bash-completion %dir %{bash_completion_dir} %{bash_completion_dir}/pip3 From 9465a963c315693c1b114815d8dc829ac13fff72 Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 10 Jan 2019 14:47:54 -0600 Subject: [PATCH 05/10] Add python36 subpackage --- python-pip.spec | 59 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 13a0bed..27e57a5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,4 +1,7 @@ %global with_python3 1 +# python34 and python36 will share a bash-completion file, so don't try to +# enable with_python3_other without with_python3. +%global with_python3_other 1 %global build_wheel 0 %global with_tests 0 @@ -95,7 +98,7 @@ BuildRequires: python%{python3_pkgversion}-virtualenv BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %endif -Requires: python%{python3_pkgversion}-setuptools +Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} @@ -106,6 +109,34 @@ easy_installable should be pip-installable as well. %endif # with_python3 +%if 0%{?with_python3} +%package -n python%{python3_other_pkgversion}-%{srcname} +Summary: A tool for installing and managing Python3 packages +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%if 0%{?with_tests} +BuildRequires: python%{python3_other_pkgversion}-mock +BuildRequires: python%{python3_other_pkgversion}-pytest +BuildRequires: python%{python3_other_pkgversion}-pretend +BuildRequires: python%{python3_other_pkgversion}-freezegun +BuildRequires: python%{python3_other_pkgversion}-pytest-capturelog +BuildRequires: python%{python3_other_pkgversion}-scripttest +BuildRequires: python%{python3_other_pkgversion}-virtualenv +%endif +%if 0%{?build_wheel} +BuildRequires: python%{python3_other_pkgversion}-pip +BuildRequires: python%{python3_other_pkgversion}-wheel +%endif +Requires: python%{python3_other_pkgversion}-setuptools + +%description -n python%{python3_other_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. +%endif # with_python3_other + + %prep %setup -q -n %{srcname}-%{version} %if 0%{?with_tests} @@ -127,8 +158,10 @@ sed -i '1d' pip/__init__.py %if 0%{?with_python3} %if 0%{?build_wheel} +%{?with_python3_other:%py3_other_build_wheel} %py3_build_wheel %else +%{?with_python3_other:%py3_other_build} %py3_build %endif %endif # with_python3 @@ -137,11 +170,18 @@ sed -i '1d' pip/__init__.py %install %if 0%{?with_python3} %if 0%{?build_wheel} +%if 0%{?with_python3_other} +%py3_other_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{,3} +%endif # with_python3_other %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 +%{?with_python3_other:%py3_other_install} %py3_install %endif %endif # with_python3 @@ -189,7 +229,8 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ %if 0%{?with_tests} %check py.test -m 'not network' -py.test-%{python3_version} -m 'not network' +%{?with_python3:py.test-%{python3_version} -m 'not network'} +%{?with_python3_other:py.test-%{python3_other_version} -m 'not network'} %endif @@ -221,9 +262,23 @@ py.test-%{python3_version} -m 'not network' %{bash_completion_dir}/pip%{python3_version} %endif # with_python3 +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-%{srcname} +%license LICENSE.txt +%doc README.rst docs +%{_bindir}/pip%{python3_other_version} +%{python3_other_sitelib}/pip +%{python3_other_sitelib}/pip-%{version}-py%{python3_other_version}.egg-info +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir}/pip3 +%{bash_completion_dir}/pip%{python3_other_version} +%endif # with_python3_other + %changelog * Thu Jan 10 2019 Carl George - 8.1.2-7 - Simplify bash-completion just for EL7 +- Add python36 subpackage * Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 - Added Patch 1: Fix `pip install` failure in FIPS mode From e1e94a9e4375f2f4806ff9404f1cfd31711b18bb Mon Sep 17 00:00:00 2001 From: Carl George Date: Fri, 11 Jan 2019 09:57:48 -0600 Subject: [PATCH 06/10] Ensure python3 subpackages are upgraded together ...since they share the pip3 bash completion file. --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 27e57a5..54c072f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -82,7 +82,9 @@ easy_installable should be pip-installable as well. %package -n python%{python3_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries - +# The python3 subpackages share the pip3 bash completion file, so force them to +# be upgraded together. +Conflicts: python%{python3_other_pkgversion}-%{srcname} < %{version}-%{release} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if 0%{?with_tests} @@ -112,6 +114,9 @@ easy_installable should be pip-installable as well. %if 0%{?with_python3} %package -n python%{python3_other_pkgversion}-%{srcname} Summary: A tool for installing and managing Python3 packages +# The python3 subpackages share the pip3 bash completion file, so force them to +# be upgraded together. +Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release} BuildRequires: python%{python3_other_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-setuptools %if 0%{?with_tests} From c768dc99fdcfe6b3629a86d389fc22cb0ef2c3bc Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 7 Mar 2019 10:35:06 -0800 Subject: [PATCH 07/10] Rebuilt to change main python from 3.4 to 3.6 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 54c072f..477430b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,7 +15,7 @@ Name: python-%{srcname} Version: 8.1.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -281,6 +281,9 @@ py.test -m 'not network' %endif # with_python3_other %changelog +* Thu Mar 07 2019 Troy Dawson - 8.1.2-8 +- Rebuilt to change main python from 3.4 to 3.6 + * Thu Jan 10 2019 Carl George - 8.1.2-7 - Simplify bash-completion just for EL7 - Add python36 subpackage From 317b285d2ab1505fd64fc8f714f07b02d72a54bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 10 Aug 2019 10:40:27 +0200 Subject: [PATCH 08/10] Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7 --- .gitignore | 18 - Fix-pip-install-in-FIPS-mode.patch | 29 - ...given-prefix-from-wheel-RECORD-files.patch | 117 -- dead.package | 1 + local-dos.patch | 395 ------ python-pip.spec | 439 ------- skip-network-tests.patch | 1055 ----------------- sources | 2 - 8 files changed, 1 insertion(+), 2055 deletions(-) delete mode 100644 .gitignore delete mode 100644 Fix-pip-install-in-FIPS-mode.patch delete mode 100644 allow-stripping-given-prefix-from-wheel-RECORD-files.patch create mode 100644 dead.package delete mode 100644 local-dos.patch delete mode 100644 python-pip.spec delete mode 100644 skip-network-tests.patch delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2153847..0000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -pip-0.7.2.tar.gz -/pip-0.8.tar.gz -/pip-0.8.2.tar.gz -/pip-0.8.3.tar.gz -/pip-1.0.2.tar.gz -/pip-1.1.tar.gz -/pip-1.3.1.tar.gz -/pip-1.4.1.tar.gz -/pip-1.5.4.tar.gz -/pip-1.5.6.tar.gz -/pip-1.5.6-tests.tar.gz -/pip-6.0.8.tar.gz -/pip-7.0.3.tar.gz -/pip-7.1.0.tar.gz -/pip-7.1.0-tests.tar.gz -/pip-8.0.2.tar.gz -/pip-8.1.2.tar.gz -/pip-8.1.2-tests.tar.gz diff --git a/Fix-pip-install-in-FIPS-mode.patch b/Fix-pip-install-in-FIPS-mode.patch deleted file mode 100644 index 0054e4f..0000000 --- a/Fix-pip-install-in-FIPS-mode.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Fri, 17 Mar 2017 13:14:56 +0100 -Subject: [PATCH] Fix `pip install` in FIPS mode - -Resolves: rhbz#1430774 ---- - pip/utils/hashes.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py -index 9602970..c6d7524 100644 ---- a/pip/utils/hashes.py -+++ b/pip/utils/hashes.py -@@ -39,7 +39,10 @@ class Hashes(object): - gots = {} - for hash_name in iterkeys(self._allowed): - try: -- gots[hash_name] = hashlib.new(hash_name) -+ if hash_name == 'md5': -+ gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False) -+ else: -+ gots[hash_name] = hashlib.new(hash_name) - except (ValueError, TypeError): - raise InstallationError('Unknown hash name: %s' % hash_name) - --- -2.11.0 - diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch deleted file mode 100644 index d0cead6..0000000 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ /dev/null @@ -1,117 +0,0 @@ -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): - "directory.") - - cmd_opts.add_option( -+ '--strip-file-prefix', -+ dest='strip_file_prefix', -+ metavar='prefix', -+ default=None, -+ help="Strip given prefix from script paths in wheel RECORD." -+ ) -+ -+ cmd_opts.add_option( - '--prefix', - dest='prefix_path', - metavar='dir', -@@ -315,6 +323,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): - else: - return True - -- 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) -@@ -828,7 +827,12 @@ class InstallRequirement(object): - version = pip.wheel.wheel_version(self.source_dir) - pip.wheel.check_compatibility(version, self.name) - -- 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 - -@@ -1021,7 +1025,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): - move_wheel_files( - self.name, self.req, wheeldir, - user=self.use_user_site, -@@ -1030,6 +1034,7 @@ class InstallRequirement(object): - prefix=prefix, - pycompile=self.pycompile, - isolated=self.isolated, -+ strip_file_prefix=strip_file_prefix, - ) - - 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 -@@ -238,7 +238,7 @@ def get_entrypoints(filename): - - - 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): - """Install a wheel""" - - if not scheme: -@@ -522,7 +522,11 @@ if __name__ == '__main__': - writer.writerow(row) - for f in generated: - h, l = rehash(f) -- 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/dead.package b/dead.package new file mode 100644 index 0000000..3b76f06 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7 diff --git a/local-dos.patch b/local-dos.patch deleted file mode 100644 index 721ca51..0000000 --- a/local-dos.patch +++ /dev/null @@ -1,395 +0,0 @@ -diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py -index 8ed3d91..01b2104 100644 ---- a/pip/cmdoptions.py -+++ b/pip/cmdoptions.py -@@ -9,7 +9,7 @@ To be consistent, all options will follow this design. - """ - import copy - from optparse import OptionGroup, SUPPRESS_HELP, Option --from pip.locations import build_prefix, default_log_file -+from pip.locations import default_log_file - - - def make_option_group(group, parser): -@@ -297,10 +297,8 @@ build_dir = OptionMaker( - '-b', '--build', '--build-dir', '--build-directory', - dest='build_dir', - metavar='dir', -- default=build_prefix, -- help='Directory to unpack packages into and build in. ' -- 'The default in a virtualenv is "/build". ' -- 'The default for global installs is "/pip_build_".') -+ help='Directory to unpack packages into and build in.', -+) - - install_options = OptionMaker( - '--install-option', -diff --git a/pip/commands/install.py b/pip/commands/install.py -index cbf22a0..cb7d0db 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -10,6 +10,7 @@ from pip.basecommand import Command - from pip.index import PackageFinder - from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError - from pip import cmdoptions -+from pip.util import BuildDirectory - - - class InstallCommand(Command): -@@ -188,7 +189,7 @@ class InstallCommand(Command): - if ( - options.no_install or - options.no_download or -- (options.build_dir != build_prefix) or -+ options.build_dir or - options.no_clean - ): - logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, ' -@@ -197,7 +198,16 @@ class InstallCommand(Command): - if options.download_dir: - options.no_install = True - options.ignore_installed = True -- options.build_dir = os.path.abspath(options.build_dir) -+ -+ # If we have --no-install or --no-download and no --build we use the -+ # legacy static build dir -+ if (options.build_dir is None -+ and (options.no_install or options.no_download)): -+ options.build_dir = build_prefix -+ -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - options.src_dir = os.path.abspath(options.src_dir) - install_options = options.install_options or [] - if options.use_user_site: -@@ -246,73 +256,75 @@ class InstallCommand(Command): - - finder = self._build_package_finder(options, index_urls, session) - -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=options.src_dir, -- download_dir=options.download_dir, -- download_cache=options.download_cache, -- upgrade=options.upgrade, -- as_egg=options.as_egg, -- ignore_installed=options.ignore_installed, -- ignore_dependencies=options.ignore_dependencies, -- force_reinstall=options.force_reinstall, -- use_user_site=options.use_user_site, -- target_dir=temp_target_dir, -- session=session, -- pycompile=options.compile, -- ) -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- for name in options.editables: -- requirement_set.add_requirement( -- InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -- for filename in options.requirements: -- for req in parse_requirements(filename, finder=finder, options=options, session=session): -- requirement_set.add_requirement(req) -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- if options.find_links: -- msg = ('You must give at least one requirement to %(name)s ' -- '(maybe you meant "pip %(name)s %(links)s"?)' % -- dict(opts, links=' '.join(options.find_links))) -- else: -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.warn(msg) -- return -- -- try: -- if not options.no_download: -- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -- else: -- requirement_set.locate_files() -- -- if not options.no_install and not self.bundle: -- requirement_set.install( -- install_options, -- global_options, -- root=options.root_path, -- strip_file_prefix=options.strip_file_prefix) -- installed = ' '.join([req.name for req in -- requirement_set.successfully_installed]) -- if installed: -- logger.notify('Successfully installed %s' % installed) -- elif not self.bundle: -- downloaded = ' '.join([req.name for req in -- requirement_set.successfully_downloaded]) -- if downloaded: -- logger.notify('Successfully downloaded %s' % downloaded) -- elif self.bundle: -- requirement_set.create_bundle(self.bundle_filename) -- logger.notify('Created bundle in %s' % self.bundle_filename) -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- # Clean up -- if (not options.no_clean) and ((not options.no_install) or options.download_dir): -- requirement_set.cleanup_files(bundle=self.bundle) -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=options.src_dir, -+ download_dir=options.download_dir, -+ download_cache=options.download_cache, -+ upgrade=options.upgrade, -+ as_egg=options.as_egg, -+ ignore_installed=options.ignore_installed, -+ ignore_dependencies=options.ignore_dependencies, -+ force_reinstall=options.force_reinstall, -+ use_user_site=options.use_user_site, -+ target_dir=temp_target_dir, -+ session=session, -+ pycompile=options.compile, -+ ) -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ for name in options.editables: -+ requirement_set.add_requirement( -+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -+ for filename in options.requirements: -+ for req in parse_requirements(filename, finder=finder, options=options, session=session): -+ requirement_set.add_requirement(req) -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ if options.find_links: -+ msg = ('You must give at least one requirement to %(name)s ' -+ '(maybe you meant "pip %(name)s %(links)s"?)' % -+ dict(opts, links=' '.join(options.find_links))) -+ else: -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.warn(msg) -+ return -+ -+ try: -+ if not options.no_download: -+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -+ else: -+ requirement_set.locate_files() -+ -+ if not options.no_install and not self.bundle: -+ requirement_set.install( -+ install_options, -+ global_options, -+ root=options.root_path, -+ strip_file_prefix=options.strip_file_prefix) -+ installed = ' '.join([req.name for req in -+ requirement_set.successfully_installed]) -+ if installed: -+ logger.notify('Successfully installed %s' % installed) -+ elif not self.bundle: -+ downloaded = ' '.join([req.name for req in -+ requirement_set.successfully_downloaded]) -+ if downloaded: -+ logger.notify('Successfully downloaded %s' % downloaded) -+ elif self.bundle: -+ requirement_set.create_bundle(self.bundle_filename) -+ logger.notify('Created bundle in %s' % self.bundle_filename) -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ # Clean up -+ if (not options.no_clean) and ((not options.no_install) or options.download_dir): -+ requirement_set.cleanup_files(bundle=self.bundle) - - if options.target_dir: - if not os.path.exists(options.target_dir): -diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py -index 6527063..a96631a 100644 ---- a/pip/commands/wheel.py -+++ b/pip/commands/wheel.py -@@ -8,7 +8,7 @@ from pip.index import PackageFinder - from pip.log import logger - from pip.exceptions import CommandError, PreviousBuildDirError - from pip.req import InstallRequirement, RequirementSet, parse_requirements --from pip.util import normalize_path -+from pip.util import BuildDirectory, normalize_path - from pip.wheel import WheelBuilder - from pip import cmdoptions - -@@ -123,6 +123,9 @@ class WheelCommand(Command): - "--extra-index-url is suggested.") - index_urls += options.mirrors - -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - session = self._build_session(options) - - finder = PackageFinder(find_links=options.find_links, -@@ -137,59 +140,60 @@ class WheelCommand(Command): - session=session, - ) - -- options.build_dir = os.path.abspath(options.build_dir) -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=None, -- download_dir=None, -- download_cache=options.download_cache, -- ignore_dependencies=options.ignore_dependencies, -- ignore_installed=True, -- session=session, -- wheel_download_dir=options.wheel_dir -- ) -- -- # make the wheelhouse -- if not os.path.exists(options.wheel_dir): -- os.makedirs(options.wheel_dir) -- -- #parse args and/or requirements files -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- -- for filename in options.requirements: -- for req in parse_requirements( -- filename, -- finder=finder, -- options=options, -- session=session): -- if req.editable: -- logger.notify("ignoring %s" % req.url) -- continue -- requirement_set.add_requirement(req) -- -- #fail if no requirements -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.error(msg) -- return -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=None, -+ download_dir=None, -+ download_cache=options.download_cache, -+ ignore_dependencies=options.ignore_dependencies, -+ ignore_installed=True, -+ session=session, -+ wheel_download_dir=options.wheel_dir -+ ) - -- try: -- #build wheels -- wb = WheelBuilder( -- requirement_set, -- finder, -- options.wheel_dir, -- build_options = options.build_options or [], -- global_options = options.global_options or [] -- ) -- wb.build() -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- if not options.no_clean: -- requirement_set.cleanup_files() -+ # make the wheelhouse -+ if not os.path.exists(options.wheel_dir): -+ os.makedirs(options.wheel_dir) -+ -+ #parse args and/or requirements files -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ -+ for filename in options.requirements: -+ for req in parse_requirements( -+ filename, -+ finder=finder, -+ options=options, -+ session=session): -+ if req.editable: -+ logger.notify("ignoring %s" % req.url) -+ continue -+ requirement_set.add_requirement(req) -+ -+ #fail if no requirements -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.error(msg) -+ return -+ -+ try: -+ #build wheels -+ wb = WheelBuilder( -+ requirement_set, -+ finder, -+ options.wheel_dir, -+ build_options = options.build_options or [], -+ global_options = options.global_options or [] -+ ) -+ wb.build() -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ if not options.no_clean: -+ requirement_set.cleanup_files() -diff --git a/pip/util.py b/pip/util.py -index f459bb2..f5edeeb 100644 ---- a/pip/util.py -+++ b/pip/util.py -@@ -8,6 +8,7 @@ import zipfile - import tarfile - import subprocess - import textwrap -+import tempfile - - from pip.exceptions import InstallationError, BadCommand, PipError - from pip.backwardcompat import(WindowsError, string_types, raw_input, -@@ -718,3 +719,35 @@ def is_prerelease(vers): - - parsed = version._normalized_key(normalized) - return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed]) -+ -+ -+class BuildDirectory(object): -+ -+ def __init__(self, name=None, delete=None): -+ # If we were not given an explicit directory, and we were not given an -+ # explicit delete option, then we'll default to deleting. -+ if name is None and delete is None: -+ delete = True -+ -+ if name is None: -+ name = tempfile.mkdtemp(prefix="pip-build-") -+ # If we were not given an explicit directory, and we were not given -+ # an explicit delete option, then we'll default to deleting. -+ if delete is None: -+ delete = True -+ -+ self.name = name -+ self.delete = delete -+ -+ def __repr__(self): -+ return "<{} {!r}>".format(self.__class__.__name__, self.name) -+ -+ def __enter__(self): -+ return self.name -+ -+ def __exit__(self, exc, value, tb): -+ self.cleanup() -+ -+ def cleanup(self): -+ if self.delete: -+ rmtree(self.name) diff --git a/python-pip.spec b/python-pip.spec deleted file mode 100644 index 477430b..0000000 --- a/python-pip.spec +++ /dev/null @@ -1,439 +0,0 @@ -%global with_python3 1 -# python34 and python36 will share a bash-completion file, so don't try to -# enable with_python3_other without with_python3. -%global with_python3_other 1 -%global build_wheel 0 -%global with_tests 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 -%endif - -Name: python-%{srcname} -Version: 8.1.2 -Release: 8%{?dist} -Summary: A tool for installing and managing Python packages - -Group: Development/Libraries -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/ -%if 0%{?with_tests} -Source1: pip-8.1.2-tests.tar.gz -%endif - -# Patch until the following issue gets implemented upstream: -# https://github.com/pypa/pip/issues/1351 -Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch - -# Fix `pip install` failure in FIPS mode -# Resolves: rhbz#1430774 -Patch1: Fix-pip-install-in-FIPS-mode.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. - - -%package -n python2-%{srcname} -Summary: A tool for installing and managing Python 2 packages -Group: Development/Libraries -BuildRequires: python2-devel -BuildRequires: python-setuptools -%if 0%{?with_tests} -BuildRequires: git -BuildRequires: bzr -BuildRequires: python-mock -BuildRequires: pytest -BuildRequires: python-pretend -BuildRequires: python-freezegun -BuildRequires: python-pytest-capturelog -BuildRequires: python-scripttest -BuildRequires: python-virtualenv -%endif -%if 0%{?build_wheel} -BuildRequires: python2-pip -BuildRequires: python2-wheel -%endif -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. - - -%if 0%{?with_python3} -%package -n python%{python3_pkgversion}-%{srcname} -Summary: A tool for installing and managing Python3 packages -Group: Development/Libraries -# The python3 subpackages share the pip3 bash completion file, so force them to -# be upgraded together. -Conflicts: python%{python3_other_pkgversion}-%{srcname} < %{version}-%{release} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%if 0%{?with_tests} -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: python%{python3_pkgversion}-pip -BuildRequires: python%{python3_pkgversion}-wheel -%endif -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. -%endif # with_python3 - - -%if 0%{?with_python3} -%package -n python%{python3_other_pkgversion}-%{srcname} -Summary: A tool for installing and managing Python3 packages -# The python3 subpackages share the pip3 bash completion file, so force them to -# be upgraded together. -Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release} -BuildRequires: python%{python3_other_pkgversion}-devel -BuildRequires: python%{python3_other_pkgversion}-setuptools -%if 0%{?with_tests} -BuildRequires: python%{python3_other_pkgversion}-mock -BuildRequires: python%{python3_other_pkgversion}-pytest -BuildRequires: python%{python3_other_pkgversion}-pretend -BuildRequires: python%{python3_other_pkgversion}-freezegun -BuildRequires: python%{python3_other_pkgversion}-pytest-capturelog -BuildRequires: python%{python3_other_pkgversion}-scripttest -BuildRequires: python%{python3_other_pkgversion}-virtualenv -%endif -%if 0%{?build_wheel} -BuildRequires: python%{python3_other_pkgversion}-pip -BuildRequires: python%{python3_other_pkgversion}-wheel -%endif -Requires: python%{python3_other_pkgversion}-setuptools - -%description -n python%{python3_other_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. -%endif # with_python3_other - - -%prep -%setup -q -n %{srcname}-%{version} -%if 0%{?with_tests} -tar -xf %{SOURCE1} -%endif - -%patch0 -p1 -%patch1 -p1 - -sed -i '1d' pip/__init__.py - - -%build -%if 0%{?build_wheel} -%py2_build_wheel -%else -%py2_build -%endif - -%if 0%{?with_python3} -%if 0%{?build_wheel} -%{?with_python3_other:%py3_other_build_wheel} -%py3_build_wheel -%else -%{?with_python3_other:%py3_other_build} -%py3_build -%endif -%endif # with_python3 - - -%install -%if 0%{?with_python3} -%if 0%{?build_wheel} -%if 0%{?with_python3_other} -%py3_other_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{,3} -%endif # with_python3_other -%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 -%{?with_python3_other:%py3_other_install} -%py3_install -%endif -%endif # with_python3 - -%if 0%{?build_wheel} -%py2_install_wheel %{python2_wheelname} -%else -%py2_install -%endif - -mkdir -p %{buildroot}%{bash_completion_dir} -PYTHONPATH=%{buildroot}%{python_sitelib} \ - %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bash_completion_dir}/pip -%if 0%{?with_python3} -PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{buildroot}%{_bindir}/pip3 completion --bash \ - > %{buildroot}%{bash_completion_dir}/pip3 -%endif -pips2=pip -pips3=pip3 -for pip in %{buildroot}%{_bindir}/pip*; do - pip=$(basename $pip) - case $pip in - pip2*) - pips2="$pips2 $pip" - ln -s pip %{buildroot}%{bash_completion_dir}/$pip - ;; -%if 0%{?with_python3} - pip3?*) - pips3="$pips3 $pip" - ln -s pip3 %{buildroot}%{bash_completion_dir}/$pip - ;; -%endif - esac -done -%if 0%{?with_python3} -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ - -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bash_completion_dir}/pip3 -%endif -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ - %{buildroot}%{bash_completion_dir}/pip - -%if 0%{?with_tests} -%check -py.test -m 'not network' -%{?with_python3:py.test-%{python3_version} -m 'not network'} -%{?with_python3_other:py.test-%{python3_other_version} -m 'not network'} -%endif - - -%files -n python2-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip -%{_bindir}/pip2 -%{_bindir}/pip%{python2_version} -%{python_sitelib}/pip -%{python_sitelib}/pip-%{version}-py%{python2_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip -%{bash_completion_dir}/pip2 -%{bash_completion_dir}/pip%{python2_version} - -%if 0%{?with_python3} -%files -n python%{python3_pkgversion}-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip3 -%{_bindir}/pip%{python3_version} -%{python3_sitelib}/pip -%{python3_sitelib}/pip-%{version}-py%{python3_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip3 -%{bash_completion_dir}/pip%{python3_version} -%endif # with_python3 - -%if 0%{?with_python3_other} -%files -n python%{python3_other_pkgversion}-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip%{python3_other_version} -%{python3_other_sitelib}/pip -%{python3_other_sitelib}/pip-%{version}-py%{python3_other_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip3 -%{bash_completion_dir}/pip%{python3_other_version} -%endif # with_python3_other - -%changelog -* Thu Mar 07 2019 Troy Dawson - 8.1.2-8 -- Rebuilt to change main python from 3.4 to 3.6 - -* Thu Jan 10 2019 Carl George - 8.1.2-7 -- Simplify bash-completion just for EL7 -- Add python36 subpackage - -* Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 -- Added Patch 1: Fix `pip install` failure in FIPS mode -Resolves: rhbz#1430774 - -* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 -- Enable EPEL Python 3 builds -- Use new python macros -- Cleanup spec -- Without wheel - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 -- Updated the test sources - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 -- Moved python-pip into the python2-pip subpackage -- Added the python_provide macro - -* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Tue May 17 2016 Tomas Orsava - 8.1.2-1 -- Update to 8.1.2 -- Moved to a new PyPI URL format -- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py - -* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 -- Update to 8.0.2 - -* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 -- Rebuilt for Python3.5 rebuild -- With wheel set to 1 - -* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 -- Rebuilt for Python3.5 rebuild - -* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 -- Update to 7.1.0 - -* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 -- Install bash completion -- Ship LICENSE.txt as %%license where available - -* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 -- Update to 7.0.3 - -* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 -- Update to 6.0.8 - -* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 -- Only enable tests on Fedora. - -* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 -- Add tests -- Add patch skipping tests requiring Internet access - -* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 -- Added patch for local dos with predictable temp dictionary names - (http://seclists.org/oss-sec/2014/q4/655) - -* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 -- Update to 1.5.6 - -* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 -- Rebuild as wheel for Python 3.4 - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 -- Disable build_wheel - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 -- Rebuild as wheel for Python 3.4 - -* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 -- Updated to 1.5.4 - -* Mon Oct 14 2013 Tim Flink - 1.4.1-1 -- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release -- Updated version to 1.4.1 - -* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 -- Fix for CVE 2013-2099 - -* Thu May 23 2013 Tim Flink - 1.3.1-3 -- undo python2 executable rename to python-pip. fixes #958377 -- fix summary to match upstream - -* Mon May 06 2013 Kevin Kofler - 1.3.1-2 -- Fix main package Summary, it's for Python 2, not 3 (#877401) - -* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 -- Update to 1.3.1, fix for CVE-2013-1888. - -* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Oct 09 2012 Tim Flink - 1.2.1-2 -- Fixing files for python3-pip - -* Thu Oct 04 2012 Tim Flink - 1.2.1-1 -- Update to upstream 1.2.1 -- Change binary from pip-python to python-pip (RHBZ#855495) -- Add alias from python-pip to pip-python, to be removed at a later date - -* Tue May 15 2012 Tim Flink - 1.1.0-1 -- Update to upstream 1.1.0 - -* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sat Oct 22 2011 Tim Flink - 1.0.2-1 -- update to 1.0.2 and added python3 subpackage - -* Wed Jun 22 2011 Tim Flink - 0.8.3-1 -- update to 0.8.3 and project home page - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Dec 20 2010 Luke Macken - 0.8.2-1 -- update to 0.8.2 of pip -* Mon Aug 30 2010 Peter Halliday - 0.8-1 -- update to 0.8 of pip -* Thu Jul 22 2010 David Malcolm - 0.7.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 -- update to 0.7.2 of pip -* Sun May 23 2010 Peter Halliday - 0.7.1-1 -- update to 0.7.1 of pip -* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 -- fix dependency issue -* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 -- fix spec file -* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 -- upgrade to 0.6.1 of pip -* Mon Aug 31 2009 Peter Halliday - 0.4-1 -- Initial package - diff --git a/skip-network-tests.patch b/skip-network-tests.patch deleted file mode 100644 index 9dec67e..0000000 --- a/skip-network-tests.patch +++ /dev/null @@ -1,1055 +0,0 @@ -diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py ---- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 -+++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 -@@ -1,6 +1,7 @@ - import sys - import re - import textwrap -+import pytest - from doctest import OutputChecker, ELLIPSIS - - from tests.lib.local_repos import local_checkout, local_repo -@@ -58,6 +59,7 @@ def test_freeze_basic(script): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_svn(script, tmpdir): - """Test freezing a svn checkout""" - -@@ -79,6 +81,7 @@ def test_freeze_svn(script, tmpdir): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_git_clone(script, tmpdir): - """ - Test freezing a Git clone. -@@ -109,6 +112,7 @@ def test_freeze_git_clone(script, tmpdir - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_mercurial_clone(script, tmpdir): - """ - Test freezing a Mercurial clone. -@@ -140,6 +144,7 @@ def test_freeze_mercurial_clone(script, - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_bazaar_clone(script, tmpdir): - """ - Test freezing a Bazaar clone. -@@ -175,6 +180,7 @@ def test_freeze_bazaar_clone(script, tmp - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_local_option(script): - """ - Test that wsgiref (from global site-packages) is reported normally, but not with --local. -@@ -205,6 +211,7 @@ def test_freeze_with_local_option(script - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_requirement_option(script): - """ - Test that new requirements are created correctly with --requirement hints -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-11-27 11:23:20.863671103 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-11-27 14:25:05.086297126 +0100 -@@ -1,4 +1,5 @@ - import os -+import pytest - - from os.path import abspath, exists, join - -@@ -20,6 +21,7 @@ def test_cleanup_after_install(script, d - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_install(script, data): - """ - Test --no-clean option blocks cleaning after install -@@ -29,6 +31,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_after_install_editable_from_hg(script, tmpdir): - """ - Test clean up after cloning from Mercurial. -@@ -87,6 +90,7 @@ def test_cleanup_req_satisifed_no_name(s - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_not_delete_existing_build_dir(script): - """ - It should not delete build/ if existing before run the command -@@ -123,6 +127,7 @@ def test_cleanup_after_egg_info_exceptio - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_prevented_upon_build_dir_exception(script, data): - """ - Test no cleanup occurs after a PreviousBuildDirError -diff -up pip-1.5.6/tests/functional/test_install_compat.py.orig pip-1.5.6/tests/functional/test_install_compat.py ---- pip-1.5.6/tests/functional/test_install_compat.py.orig 2014-11-27 11:23:20.912671389 +0100 -+++ pip-1.5.6/tests/functional/test_install_compat.py 2014-11-27 11:30:36.533251976 +0100 -@@ -3,9 +3,11 @@ Tests for compatibility workarounds. - - """ - import os -+import pytest - from tests.lib import pyversion, assert_all_changes - - -+@pytest.mark.skipif(True, reason='No network') - def test_debian_egg_name_workaround(script): - """ - We can uninstall packages installed with the pyversion removed from the -diff -up pip-1.5.6/tests/functional/test_install_config.py.orig pip-1.5.6/tests/functional/test_install_config.py ---- pip-1.5.6/tests/functional/test_install_config.py.orig 2014-11-27 11:23:20.920671436 +0100 -+++ pip-1.5.6/tests/functional/test_install_config.py 2014-11-27 11:30:03.530051860 +0100 -@@ -1,7 +1,7 @@ - import os - import tempfile - import textwrap -- -+import pytest - - def test_options_from_env_vars(script): - """ -@@ -28,6 +28,7 @@ def test_command_line_options_override_e - assert "Getting page http://download.zope.org/ppix" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_env_vars_override_config_file(script, virtualenv): - """ - Test that environmental variables override settings in config files. -@@ -62,6 +63,7 @@ def _test_env_vars_override_config_file( - assert "Successfully installed INITools" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_append_flags(script, virtualenv, data): - """ - Test command line flags that append to defaults set by environmental variables. -@@ -76,6 +78,7 @@ def test_command_line_append_flags(scrip - assert "Skipping link %s" % data.find_links in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_appends_correctly(script, data): - """ - Test multiple appending options set by environmental variables. -diff -up pip-1.5.6/tests/functional/test_install_download.py.orig pip-1.5.6/tests/functional/test_install_download.py ---- pip-1.5.6/tests/functional/test_install_download.py.orig 2014-11-27 11:23:20.970671729 +0100 -+++ pip-1.5.6/tests/functional/test_install_download.py 2014-11-27 11:29:42.503924368 +0100 -@@ -1,9 +1,11 @@ - import os - import textwrap -+import pytest - - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_if_requested(script): - """ - It should download (in the scratch path) and not install if requested. -@@ -13,6 +15,7 @@ def test_download_if_requested(script): - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_wheel(script): - """ - Test using "pip install --download" to download a *.whl archive. -@@ -26,6 +29,7 @@ def test_download_wheel(script): - assert script.site_packages/ 'piptestpackage' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_single_download_from_requirements_file(script): - """ - It should support download (in the scratch path) from PyPi from a requirements file -@@ -38,6 +42,7 @@ def test_single_download_from_requiremen - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_download_dependencies(script): - """ - It should download dependencies (in the scratch path) -@@ -77,6 +82,7 @@ def test_download_should_download_wheel_ - assert Path('scratch') / dep_filename in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_skip_existing_files(script): - """ - It should not download files already existing in the scratch dir -diff -up pip-1.5.6/tests/functional/test_install_extras.py.orig pip-1.5.6/tests/functional/test_install_extras.py ---- pip-1.5.6/tests/functional/test_install_extras.py.orig 2014-11-27 11:23:21.066672291 +0100 -+++ pip-1.5.6/tests/functional/test_install_extras.py 2014-11-27 11:31:01.854405511 +0100 -@@ -1,6 +1,8 @@ -+import pytest - from os.path import join - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_extras_install_from_pypi(script): - """ - Test installing a package from PyPI using extras dependency Paste[openid]. -@@ -10,6 +12,7 @@ def test_simple_extras_install_from_pypi - assert initools_folder in result.files_created, result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_extras_uninstall(script): - """ - No extras dependency gets uninstalled when the root package is uninstalled -diff -up pip-1.5.6/tests/functional/test_install.py.orig pip-1.5.6/tests/functional/test_install.py ---- pip-1.5.6/tests/functional/test_install.py.orig 2014-11-27 11:23:20.227667380 +0100 -+++ pip-1.5.6/tests/functional/test_install.py 2014-11-27 11:23:20.825670880 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_without_setuptools(script): - script.run("pip", "uninstall", "setuptools", "-y") - result = script.run( -@@ -26,6 +27,7 @@ def test_without_setuptools(script): - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_second_command_line_interface_works(script): - """ - Check if ``pip`` commands behaves equally -@@ -39,6 +41,7 @@ def test_pip_second_command_line_interfa - assert initools_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_from_pypi(script): - """ - Test installing a package from PyPI. -@@ -60,6 +63,7 @@ def test_editable_install(script): - assert not result.files_updated, result.files_updated - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_svn(script, tmpdir): - """ - Test checking out from svn. -@@ -71,6 +75,7 @@ def test_install_editable_from_svn(scrip - result.assert_installed('INITools', with_files=['.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_editable_to_custom_path(script, tmpdir): - """ - Test downloading an editable using a relative custom src folder. -@@ -94,6 +99,7 @@ def test_download_editable_to_custom_pat - assert customdl_files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_editable_no_install_followed_by_no_download(script, tmpdir): - """ - Test installing an editable in two steps (first with --no-install, then with --no-download). -@@ -113,6 +119,7 @@ def test_editable_no_install_followed_by - result.assert_installed('INITools', without_files=[curdir, '.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_followed_by_no_download(script): - """ - Test installing in two steps (first with --no-install, then with --no-download). -@@ -143,6 +150,7 @@ def test_bad_install_with_no_download(sc - "an equivalent install with --no-install?" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_dev_version_from_pypi(script): - """ - Test using package==dev. -@@ -154,6 +162,7 @@ def test_install_dev_version_from_pypi(s - assert (script.site_packages / 'initools') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git(script, tmpdir): - """ - Test cloning from Git. -@@ -166,6 +175,7 @@ def test_install_editable_from_git(scrip - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_hg(script, tmpdir): - """ - Test cloning from Mercurial. -@@ -177,6 +187,7 @@ def test_install_editable_from_hg(script - result.assert_installed('ScriptTest', with_files=['.hg']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_final_slash_normalization(script, tmpdir): - """ - Test that presence or absence of final slash in VCS URL is normalized. -@@ -188,6 +199,7 @@ def test_vcs_url_final_slash_normalizati - assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_bazaar(script, tmpdir): - """ - Test checking out from Bazaar. -@@ -199,6 +211,7 @@ def test_install_editable_from_bazaar(sc - result.assert_installed('django-wikiapp', with_files=['.bzr']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_urlquote_normalization(script, tmpdir): - """ - Test that urlquoted characters are normalized for repo URL comparison. -@@ -295,6 +308,7 @@ def test_install_pardir(script, data): - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option(script): - """ - Test using global distutils options. -@@ -320,6 +334,7 @@ def test_install_with_hacked_egg_info(sc - assert 'Successfully installed hackedegginfo\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_using_install_option_and_editable(script, tmpdir): - """ - Test installing a tool using -e and --install-option -@@ -334,6 +349,7 @@ def test_install_using_install_option_an - assert virtualenv_bin in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option_using_editable(script, tmpdir): - """ - Test using global distutils options, but in an editable installation -@@ -345,6 +361,7 @@ def test_install_global_option_using_edi - assert '0.2.5\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_same_name_in_curdir(script): - """ - Test installing a package with the same name of a local folder -@@ -398,6 +415,7 @@ def test_install_folder_using_relative_p - assert egg_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_which_contains_dev_in_name(script): - """ - Test installing package from pypi which contains 'dev' in name -@@ -409,6 +427,7 @@ def test_install_package_which_contains_ - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_target(script): - """ - Test installing a package using pip install --target -@@ -481,6 +500,7 @@ def test_url_req_case_mismatch(script, d - assert egg_folder not in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_compiles_pyc(script): - """ - Test installing with --compile on -@@ -501,6 +521,7 @@ def test_compiles_pyc(script): - assert any(exists) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_compiles_pyc(script, data): - """ - Test installing from wheel with --compile on -diff -up pip-1.5.6/tests/functional/test_install_reqs.py.orig pip-1.5.6/tests/functional/test_install_reqs.py ---- pip-1.5.6/tests/functional/test_install_reqs.py.orig 2014-11-27 11:23:21.114672571 +0100 -+++ pip-1.5.6/tests/functional/test_install_reqs.py 2014-11-27 14:25:42.443560282 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_requirements_file(script): - """ - Test installing from a requirements file. -@@ -59,6 +60,7 @@ def test_relative_requirements_file(scri - assert (script.site_packages/'fspkg') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_requirements_files(script, tmpdir): - """ - Test installing from multiple nested requirements files. -@@ -110,6 +112,7 @@ def test_install_local_editable_with_ext - assert script.site_packages/'simple' in res.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_local_editable_with_subdirectory(script): - version_pkg_path = _create_test_package_with_subdirectory(script, - 'version_subpkg') -diff -up pip-1.5.6/tests/functional/test_install_upgrade.py.orig pip-1.5.6/tests/functional/test_install_upgrade.py ---- pip-1.5.6/tests/functional/test_install_upgrade.py.orig 2014-11-27 11:23:21.159672835 +0100 -+++ pip-1.5.6/tests/functional/test_install_upgrade.py 2014-11-27 11:23:21.743676253 +0100 -@@ -22,6 +22,7 @@ def test_no_upgrade_unless_requested(scr - assert not result.files_created, 'pip install INITools upgraded when it should not have' - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_specific_version(script): - """ - It does upgrade to specific version requested. -@@ -34,6 +35,7 @@ def test_upgrade_to_specific_version(scr - assert script.site_packages/'INITools-0.2-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_if_requested(script): - """ - And it does upgrade if requested. -@@ -56,6 +58,7 @@ def test_upgrade_with_newest_already_ins - assert 'already up-to-date' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_force_reinstall_newest(script): - """ - Force reinstallation of a package even if it is already at its newest -@@ -69,6 +72,7 @@ def test_upgrade_force_reinstall_newest( - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade(script): - """ - Automatic uninstall-before-upgrade. -@@ -82,6 +86,7 @@ def test_uninstall_before_upgrade(script - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade_from_url(script): - """ - Automatic uninstall-before-upgrade from URL. -@@ -95,6 +100,7 @@ def test_uninstall_before_upgrade_from_u - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_same_version_from_url(script): - """ - When installing from a URL the same version that is already installed, no -@@ -109,6 +115,7 @@ def test_upgrade_to_same_version_from_ur - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_from_reqs_file(script): - """ - Upgrade from a requirements file. -@@ -161,6 +168,7 @@ def test_editable_git_upgrade(script): - assert 'some different version' in version2.stdout, "Output: %s" % (version2.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_should_not_install_always_from_cache(script): - """ - If there is an old cached package, pip should download the newer version -@@ -173,6 +181,7 @@ def test_should_not_install_always_from_ - assert script.site_packages/'INITools-0.1-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_with_ignoreinstalled_requested(script): - """ - Test old conflicting package is completely ignored -@@ -185,6 +194,7 @@ def test_install_with_ignoreinstalled_re - assert os.path.exists(script.site_packages_path/'INITools-0.3-py%s.egg-info' % pyversion) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_no_dists_found(script, tmpdir): - """It can upgrade a VCS requirement that has no distributions otherwise.""" - req = "%s#egg=pip-test-package" % local_checkout( -@@ -194,6 +204,7 @@ def test_upgrade_vcs_req_with_no_dists_f - assert not result.returncode - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_dist_found(script): - """It can upgrade a VCS requirement that has distributions on the index.""" - # TODO(pnasrat) Using local_checkout fails on windows - oddness with the test path urls/git. -diff -up pip-1.5.6/tests/functional/test_install_user.py.orig pip-1.5.6/tests/functional/test_install_user.py ---- pip-1.5.6/tests/functional/test_install_user.py.orig 2014-11-27 11:23:21.750676293 +0100 -+++ pip-1.5.6/tests/functional/test_install_user.py 2014-11-27 11:23:22.157678676 +0100 -@@ -42,7 +42,8 @@ def _patch_dist_in_site_packages(script) - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UserSite: - -- def test_reset_env_system_site_packages_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_reset_env_system_site_packages_usersite(self, script, virtualenv): - """ - reset_env(system_site_packages=True) produces env where a --user install can be found using pkg_resources - """ -@@ -53,7 +54,8 @@ class Tests_UserSite: - assert 'INITools'== project_name, "'%s' should be 'INITools'" %project_name - - -- def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): - """ - Test installing current directory ('.') into usersite after installing distribute - """ -@@ -85,7 +87,8 @@ class Tests_UserSite: - result = script.pip('install', '--user', curdir, cwd=run_from, expect_error=True) - assert "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." in result.stdout - -- def test_install_user_conflict_in_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_usersite(self, script, virtualenv): - """ - Test user install with conflict in usersite updates usersite. - """ -@@ -99,7 +102,8 @@ class Tests_UserSite: - assert egg_info_folder in result2.files_created, str(result2) - assert not isfile(initools_v3_file), initools_v3_file - -- def test_install_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install with conflict in global site ignores site and installs to usersite - """ -@@ -129,7 +133,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install/upgrade with conflict in global site ignores site and installs to usersite - """ -@@ -159,7 +164,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder), result2.stdout - assert isdir(initools_folder) - -- def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): - """ - Test user install with conflict in globalsite and usersite ignores global site and updates usersite. - """ -@@ -190,7 +196,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): - """ - Test user install in --system-site-packages virtualenv with conflict in site fails. - """ -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-11-27 14:27:33.238340755 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-11-27 14:28:28.154727603 +0100 -@@ -36,6 +36,7 @@ def test_get_refs_should_return_branch_n - assert result['branch0.1'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_ignore_no_branch(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) -@@ -79,6 +80,7 @@ def test_check_rev_options_should_handle - - # TODO(pnasrat) fix all helpers to do right things with paths on windows. - @pytest.mark.skipif("sys.platform == 'win32'") -+@pytest.mark.skipif(True, reason='No network') - def test_check_submodule_addition(script): - """ - Submodules are pulled in on install and updated on upgrade. -diff -up pip-1.5.6/tests/functional/test_install_vcs.py.orig pip-1.5.6/tests/functional/test_install_vcs.py ---- pip-1.5.6/tests/functional/test_install_vcs.py.orig 2014-11-27 11:23:22.169678746 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs.py 2014-11-27 14:27:14.133206173 +0100 -@@ -1,7 +1,9 @@ -+import pytest - from tests.lib import _create_test_package, _change_test_package_version - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git_with_https(script, tmpdir): - """ - Test cloning from Git with https. -@@ -13,6 +15,7 @@ def test_install_editable_from_git_with_ - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_sha1_revisions(script): - """ - Git backend should be able to install from SHA1 revisions -@@ -25,6 +28,7 @@ def test_git_with_sha1_revisions(script) - assert '0.1' in version.stdout, version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_branch_name_as_revision(script): - """ - Git backend should be able to install from branch names -@@ -37,6 +41,7 @@ def test_git_with_branch_name_as_revisio - assert 'some different version' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_as_revision(script): - """ - Git backend should be able to install from tag names -@@ -49,6 +54,7 @@ def test_git_with_tag_name_as_revision(s - assert '0.1' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_and_update(script, tmpdir): - """ - Test cloning a git repository and updating to a different version. -@@ -64,6 +70,7 @@ def test_git_with_tag_name_and_update(sc - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_branch_should_not_be_changed(script, tmpdir): - """ - Editable installations should not change branch -@@ -77,6 +84,7 @@ def test_git_branch_should_not_be_change - assert '* master' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_unpacking(script, tmpdir): - """ - Test cloning a git repository from a non-editable URL with a given tag. -@@ -88,6 +96,7 @@ def test_git_with_non_editable_unpacking - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from an editable url which contains "dev" string -@@ -97,6 +106,7 @@ def test_git_with_editable_where_egg_con - result.assert_installed('django-devserver', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from a non-editable url which contains "dev" string -@@ -107,6 +117,7 @@ def test_git_with_non_editable_where_egg - assert devserver_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_ambiguous_revs(script): - """ - Test git with two "names" (tag/branch) pointing to the same commit -@@ -121,6 +132,7 @@ def test_git_with_ambiguous_revs(script) - result.assert_installed('version-pkg', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_works_with_editable_non_origin_repo(script): - # set up, create a git repo and install it as editable from a local directory path - version_pkg_path = _create_test_package(script) -diff -up pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig pip-1.5.6/tests/functional/test_install_vcs_svn.py ---- pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig 2014-11-27 14:30:00.551378474 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_svn.py 2014-11-27 14:30:03.217397254 +0100 -@@ -1,7 +1,8 @@ -+import pytest - from mock import patch - from pip.vcs.subversion import Subversion - -- -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -@@ -11,6 +12,7 @@ def test_obtain_should_recognize_auth_in - 'http://username:password@svn.example.com/', script.scratch_path/'test']) - - -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_export_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -diff -up pip-1.5.6/tests/functional/test_install_wheel.py.orig pip-1.5.6/tests/functional/test_install_wheel.py ---- pip-1.5.6/tests/functional/test_install_wheel.py.orig 2014-11-27 11:23:22.371679928 +0100 -+++ pip-1.5.6/tests/functional/test_install_wheel.py 2014-11-27 11:23:22.372679934 +0100 -@@ -92,6 +92,7 @@ def test_install_from_wheel_with_headers - result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_wheel_with_target(script, data): - """ - Test installing a wheel using pip install --target -diff -up pip-1.5.6/tests/functional/test_list.py.orig pip-1.5.6/tests/functional/test_list.py ---- pip-1.5.6/tests/functional/test_list.py.orig 2014-11-27 11:23:22.379679974 +0100 -+++ pip-1.5.6/tests/functional/test_list.py 2014-11-27 11:31:06.129431433 +0100 -@@ -1,6 +1,7 @@ - import os - import re - import textwrap -+import pytest - - from tests.lib.local_repos import local_checkout - -@@ -26,6 +27,7 @@ def test_local_flag(script, data): - assert 'simple (1.0)' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_uptodate_flag(script, data): - """ - Test the behavior of --uptodate flag in the list command -@@ -39,6 +41,7 @@ def test_uptodate_flag(script, data): - assert 'simple2 (3.0)' in result.stdout, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_outdated_flag(script, data): - """ - Test the behavior of --outdated flag in the list command -@@ -52,6 +55,7 @@ def test_outdated_flag(script, data): - assert 'simple2' not in result.stdout, str(result) #3.0 is latest - - -+@pytest.mark.skipif(True, reason='No network') - def test_editables_flag(script, data): - """ - Test the behavior of --editables flag in the list command -diff -up pip-1.5.6/tests/functional/test_search.py.orig pip-1.5.6/tests/functional/test_search.py ---- pip-1.5.6/tests/functional/test_search.py.orig 2014-11-27 11:23:22.903683041 +0100 -+++ pip-1.5.6/tests/functional/test_search.py 2014-11-27 11:30:57.397378486 +0100 -@@ -1,3 +1,4 @@ -+import pytest - import pip.download - from pip.commands.search import (compare_versions, - highest_version, -@@ -53,6 +54,7 @@ def test_invalid_pypi_transformation(): - assert transform_hits(pypi_hits) == expected - - -+@pytest.mark.skipif(True, reason='No network') - def test_search(script): - """ - End to end test of search command. -@@ -62,6 +64,7 @@ def test_search(script): - assert 'A tool for installing and managing Python packages' in output.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_search(script): - """ - Test searching for multiple packages at once. -@@ -80,6 +83,7 @@ def test_search_missing_argument(script) - assert 'ERROR: Missing required argument (search query).' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_sucess_when_find_packages(): - """ - Test SearchCommand.run for found package -@@ -91,6 +95,7 @@ def test_run_method_should_return_sucess - assert status == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_no_matches_found_when_does_not_find_packages(): - """ - Test SearchCommand.run for no matches -@@ -102,6 +107,7 @@ def test_run_method_should_return_no_mat - assert status == NO_MATCHES_FOUND, status - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_should_exit_status_code_zero_when_find_packages(script): - """ - Test search exit status code for package found -@@ -110,6 +116,7 @@ def test_search_should_exit_status_code_ - assert result.returncode == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_exit_status_code_when_finds_no_package(script): - """ - Test search exit status code for no matches -diff -up pip-1.5.6/tests/functional/test_show.py.orig pip-1.5.6/tests/functional/test_show.py ---- pip-1.5.6/tests/functional/test_show.py.orig 2014-11-27 11:23:23.160684545 +0100 -+++ pip-1.5.6/tests/functional/test_show.py 2014-11-27 11:30:52.417348289 +0100 -@@ -1,4 +1,5 @@ - import re -+import pytest - from pip import __version__ - from pip.commands.show import search_packages_info - -@@ -34,6 +35,7 @@ def test_show_with_files_not_found(scrip - assert lines[6] == 'Cannot locate installed-files.txt', lines[5] - - -+@pytest.mark.skipif(True, reason='No network') - def test_show_with_all_files(script): - """ - Test listing all files in the show command. -diff -up pip-1.5.6/tests/functional/test_uninstall.py.orig pip-1.5.6/tests/functional/test_uninstall.py ---- pip-1.5.6/tests/functional/test_uninstall.py.orig 2014-11-27 11:23:23.168684592 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall.py 2014-11-27 11:30:22.367166080 +0100 -@@ -3,6 +3,7 @@ from __future__ import with_statement - import textwrap - import os - import sys -+import pytest - from os.path import join, abspath, normpath - from tempfile import mkdtemp - from mock import patch -@@ -12,6 +13,7 @@ from tests.lib.local_repos import local_ - from pip.util import rmtree - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_uninstall(script): - """ - Test simple install and uninstall. -@@ -25,6 +27,7 @@ def test_simple_uninstall(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_with_scripts(script): - """ - Uninstall an easy_installed package with scripts. -@@ -38,6 +41,7 @@ def test_uninstall_with_scripts(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache', easy_install_pth]) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_install_after_import(script): - """ - Uninstall an easy_installed package after it's been imported -@@ -50,6 +54,7 @@ def test_uninstall_easy_install_after_im - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_namespace_package(script): - """ - Uninstall a distribution with a namespace package without clobbering -@@ -90,6 +95,7 @@ def test_uninstall_overlapping_package(s - assert_all_changes(result2, result3, []) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_console_scripts(script): - """ - Test uninstalling a package with more files (console_script entry points, extra directories). -@@ -102,6 +108,7 @@ def test_uninstall_console_scripts(scrip - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_installed_console_scripts(script): - """ - Test uninstalling package with console_scripts that is easy_installed. -@@ -114,6 +121,7 @@ def test_uninstall_easy_installed_consol - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_from_svn(script, tmpdir): - """ - Test uninstalling an editable installation from svn. -@@ -126,6 +134,7 @@ def test_uninstall_editable_from_svn(scr - assert_all_changes(result, result2, [script.venv/'src', script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_with_source_outside_venv(script, tmpdir): - """ - Test uninstalling editable install from existing source outside the venv. -@@ -149,6 +158,7 @@ def _test_uninstall_editable_with_source - assert_all_changes(result, result3, [script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_from_reqs_file(script, tmpdir): - """ - Test uninstall from a requirements file. -diff -up pip-1.5.6/tests/functional/test_uninstall_user.py.orig pip-1.5.6/tests/functional/test_uninstall_user.py ---- pip-1.5.6/tests/functional/test_uninstall_user.py.orig 2014-11-27 11:23:23.590687062 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall_user.py 2014-11-27 11:29:55.413002643 +0100 -@@ -17,7 +17,8 @@ from tests.functional.test_install_user - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UninstallUserSite: - -- def test_uninstall_from_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_uninstall_from_usersite(self, script, virtualenv): - """ - Test uninstall from usersite - """ -diff -up pip-1.5.6/tests/functional/test_wheel.py.orig pip-1.5.6/tests/functional/test_wheel.py ---- pip-1.5.6/tests/functional/test_wheel.py.orig 2014-11-27 11:23:23.598687109 +0100 -+++ pip-1.5.6/tests/functional/test_wheel.py 2014-11-27 11:30:30.345214455 +0100 -@@ -2,6 +2,7 @@ - import os - import sys - import textwrap -+import pytest - - from os.path import exists - -@@ -20,6 +21,7 @@ def test_pip_wheel_fails_without_wheel(s - assert "'pip wheel' requires the 'wheel' package" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_success(script, data): - """ - Test 'pip wheel' success. -@@ -32,6 +34,7 @@ def test_pip_wheel_success(script, data) - assert "Successfully built simple" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_downloads_wheels(script, data): - """ - Test 'pip wheel' downloads wheels -@@ -46,6 +49,7 @@ def test_pip_wheel_downloads_wheels(scri - assert "Saved" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail(script, data): - """ - Test 'pip wheel' failure. -@@ -59,6 +63,7 @@ def test_pip_wheel_fail(script, data): - assert "Failed to build wheelbroken" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_ignore_wheels_editables(script, data): - """ - Test 'pip wheel' ignores editables -@@ -85,6 +90,7 @@ def test_pip_wheel_ignore_wheels_editabl - assert ignore_editable in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_wheel(script, data): - """ - Test --no-clean option blocks cleaning after wheel build -@@ -95,6 +101,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_source_deps(script, data): - """ - Test 'pip wheel --use-wheel' finds and builds source archive dependencies of wheels -@@ -108,6 +115,7 @@ def test_pip_wheel_source_deps(script, d - assert "Successfully built source" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail_cause_of_previous_build_dir(script, data): - """Test when 'pip wheel' tries to install a package that has a previous build directory""" - -diff -up pip-1.5.6/tests/unit/test_finder.py.orig pip-1.5.6/tests/unit/test_finder.py ---- pip-1.5.6/tests/unit/test_finder.py.orig 2014-11-27 11:23:23.937689093 +0100 -+++ pip-1.5.6/tests/unit/test_finder.py 2014-11-27 14:30:48.597716927 +0100 -@@ -71,6 +71,7 @@ def test_finder_detects_latest_already_s - finder.find_requirement(req, True) - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_detects_latest_already_satisfied_pypi_links(): - """Test PackageFinder detects latest already satisified using pypi links""" - req = InstallRequirement.from_line('initools', None) -@@ -199,6 +200,7 @@ def test_finder_priority_file_over_page( - assert link.url.startswith("file://") - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_priority_page_over_deplink(): - """Test PackageFinder prefers page links over equivalent dependency links""" - req = InstallRequirement.from_line('gmpy==1.15', None) -diff -up pip-1.5.6/tests/unit/test_req.py.orig pip-1.5.6/tests/unit/test_req.py ---- pip-1.5.6/tests/unit/test_req.py.orig 2014-11-27 11:23:23.946689145 +0100 -+++ pip-1.5.6/tests/unit/test_req.py 2014-11-27 11:23:23.947689151 +0100 -@@ -149,6 +149,7 @@ def test_parse_editable_local_extras(isd - normcase_mock.return_value = "/some/path/foo" - assert parse_editable('foo[bar,baz]', 'git') == (None, 'file:///some/path/foo', ('bar', 'baz')) - -+@pytest.mark.skipif(True, reason='No network') - def test_remote_reqs_parse(): - """ - Test parsing a simple remote requirements file -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-12-01 13:31:24.075490830 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-12-01 13:30:59.208326741 +0100 -@@ -62,6 +62,7 @@ def test_cleanup_after_install_from_loca - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_and_download_should_not_leave_build_dir(script): - """ - It should remove build/ dir if it was pip that created -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-12-01 13:32:11.419803237 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-12-01 13:32:30.298927814 +0100 -@@ -13,6 +13,7 @@ from tests.lib.git_submodule_helpers imp - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_tag_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'tag', '0.1', cwd=version_pkg_path) -@@ -25,6 +26,7 @@ def test_get_refs_should_return_tag_name - assert result['0.2'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_branch_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) diff --git a/sources b/sources deleted file mode 100644 index 6722521..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz -e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz From b36d323135c705ccb245a37956477f21d16cca6b Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Sun, 11 Aug 2019 03:52:22 -0400 Subject: [PATCH 09/10] Revert "Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7" Unretirement for https://pagure.io/releng/issue/8607 This reverts commit 317b285d2ab1505fd64fc8f714f07b02d72a54bd. --- .gitignore | 18 + Fix-pip-install-in-FIPS-mode.patch | 29 + ...given-prefix-from-wheel-RECORD-files.patch | 117 ++ dead.package | 1 - local-dos.patch | 395 ++++++ python-pip.spec | 439 +++++++ skip-network-tests.patch | 1055 +++++++++++++++++ sources | 2 + 8 files changed, 2055 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Fix-pip-install-in-FIPS-mode.patch create mode 100644 allow-stripping-given-prefix-from-wheel-RECORD-files.patch delete mode 100644 dead.package create mode 100644 local-dos.patch create mode 100644 python-pip.spec create mode 100644 skip-network-tests.patch create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2153847 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +pip-0.7.2.tar.gz +/pip-0.8.tar.gz +/pip-0.8.2.tar.gz +/pip-0.8.3.tar.gz +/pip-1.0.2.tar.gz +/pip-1.1.tar.gz +/pip-1.3.1.tar.gz +/pip-1.4.1.tar.gz +/pip-1.5.4.tar.gz +/pip-1.5.6.tar.gz +/pip-1.5.6-tests.tar.gz +/pip-6.0.8.tar.gz +/pip-7.0.3.tar.gz +/pip-7.1.0.tar.gz +/pip-7.1.0-tests.tar.gz +/pip-8.0.2.tar.gz +/pip-8.1.2.tar.gz +/pip-8.1.2-tests.tar.gz diff --git a/Fix-pip-install-in-FIPS-mode.patch b/Fix-pip-install-in-FIPS-mode.patch new file mode 100644 index 0000000..0054e4f --- /dev/null +++ b/Fix-pip-install-in-FIPS-mode.patch @@ -0,0 +1,29 @@ +From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Fri, 17 Mar 2017 13:14:56 +0100 +Subject: [PATCH] Fix `pip install` in FIPS mode + +Resolves: rhbz#1430774 +--- + pip/utils/hashes.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py +index 9602970..c6d7524 100644 +--- a/pip/utils/hashes.py ++++ b/pip/utils/hashes.py +@@ -39,7 +39,10 @@ class Hashes(object): + gots = {} + for hash_name in iterkeys(self._allowed): + try: +- gots[hash_name] = hashlib.new(hash_name) ++ if hash_name == 'md5': ++ gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False) ++ else: ++ gots[hash_name] = hashlib.new(hash_name) + except (ValueError, TypeError): + raise InstallationError('Unknown hash name: %s' % hash_name) + +-- +2.11.0 + diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch new file mode 100644 index 0000000..d0cead6 --- /dev/null +++ b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch @@ -0,0 +1,117 @@ +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): + "directory.") + + cmd_opts.add_option( ++ '--strip-file-prefix', ++ dest='strip_file_prefix', ++ metavar='prefix', ++ default=None, ++ help="Strip given prefix from script paths in wheel RECORD." ++ ) ++ ++ cmd_opts.add_option( + '--prefix', + dest='prefix_path', + metavar='dir', +@@ -315,6 +323,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): + else: + return True + +- 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) +@@ -828,7 +827,12 @@ class InstallRequirement(object): + version = pip.wheel.wheel_version(self.source_dir) + pip.wheel.check_compatibility(version, self.name) + +- 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 + +@@ -1021,7 +1025,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): + move_wheel_files( + self.name, self.req, wheeldir, + user=self.use_user_site, +@@ -1030,6 +1034,7 @@ class InstallRequirement(object): + prefix=prefix, + pycompile=self.pycompile, + isolated=self.isolated, ++ strip_file_prefix=strip_file_prefix, + ) + + 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 +@@ -238,7 +238,7 @@ def get_entrypoints(filename): + + + 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): + """Install a wheel""" + + if not scheme: +@@ -522,7 +522,11 @@ if __name__ == '__main__': + writer.writerow(row) + for f in generated: + h, l = rehash(f) +- 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/dead.package b/dead.package deleted file mode 100644 index 3b76f06..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7 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 new file mode 100644 index 0000000..477430b --- /dev/null +++ b/python-pip.spec @@ -0,0 +1,439 @@ +%global with_python3 1 +# python34 and python36 will share a bash-completion file, so don't try to +# enable with_python3_other without with_python3. +%global with_python3_other 1 +%global build_wheel 0 +%global with_tests 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 +%endif + +Name: python-%{srcname} +Version: 8.1.2 +Release: 8%{?dist} +Summary: A tool for installing and managing Python packages + +Group: Development/Libraries +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/ +%if 0%{?with_tests} +Source1: pip-8.1.2-tests.tar.gz +%endif + +# Patch until the following issue gets implemented upstream: +# https://github.com/pypa/pip/issues/1351 +Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch + +# Fix `pip install` failure in FIPS mode +# Resolves: rhbz#1430774 +Patch1: Fix-pip-install-in-FIPS-mode.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. + + +%package -n python2-%{srcname} +Summary: A tool for installing and managing Python 2 packages +Group: Development/Libraries +BuildRequires: python2-devel +BuildRequires: python-setuptools +%if 0%{?with_tests} +BuildRequires: git +BuildRequires: bzr +BuildRequires: python-mock +BuildRequires: pytest +BuildRequires: python-pretend +BuildRequires: python-freezegun +BuildRequires: python-pytest-capturelog +BuildRequires: python-scripttest +BuildRequires: python-virtualenv +%endif +%if 0%{?build_wheel} +BuildRequires: python2-pip +BuildRequires: python2-wheel +%endif +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. + + +%if 0%{?with_python3} +%package -n python%{python3_pkgversion}-%{srcname} +Summary: A tool for installing and managing Python3 packages +Group: Development/Libraries +# The python3 subpackages share the pip3 bash completion file, so force them to +# be upgraded together. +Conflicts: python%{python3_other_pkgversion}-%{srcname} < %{version}-%{release} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?with_tests} +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: python%{python3_pkgversion}-pip +BuildRequires: python%{python3_pkgversion}-wheel +%endif +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. +%endif # with_python3 + + +%if 0%{?with_python3} +%package -n python%{python3_other_pkgversion}-%{srcname} +Summary: A tool for installing and managing Python3 packages +# The python3 subpackages share the pip3 bash completion file, so force them to +# be upgraded together. +Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release} +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%if 0%{?with_tests} +BuildRequires: python%{python3_other_pkgversion}-mock +BuildRequires: python%{python3_other_pkgversion}-pytest +BuildRequires: python%{python3_other_pkgversion}-pretend +BuildRequires: python%{python3_other_pkgversion}-freezegun +BuildRequires: python%{python3_other_pkgversion}-pytest-capturelog +BuildRequires: python%{python3_other_pkgversion}-scripttest +BuildRequires: python%{python3_other_pkgversion}-virtualenv +%endif +%if 0%{?build_wheel} +BuildRequires: python%{python3_other_pkgversion}-pip +BuildRequires: python%{python3_other_pkgversion}-wheel +%endif +Requires: python%{python3_other_pkgversion}-setuptools + +%description -n python%{python3_other_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. +%endif # with_python3_other + + +%prep +%setup -q -n %{srcname}-%{version} +%if 0%{?with_tests} +tar -xf %{SOURCE1} +%endif + +%patch0 -p1 +%patch1 -p1 + +sed -i '1d' pip/__init__.py + + +%build +%if 0%{?build_wheel} +%py2_build_wheel +%else +%py2_build +%endif + +%if 0%{?with_python3} +%if 0%{?build_wheel} +%{?with_python3_other:%py3_other_build_wheel} +%py3_build_wheel +%else +%{?with_python3_other:%py3_other_build} +%py3_build +%endif +%endif # with_python3 + + +%install +%if 0%{?with_python3} +%if 0%{?build_wheel} +%if 0%{?with_python3_other} +%py3_other_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{,3} +%endif # with_python3_other +%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 +%{?with_python3_other:%py3_other_install} +%py3_install +%endif +%endif # with_python3 + +%if 0%{?build_wheel} +%py2_install_wheel %{python2_wheelname} +%else +%py2_install +%endif + +mkdir -p %{buildroot}%{bash_completion_dir} +PYTHONPATH=%{buildroot}%{python_sitelib} \ + %{buildroot}%{_bindir}/pip completion --bash \ + > %{buildroot}%{bash_completion_dir}/pip +%if 0%{?with_python3} +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + %{buildroot}%{_bindir}/pip3 completion --bash \ + > %{buildroot}%{bash_completion_dir}/pip3 +%endif +pips2=pip +pips3=pip3 +for pip in %{buildroot}%{_bindir}/pip*; do + pip=$(basename $pip) + case $pip in + pip2*) + pips2="$pips2 $pip" + ln -s pip %{buildroot}%{bash_completion_dir}/$pip + ;; +%if 0%{?with_python3} + pip3?*) + pips3="$pips3 $pip" + ln -s pip3 %{buildroot}%{bash_completion_dir}/$pip + ;; +%endif + esac +done +%if 0%{?with_python3} +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ + -e s/_pip_completion/_pip3_completion/ \ + %{buildroot}%{bash_completion_dir}/pip3 +%endif +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ + %{buildroot}%{bash_completion_dir}/pip + +%if 0%{?with_tests} +%check +py.test -m 'not network' +%{?with_python3:py.test-%{python3_version} -m 'not network'} +%{?with_python3_other:py.test-%{python3_other_version} -m 'not network'} +%endif + + +%files -n python2-%{srcname} +%license LICENSE.txt +%doc README.rst docs +%{_bindir}/pip +%{_bindir}/pip2 +%{_bindir}/pip%{python2_version} +%{python_sitelib}/pip +%{python_sitelib}/pip-%{version}-py%{python2_version}.egg-info +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir}/pip +%{bash_completion_dir}/pip2 +%{bash_completion_dir}/pip%{python2_version} + +%if 0%{?with_python3} +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE.txt +%doc README.rst docs +%{_bindir}/pip3 +%{_bindir}/pip%{python3_version} +%{python3_sitelib}/pip +%{python3_sitelib}/pip-%{version}-py%{python3_version}.egg-info +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir}/pip3 +%{bash_completion_dir}/pip%{python3_version} +%endif # with_python3 + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-%{srcname} +%license LICENSE.txt +%doc README.rst docs +%{_bindir}/pip%{python3_other_version} +%{python3_other_sitelib}/pip +%{python3_other_sitelib}/pip-%{version}-py%{python3_other_version}.egg-info +%dir %{_datadir}/bash-completion +%dir %{bash_completion_dir} +%{bash_completion_dir}/pip3 +%{bash_completion_dir}/pip%{python3_other_version} +%endif # with_python3_other + +%changelog +* Thu Mar 07 2019 Troy Dawson - 8.1.2-8 +- Rebuilt to change main python from 3.4 to 3.6 + +* Thu Jan 10 2019 Carl George - 8.1.2-7 +- Simplify bash-completion just for EL7 +- Add python36 subpackage + +* Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 +- Added Patch 1: Fix `pip install` failure in FIPS mode +Resolves: rhbz#1430774 + +* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 +- Enable EPEL Python 3 builds +- Use new python macros +- Cleanup spec +- Without wheel + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 +- Updated the test sources + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 +- Moved python-pip into the python2-pip subpackage +- Added the python_provide macro + +* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 17 2016 Tomas Orsava - 8.1.2-1 +- Update to 8.1.2 +- Moved to a new PyPI URL format +- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py + +* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 +- Update to 8.0.2 + +* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 +- Rebuilt for Python3.5 rebuild +- With wheel set to 1 + +* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 +- Rebuilt for Python3.5 rebuild + +* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 +- Update to 7.1.0 + +* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 +- Install bash completion +- Ship LICENSE.txt as %%license where available + +* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 +- Update to 7.0.3 + +* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 +- Update to 6.0.8 + +* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 +- Only enable tests on Fedora. + +* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 +- Add tests +- Add patch skipping tests requiring Internet access + +* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 +- Added patch for local dos with predictable temp dictionary names + (http://seclists.org/oss-sec/2014/q4/655) + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 +- Update to 1.5.6 + +* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 +- Rebuild as wheel for Python 3.4 + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 +- Disable build_wheel + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 +- Rebuild as wheel for Python 3.4 + +* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 +- Updated to 1.5.4 + +* Mon Oct 14 2013 Tim Flink - 1.4.1-1 +- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release +- Updated version to 1.4.1 + +* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 +- Fix for CVE 2013-2099 + +* Thu May 23 2013 Tim Flink - 1.3.1-3 +- undo python2 executable rename to python-pip. fixes #958377 +- fix summary to match upstream + +* Mon May 06 2013 Kevin Kofler - 1.3.1-2 +- Fix main package Summary, it's for Python 2, not 3 (#877401) + +* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 +- Update to 1.3.1, fix for CVE-2013-1888. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 09 2012 Tim Flink - 1.2.1-2 +- Fixing files for python3-pip + +* Thu Oct 04 2012 Tim Flink - 1.2.1-1 +- Update to upstream 1.2.1 +- Change binary from pip-python to python-pip (RHBZ#855495) +- Add alias from python-pip to pip-python, to be removed at a later date + +* Tue May 15 2012 Tim Flink - 1.1.0-1 +- Update to upstream 1.1.0 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sat Oct 22 2011 Tim Flink - 1.0.2-1 +- update to 1.0.2 and added python3 subpackage + +* Wed Jun 22 2011 Tim Flink - 0.8.3-1 +- update to 0.8.3 and project home page + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Luke Macken - 0.8.2-1 +- update to 0.8.2 of pip +* Mon Aug 30 2010 Peter Halliday - 0.8-1 +- update to 0.8 of pip +* Thu Jul 22 2010 David Malcolm - 0.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 +- update to 0.7.2 of pip +* Sun May 23 2010 Peter Halliday - 0.7.1-1 +- update to 0.7.1 of pip +* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 +- fix dependency issue +* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 +- fix spec file +* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 +- upgrade to 0.6.1 of pip +* Mon Aug 31 2009 Peter Halliday - 0.4-1 +- Initial package + diff --git a/skip-network-tests.patch b/skip-network-tests.patch new file mode 100644 index 0000000..9dec67e --- /dev/null +++ b/skip-network-tests.patch @@ -0,0 +1,1055 @@ +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 new file mode 100644 index 0000000..6722521 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz +e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz From 6771a1c54f5c7ac333c7af644c055da670027f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 7 Oct 2019 19:10:27 +0200 Subject: [PATCH 10/10] Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7 --- .gitignore | 18 - Fix-pip-install-in-FIPS-mode.patch | 29 - ...given-prefix-from-wheel-RECORD-files.patch | 117 -- dead.package | 1 + local-dos.patch | 395 ------ python-pip.spec | 439 ------- skip-network-tests.patch | 1055 ----------------- sources | 2 - 8 files changed, 1 insertion(+), 2055 deletions(-) delete mode 100644 .gitignore delete mode 100644 Fix-pip-install-in-FIPS-mode.patch delete mode 100644 allow-stripping-given-prefix-from-wheel-RECORD-files.patch create mode 100644 dead.package delete mode 100644 local-dos.patch delete mode 100644 python-pip.spec delete mode 100644 skip-network-tests.patch delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2153847..0000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -pip-0.7.2.tar.gz -/pip-0.8.tar.gz -/pip-0.8.2.tar.gz -/pip-0.8.3.tar.gz -/pip-1.0.2.tar.gz -/pip-1.1.tar.gz -/pip-1.3.1.tar.gz -/pip-1.4.1.tar.gz -/pip-1.5.4.tar.gz -/pip-1.5.6.tar.gz -/pip-1.5.6-tests.tar.gz -/pip-6.0.8.tar.gz -/pip-7.0.3.tar.gz -/pip-7.1.0.tar.gz -/pip-7.1.0-tests.tar.gz -/pip-8.0.2.tar.gz -/pip-8.1.2.tar.gz -/pip-8.1.2-tests.tar.gz diff --git a/Fix-pip-install-in-FIPS-mode.patch b/Fix-pip-install-in-FIPS-mode.patch deleted file mode 100644 index 0054e4f..0000000 --- a/Fix-pip-install-in-FIPS-mode.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Fri, 17 Mar 2017 13:14:56 +0100 -Subject: [PATCH] Fix `pip install` in FIPS mode - -Resolves: rhbz#1430774 ---- - pip/utils/hashes.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py -index 9602970..c6d7524 100644 ---- a/pip/utils/hashes.py -+++ b/pip/utils/hashes.py -@@ -39,7 +39,10 @@ class Hashes(object): - gots = {} - for hash_name in iterkeys(self._allowed): - try: -- gots[hash_name] = hashlib.new(hash_name) -+ if hash_name == 'md5': -+ gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False) -+ else: -+ gots[hash_name] = hashlib.new(hash_name) - except (ValueError, TypeError): - raise InstallationError('Unknown hash name: %s' % hash_name) - --- -2.11.0 - diff --git a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch b/allow-stripping-given-prefix-from-wheel-RECORD-files.patch deleted file mode 100644 index d0cead6..0000000 --- a/allow-stripping-given-prefix-from-wheel-RECORD-files.patch +++ /dev/null @@ -1,117 +0,0 @@ -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): - "directory.") - - cmd_opts.add_option( -+ '--strip-file-prefix', -+ dest='strip_file_prefix', -+ metavar='prefix', -+ default=None, -+ help="Strip given prefix from script paths in wheel RECORD." -+ ) -+ -+ cmd_opts.add_option( - '--prefix', - dest='prefix_path', - metavar='dir', -@@ -315,6 +323,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): - else: - return True - -- 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) -@@ -828,7 +827,12 @@ class InstallRequirement(object): - version = pip.wheel.wheel_version(self.source_dir) - pip.wheel.check_compatibility(version, self.name) - -- 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 - -@@ -1021,7 +1025,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): - move_wheel_files( - self.name, self.req, wheeldir, - user=self.use_user_site, -@@ -1030,6 +1034,7 @@ class InstallRequirement(object): - prefix=prefix, - pycompile=self.pycompile, - isolated=self.isolated, -+ strip_file_prefix=strip_file_prefix, - ) - - 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 -@@ -238,7 +238,7 @@ def get_entrypoints(filename): - - - 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): - """Install a wheel""" - - if not scheme: -@@ -522,7 +522,11 @@ if __name__ == '__main__': - writer.writerow(row) - for f in generated: - h, l = rehash(f) -- 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/dead.package b/dead.package new file mode 100644 index 0000000..3b76f06 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7 diff --git a/local-dos.patch b/local-dos.patch deleted file mode 100644 index 721ca51..0000000 --- a/local-dos.patch +++ /dev/null @@ -1,395 +0,0 @@ -diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py -index 8ed3d91..01b2104 100644 ---- a/pip/cmdoptions.py -+++ b/pip/cmdoptions.py -@@ -9,7 +9,7 @@ To be consistent, all options will follow this design. - """ - import copy - from optparse import OptionGroup, SUPPRESS_HELP, Option --from pip.locations import build_prefix, default_log_file -+from pip.locations import default_log_file - - - def make_option_group(group, parser): -@@ -297,10 +297,8 @@ build_dir = OptionMaker( - '-b', '--build', '--build-dir', '--build-directory', - dest='build_dir', - metavar='dir', -- default=build_prefix, -- help='Directory to unpack packages into and build in. ' -- 'The default in a virtualenv is "/build". ' -- 'The default for global installs is "/pip_build_".') -+ help='Directory to unpack packages into and build in.', -+) - - install_options = OptionMaker( - '--install-option', -diff --git a/pip/commands/install.py b/pip/commands/install.py -index cbf22a0..cb7d0db 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -10,6 +10,7 @@ from pip.basecommand import Command - from pip.index import PackageFinder - from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError - from pip import cmdoptions -+from pip.util import BuildDirectory - - - class InstallCommand(Command): -@@ -188,7 +189,7 @@ class InstallCommand(Command): - if ( - options.no_install or - options.no_download or -- (options.build_dir != build_prefix) or -+ options.build_dir or - options.no_clean - ): - logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, ' -@@ -197,7 +198,16 @@ class InstallCommand(Command): - if options.download_dir: - options.no_install = True - options.ignore_installed = True -- options.build_dir = os.path.abspath(options.build_dir) -+ -+ # If we have --no-install or --no-download and no --build we use the -+ # legacy static build dir -+ if (options.build_dir is None -+ and (options.no_install or options.no_download)): -+ options.build_dir = build_prefix -+ -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - options.src_dir = os.path.abspath(options.src_dir) - install_options = options.install_options or [] - if options.use_user_site: -@@ -246,73 +256,75 @@ class InstallCommand(Command): - - finder = self._build_package_finder(options, index_urls, session) - -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=options.src_dir, -- download_dir=options.download_dir, -- download_cache=options.download_cache, -- upgrade=options.upgrade, -- as_egg=options.as_egg, -- ignore_installed=options.ignore_installed, -- ignore_dependencies=options.ignore_dependencies, -- force_reinstall=options.force_reinstall, -- use_user_site=options.use_user_site, -- target_dir=temp_target_dir, -- session=session, -- pycompile=options.compile, -- ) -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- for name in options.editables: -- requirement_set.add_requirement( -- InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -- for filename in options.requirements: -- for req in parse_requirements(filename, finder=finder, options=options, session=session): -- requirement_set.add_requirement(req) -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- if options.find_links: -- msg = ('You must give at least one requirement to %(name)s ' -- '(maybe you meant "pip %(name)s %(links)s"?)' % -- dict(opts, links=' '.join(options.find_links))) -- else: -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.warn(msg) -- return -- -- try: -- if not options.no_download: -- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -- else: -- requirement_set.locate_files() -- -- if not options.no_install and not self.bundle: -- requirement_set.install( -- install_options, -- global_options, -- root=options.root_path, -- strip_file_prefix=options.strip_file_prefix) -- installed = ' '.join([req.name for req in -- requirement_set.successfully_installed]) -- if installed: -- logger.notify('Successfully installed %s' % installed) -- elif not self.bundle: -- downloaded = ' '.join([req.name for req in -- requirement_set.successfully_downloaded]) -- if downloaded: -- logger.notify('Successfully downloaded %s' % downloaded) -- elif self.bundle: -- requirement_set.create_bundle(self.bundle_filename) -- logger.notify('Created bundle in %s' % self.bundle_filename) -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- # Clean up -- if (not options.no_clean) and ((not options.no_install) or options.download_dir): -- requirement_set.cleanup_files(bundle=self.bundle) -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=options.src_dir, -+ download_dir=options.download_dir, -+ download_cache=options.download_cache, -+ upgrade=options.upgrade, -+ as_egg=options.as_egg, -+ ignore_installed=options.ignore_installed, -+ ignore_dependencies=options.ignore_dependencies, -+ force_reinstall=options.force_reinstall, -+ use_user_site=options.use_user_site, -+ target_dir=temp_target_dir, -+ session=session, -+ pycompile=options.compile, -+ ) -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ for name in options.editables: -+ requirement_set.add_requirement( -+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -+ for filename in options.requirements: -+ for req in parse_requirements(filename, finder=finder, options=options, session=session): -+ requirement_set.add_requirement(req) -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ if options.find_links: -+ msg = ('You must give at least one requirement to %(name)s ' -+ '(maybe you meant "pip %(name)s %(links)s"?)' % -+ dict(opts, links=' '.join(options.find_links))) -+ else: -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.warn(msg) -+ return -+ -+ try: -+ if not options.no_download: -+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -+ else: -+ requirement_set.locate_files() -+ -+ if not options.no_install and not self.bundle: -+ requirement_set.install( -+ install_options, -+ global_options, -+ root=options.root_path, -+ strip_file_prefix=options.strip_file_prefix) -+ installed = ' '.join([req.name for req in -+ requirement_set.successfully_installed]) -+ if installed: -+ logger.notify('Successfully installed %s' % installed) -+ elif not self.bundle: -+ downloaded = ' '.join([req.name for req in -+ requirement_set.successfully_downloaded]) -+ if downloaded: -+ logger.notify('Successfully downloaded %s' % downloaded) -+ elif self.bundle: -+ requirement_set.create_bundle(self.bundle_filename) -+ logger.notify('Created bundle in %s' % self.bundle_filename) -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ # Clean up -+ if (not options.no_clean) and ((not options.no_install) or options.download_dir): -+ requirement_set.cleanup_files(bundle=self.bundle) - - if options.target_dir: - if not os.path.exists(options.target_dir): -diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py -index 6527063..a96631a 100644 ---- a/pip/commands/wheel.py -+++ b/pip/commands/wheel.py -@@ -8,7 +8,7 @@ from pip.index import PackageFinder - from pip.log import logger - from pip.exceptions import CommandError, PreviousBuildDirError - from pip.req import InstallRequirement, RequirementSet, parse_requirements --from pip.util import normalize_path -+from pip.util import BuildDirectory, normalize_path - from pip.wheel import WheelBuilder - from pip import cmdoptions - -@@ -123,6 +123,9 @@ class WheelCommand(Command): - "--extra-index-url is suggested.") - index_urls += options.mirrors - -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - session = self._build_session(options) - - finder = PackageFinder(find_links=options.find_links, -@@ -137,59 +140,60 @@ class WheelCommand(Command): - session=session, - ) - -- options.build_dir = os.path.abspath(options.build_dir) -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=None, -- download_dir=None, -- download_cache=options.download_cache, -- ignore_dependencies=options.ignore_dependencies, -- ignore_installed=True, -- session=session, -- wheel_download_dir=options.wheel_dir -- ) -- -- # make the wheelhouse -- if not os.path.exists(options.wheel_dir): -- os.makedirs(options.wheel_dir) -- -- #parse args and/or requirements files -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- -- for filename in options.requirements: -- for req in parse_requirements( -- filename, -- finder=finder, -- options=options, -- session=session): -- if req.editable: -- logger.notify("ignoring %s" % req.url) -- continue -- requirement_set.add_requirement(req) -- -- #fail if no requirements -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.error(msg) -- return -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=None, -+ download_dir=None, -+ download_cache=options.download_cache, -+ ignore_dependencies=options.ignore_dependencies, -+ ignore_installed=True, -+ session=session, -+ wheel_download_dir=options.wheel_dir -+ ) - -- try: -- #build wheels -- wb = WheelBuilder( -- requirement_set, -- finder, -- options.wheel_dir, -- build_options = options.build_options or [], -- global_options = options.global_options or [] -- ) -- wb.build() -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- if not options.no_clean: -- requirement_set.cleanup_files() -+ # make the wheelhouse -+ if not os.path.exists(options.wheel_dir): -+ os.makedirs(options.wheel_dir) -+ -+ #parse args and/or requirements files -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ -+ for filename in options.requirements: -+ for req in parse_requirements( -+ filename, -+ finder=finder, -+ options=options, -+ session=session): -+ if req.editable: -+ logger.notify("ignoring %s" % req.url) -+ continue -+ requirement_set.add_requirement(req) -+ -+ #fail if no requirements -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.error(msg) -+ return -+ -+ try: -+ #build wheels -+ wb = WheelBuilder( -+ requirement_set, -+ finder, -+ options.wheel_dir, -+ build_options = options.build_options or [], -+ global_options = options.global_options or [] -+ ) -+ wb.build() -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ if not options.no_clean: -+ requirement_set.cleanup_files() -diff --git a/pip/util.py b/pip/util.py -index f459bb2..f5edeeb 100644 ---- a/pip/util.py -+++ b/pip/util.py -@@ -8,6 +8,7 @@ import zipfile - import tarfile - import subprocess - import textwrap -+import tempfile - - from pip.exceptions import InstallationError, BadCommand, PipError - from pip.backwardcompat import(WindowsError, string_types, raw_input, -@@ -718,3 +719,35 @@ def is_prerelease(vers): - - parsed = version._normalized_key(normalized) - return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed]) -+ -+ -+class BuildDirectory(object): -+ -+ def __init__(self, name=None, delete=None): -+ # If we were not given an explicit directory, and we were not given an -+ # explicit delete option, then we'll default to deleting. -+ if name is None and delete is None: -+ delete = True -+ -+ if name is None: -+ name = tempfile.mkdtemp(prefix="pip-build-") -+ # If we were not given an explicit directory, and we were not given -+ # an explicit delete option, then we'll default to deleting. -+ if delete is None: -+ delete = True -+ -+ self.name = name -+ self.delete = delete -+ -+ def __repr__(self): -+ return "<{} {!r}>".format(self.__class__.__name__, self.name) -+ -+ def __enter__(self): -+ return self.name -+ -+ def __exit__(self, exc, value, tb): -+ self.cleanup() -+ -+ def cleanup(self): -+ if self.delete: -+ rmtree(self.name) diff --git a/python-pip.spec b/python-pip.spec deleted file mode 100644 index 477430b..0000000 --- a/python-pip.spec +++ /dev/null @@ -1,439 +0,0 @@ -%global with_python3 1 -# python34 and python36 will share a bash-completion file, so don't try to -# enable with_python3_other without with_python3. -%global with_python3_other 1 -%global build_wheel 0 -%global with_tests 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 -%endif - -Name: python-%{srcname} -Version: 8.1.2 -Release: 8%{?dist} -Summary: A tool for installing and managing Python packages - -Group: Development/Libraries -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/ -%if 0%{?with_tests} -Source1: pip-8.1.2-tests.tar.gz -%endif - -# Patch until the following issue gets implemented upstream: -# https://github.com/pypa/pip/issues/1351 -Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch - -# Fix `pip install` failure in FIPS mode -# Resolves: rhbz#1430774 -Patch1: Fix-pip-install-in-FIPS-mode.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. - - -%package -n python2-%{srcname} -Summary: A tool for installing and managing Python 2 packages -Group: Development/Libraries -BuildRequires: python2-devel -BuildRequires: python-setuptools -%if 0%{?with_tests} -BuildRequires: git -BuildRequires: bzr -BuildRequires: python-mock -BuildRequires: pytest -BuildRequires: python-pretend -BuildRequires: python-freezegun -BuildRequires: python-pytest-capturelog -BuildRequires: python-scripttest -BuildRequires: python-virtualenv -%endif -%if 0%{?build_wheel} -BuildRequires: python2-pip -BuildRequires: python2-wheel -%endif -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. - - -%if 0%{?with_python3} -%package -n python%{python3_pkgversion}-%{srcname} -Summary: A tool for installing and managing Python3 packages -Group: Development/Libraries -# The python3 subpackages share the pip3 bash completion file, so force them to -# be upgraded together. -Conflicts: python%{python3_other_pkgversion}-%{srcname} < %{version}-%{release} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%if 0%{?with_tests} -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: python%{python3_pkgversion}-pip -BuildRequires: python%{python3_pkgversion}-wheel -%endif -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. -%endif # with_python3 - - -%if 0%{?with_python3} -%package -n python%{python3_other_pkgversion}-%{srcname} -Summary: A tool for installing and managing Python3 packages -# The python3 subpackages share the pip3 bash completion file, so force them to -# be upgraded together. -Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release} -BuildRequires: python%{python3_other_pkgversion}-devel -BuildRequires: python%{python3_other_pkgversion}-setuptools -%if 0%{?with_tests} -BuildRequires: python%{python3_other_pkgversion}-mock -BuildRequires: python%{python3_other_pkgversion}-pytest -BuildRequires: python%{python3_other_pkgversion}-pretend -BuildRequires: python%{python3_other_pkgversion}-freezegun -BuildRequires: python%{python3_other_pkgversion}-pytest-capturelog -BuildRequires: python%{python3_other_pkgversion}-scripttest -BuildRequires: python%{python3_other_pkgversion}-virtualenv -%endif -%if 0%{?build_wheel} -BuildRequires: python%{python3_other_pkgversion}-pip -BuildRequires: python%{python3_other_pkgversion}-wheel -%endif -Requires: python%{python3_other_pkgversion}-setuptools - -%description -n python%{python3_other_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. -%endif # with_python3_other - - -%prep -%setup -q -n %{srcname}-%{version} -%if 0%{?with_tests} -tar -xf %{SOURCE1} -%endif - -%patch0 -p1 -%patch1 -p1 - -sed -i '1d' pip/__init__.py - - -%build -%if 0%{?build_wheel} -%py2_build_wheel -%else -%py2_build -%endif - -%if 0%{?with_python3} -%if 0%{?build_wheel} -%{?with_python3_other:%py3_other_build_wheel} -%py3_build_wheel -%else -%{?with_python3_other:%py3_other_build} -%py3_build -%endif -%endif # with_python3 - - -%install -%if 0%{?with_python3} -%if 0%{?build_wheel} -%if 0%{?with_python3_other} -%py3_other_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{,3} -%endif # with_python3_other -%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 -%{?with_python3_other:%py3_other_install} -%py3_install -%endif -%endif # with_python3 - -%if 0%{?build_wheel} -%py2_install_wheel %{python2_wheelname} -%else -%py2_install -%endif - -mkdir -p %{buildroot}%{bash_completion_dir} -PYTHONPATH=%{buildroot}%{python_sitelib} \ - %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bash_completion_dir}/pip -%if 0%{?with_python3} -PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{buildroot}%{_bindir}/pip3 completion --bash \ - > %{buildroot}%{bash_completion_dir}/pip3 -%endif -pips2=pip -pips3=pip3 -for pip in %{buildroot}%{_bindir}/pip*; do - pip=$(basename $pip) - case $pip in - pip2*) - pips2="$pips2 $pip" - ln -s pip %{buildroot}%{bash_completion_dir}/$pip - ;; -%if 0%{?with_python3} - pip3?*) - pips3="$pips3 $pip" - ln -s pip3 %{buildroot}%{bash_completion_dir}/$pip - ;; -%endif - esac -done -%if 0%{?with_python3} -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ - -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bash_completion_dir}/pip3 -%endif -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \ - %{buildroot}%{bash_completion_dir}/pip - -%if 0%{?with_tests} -%check -py.test -m 'not network' -%{?with_python3:py.test-%{python3_version} -m 'not network'} -%{?with_python3_other:py.test-%{python3_other_version} -m 'not network'} -%endif - - -%files -n python2-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip -%{_bindir}/pip2 -%{_bindir}/pip%{python2_version} -%{python_sitelib}/pip -%{python_sitelib}/pip-%{version}-py%{python2_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip -%{bash_completion_dir}/pip2 -%{bash_completion_dir}/pip%{python2_version} - -%if 0%{?with_python3} -%files -n python%{python3_pkgversion}-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip3 -%{_bindir}/pip%{python3_version} -%{python3_sitelib}/pip -%{python3_sitelib}/pip-%{version}-py%{python3_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip3 -%{bash_completion_dir}/pip%{python3_version} -%endif # with_python3 - -%if 0%{?with_python3_other} -%files -n python%{python3_other_pkgversion}-%{srcname} -%license LICENSE.txt -%doc README.rst docs -%{_bindir}/pip%{python3_other_version} -%{python3_other_sitelib}/pip -%{python3_other_sitelib}/pip-%{version}-py%{python3_other_version}.egg-info -%dir %{_datadir}/bash-completion -%dir %{bash_completion_dir} -%{bash_completion_dir}/pip3 -%{bash_completion_dir}/pip%{python3_other_version} -%endif # with_python3_other - -%changelog -* Thu Mar 07 2019 Troy Dawson - 8.1.2-8 -- Rebuilt to change main python from 3.4 to 3.6 - -* Thu Jan 10 2019 Carl George - 8.1.2-7 -- Simplify bash-completion just for EL7 -- Add python36 subpackage - -* Wed Apr 04 2018 Tomas Orsava - 8.1.2-6 -- Added Patch 1: Fix `pip install` failure in FIPS mode -Resolves: rhbz#1430774 - -* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 -- Enable EPEL Python 3 builds -- Use new python macros -- Cleanup spec -- Without wheel - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 -- Updated the test sources - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 -- Moved python-pip into the python2-pip subpackage -- Added the python_provide macro - -* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Tue May 17 2016 Tomas Orsava - 8.1.2-1 -- Update to 8.1.2 -- Moved to a new PyPI URL format -- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py - -* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 -- Update to 8.0.2 - -* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 -- Rebuilt for Python3.5 rebuild -- With wheel set to 1 - -* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 -- Rebuilt for Python3.5 rebuild - -* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 -- Update to 7.1.0 - -* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 -- Install bash completion -- Ship LICENSE.txt as %%license where available - -* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 -- Update to 7.0.3 - -* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 -- Update to 6.0.8 - -* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 -- Only enable tests on Fedora. - -* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 -- Add tests -- Add patch skipping tests requiring Internet access - -* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 -- Added patch for local dos with predictable temp dictionary names - (http://seclists.org/oss-sec/2014/q4/655) - -* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 -- Update to 1.5.6 - -* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 -- Rebuild as wheel for Python 3.4 - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 -- Disable build_wheel - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 -- Rebuild as wheel for Python 3.4 - -* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 -- Updated to 1.5.4 - -* Mon Oct 14 2013 Tim Flink - 1.4.1-1 -- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release -- Updated version to 1.4.1 - -* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 -- Fix for CVE 2013-2099 - -* Thu May 23 2013 Tim Flink - 1.3.1-3 -- undo python2 executable rename to python-pip. fixes #958377 -- fix summary to match upstream - -* Mon May 06 2013 Kevin Kofler - 1.3.1-2 -- Fix main package Summary, it's for Python 2, not 3 (#877401) - -* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 -- Update to 1.3.1, fix for CVE-2013-1888. - -* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Oct 09 2012 Tim Flink - 1.2.1-2 -- Fixing files for python3-pip - -* Thu Oct 04 2012 Tim Flink - 1.2.1-1 -- Update to upstream 1.2.1 -- Change binary from pip-python to python-pip (RHBZ#855495) -- Add alias from python-pip to pip-python, to be removed at a later date - -* Tue May 15 2012 Tim Flink - 1.1.0-1 -- Update to upstream 1.1.0 - -* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sat Oct 22 2011 Tim Flink - 1.0.2-1 -- update to 1.0.2 and added python3 subpackage - -* Wed Jun 22 2011 Tim Flink - 0.8.3-1 -- update to 0.8.3 and project home page - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Dec 20 2010 Luke Macken - 0.8.2-1 -- update to 0.8.2 of pip -* Mon Aug 30 2010 Peter Halliday - 0.8-1 -- update to 0.8 of pip -* Thu Jul 22 2010 David Malcolm - 0.7.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 -- update to 0.7.2 of pip -* Sun May 23 2010 Peter Halliday - 0.7.1-1 -- update to 0.7.1 of pip -* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 -- fix dependency issue -* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 -- fix spec file -* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 -- upgrade to 0.6.1 of pip -* Mon Aug 31 2009 Peter Halliday - 0.4-1 -- Initial package - diff --git a/skip-network-tests.patch b/skip-network-tests.patch deleted file mode 100644 index 9dec67e..0000000 --- a/skip-network-tests.patch +++ /dev/null @@ -1,1055 +0,0 @@ -diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py ---- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 -+++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 -@@ -1,6 +1,7 @@ - import sys - import re - import textwrap -+import pytest - from doctest import OutputChecker, ELLIPSIS - - from tests.lib.local_repos import local_checkout, local_repo -@@ -58,6 +59,7 @@ def test_freeze_basic(script): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_svn(script, tmpdir): - """Test freezing a svn checkout""" - -@@ -79,6 +81,7 @@ def test_freeze_svn(script, tmpdir): - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_git_clone(script, tmpdir): - """ - Test freezing a Git clone. -@@ -109,6 +112,7 @@ def test_freeze_git_clone(script, tmpdir - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_mercurial_clone(script, tmpdir): - """ - Test freezing a Mercurial clone. -@@ -140,6 +144,7 @@ def test_freeze_mercurial_clone(script, - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_bazaar_clone(script, tmpdir): - """ - Test freezing a Bazaar clone. -@@ -175,6 +180,7 @@ def test_freeze_bazaar_clone(script, tmp - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_local_option(script): - """ - Test that wsgiref (from global site-packages) is reported normally, but not with --local. -@@ -205,6 +211,7 @@ def test_freeze_with_local_option(script - _check_output(result, expected) - - -+@pytest.mark.skipif(True, reason='No network') - def test_freeze_with_requirement_option(script): - """ - Test that new requirements are created correctly with --requirement hints -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-11-27 11:23:20.863671103 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-11-27 14:25:05.086297126 +0100 -@@ -1,4 +1,5 @@ - import os -+import pytest - - from os.path import abspath, exists, join - -@@ -20,6 +21,7 @@ def test_cleanup_after_install(script, d - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_install(script, data): - """ - Test --no-clean option blocks cleaning after install -@@ -29,6 +31,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_after_install_editable_from_hg(script, tmpdir): - """ - Test clean up after cloning from Mercurial. -@@ -87,6 +90,7 @@ def test_cleanup_req_satisifed_no_name(s - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_not_delete_existing_build_dir(script): - """ - It should not delete build/ if existing before run the command -@@ -123,6 +127,7 @@ def test_cleanup_after_egg_info_exceptio - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_cleanup_prevented_upon_build_dir_exception(script, data): - """ - Test no cleanup occurs after a PreviousBuildDirError -diff -up pip-1.5.6/tests/functional/test_install_compat.py.orig pip-1.5.6/tests/functional/test_install_compat.py ---- pip-1.5.6/tests/functional/test_install_compat.py.orig 2014-11-27 11:23:20.912671389 +0100 -+++ pip-1.5.6/tests/functional/test_install_compat.py 2014-11-27 11:30:36.533251976 +0100 -@@ -3,9 +3,11 @@ Tests for compatibility workarounds. - - """ - import os -+import pytest - from tests.lib import pyversion, assert_all_changes - - -+@pytest.mark.skipif(True, reason='No network') - def test_debian_egg_name_workaround(script): - """ - We can uninstall packages installed with the pyversion removed from the -diff -up pip-1.5.6/tests/functional/test_install_config.py.orig pip-1.5.6/tests/functional/test_install_config.py ---- pip-1.5.6/tests/functional/test_install_config.py.orig 2014-11-27 11:23:20.920671436 +0100 -+++ pip-1.5.6/tests/functional/test_install_config.py 2014-11-27 11:30:03.530051860 +0100 -@@ -1,7 +1,7 @@ - import os - import tempfile - import textwrap -- -+import pytest - - def test_options_from_env_vars(script): - """ -@@ -28,6 +28,7 @@ def test_command_line_options_override_e - assert "Getting page http://download.zope.org/ppix" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_env_vars_override_config_file(script, virtualenv): - """ - Test that environmental variables override settings in config files. -@@ -62,6 +63,7 @@ def _test_env_vars_override_config_file( - assert "Successfully installed INITools" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_append_flags(script, virtualenv, data): - """ - Test command line flags that append to defaults set by environmental variables. -@@ -76,6 +78,7 @@ def test_command_line_append_flags(scrip - assert "Skipping link %s" % data.find_links in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_command_line_appends_correctly(script, data): - """ - Test multiple appending options set by environmental variables. -diff -up pip-1.5.6/tests/functional/test_install_download.py.orig pip-1.5.6/tests/functional/test_install_download.py ---- pip-1.5.6/tests/functional/test_install_download.py.orig 2014-11-27 11:23:20.970671729 +0100 -+++ pip-1.5.6/tests/functional/test_install_download.py 2014-11-27 11:29:42.503924368 +0100 -@@ -1,9 +1,11 @@ - import os - import textwrap -+import pytest - - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_if_requested(script): - """ - It should download (in the scratch path) and not install if requested. -@@ -13,6 +15,7 @@ def test_download_if_requested(script): - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_wheel(script): - """ - Test using "pip install --download" to download a *.whl archive. -@@ -26,6 +29,7 @@ def test_download_wheel(script): - assert script.site_packages/ 'piptestpackage' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_single_download_from_requirements_file(script): - """ - It should support download (in the scratch path) from PyPi from a requirements file -@@ -38,6 +42,7 @@ def test_single_download_from_requiremen - assert script.site_packages/ 'initools' not in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_download_dependencies(script): - """ - It should download dependencies (in the scratch path) -@@ -77,6 +82,7 @@ def test_download_should_download_wheel_ - assert Path('scratch') / dep_filename in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_should_skip_existing_files(script): - """ - It should not download files already existing in the scratch dir -diff -up pip-1.5.6/tests/functional/test_install_extras.py.orig pip-1.5.6/tests/functional/test_install_extras.py ---- pip-1.5.6/tests/functional/test_install_extras.py.orig 2014-11-27 11:23:21.066672291 +0100 -+++ pip-1.5.6/tests/functional/test_install_extras.py 2014-11-27 11:31:01.854405511 +0100 -@@ -1,6 +1,8 @@ -+import pytest - from os.path import join - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_extras_install_from_pypi(script): - """ - Test installing a package from PyPI using extras dependency Paste[openid]. -@@ -10,6 +12,7 @@ def test_simple_extras_install_from_pypi - assert initools_folder in result.files_created, result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_extras_uninstall(script): - """ - No extras dependency gets uninstalled when the root package is uninstalled -diff -up pip-1.5.6/tests/functional/test_install.py.orig pip-1.5.6/tests/functional/test_install.py ---- pip-1.5.6/tests/functional/test_install.py.orig 2014-11-27 11:23:20.227667380 +0100 -+++ pip-1.5.6/tests/functional/test_install.py 2014-11-27 11:23:20.825670880 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_without_setuptools(script): - script.run("pip", "uninstall", "setuptools", "-y") - result = script.run( -@@ -26,6 +27,7 @@ def test_without_setuptools(script): - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_second_command_line_interface_works(script): - """ - Check if ``pip`` commands behaves equally -@@ -39,6 +41,7 @@ def test_pip_second_command_line_interfa - assert initools_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_from_pypi(script): - """ - Test installing a package from PyPI. -@@ -60,6 +63,7 @@ def test_editable_install(script): - assert not result.files_updated, result.files_updated - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_svn(script, tmpdir): - """ - Test checking out from svn. -@@ -71,6 +75,7 @@ def test_install_editable_from_svn(scrip - result.assert_installed('INITools', with_files=['.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_download_editable_to_custom_path(script, tmpdir): - """ - Test downloading an editable using a relative custom src folder. -@@ -94,6 +99,7 @@ def test_download_editable_to_custom_pat - assert customdl_files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_editable_no_install_followed_by_no_download(script, tmpdir): - """ - Test installing an editable in two steps (first with --no-install, then with --no-download). -@@ -113,6 +119,7 @@ def test_editable_no_install_followed_by - result.assert_installed('INITools', without_files=[curdir, '.svn']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_followed_by_no_download(script): - """ - Test installing in two steps (first with --no-install, then with --no-download). -@@ -143,6 +150,7 @@ def test_bad_install_with_no_download(sc - "an equivalent install with --no-install?" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_dev_version_from_pypi(script): - """ - Test using package==dev. -@@ -154,6 +162,7 @@ def test_install_dev_version_from_pypi(s - assert (script.site_packages / 'initools') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git(script, tmpdir): - """ - Test cloning from Git. -@@ -166,6 +175,7 @@ def test_install_editable_from_git(scrip - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_hg(script, tmpdir): - """ - Test cloning from Mercurial. -@@ -177,6 +187,7 @@ def test_install_editable_from_hg(script - result.assert_installed('ScriptTest', with_files=['.hg']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_final_slash_normalization(script, tmpdir): - """ - Test that presence or absence of final slash in VCS URL is normalized. -@@ -188,6 +199,7 @@ def test_vcs_url_final_slash_normalizati - assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_bazaar(script, tmpdir): - """ - Test checking out from Bazaar. -@@ -199,6 +211,7 @@ def test_install_editable_from_bazaar(sc - result.assert_installed('django-wikiapp', with_files=['.bzr']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_vcs_url_urlquote_normalization(script, tmpdir): - """ - Test that urlquoted characters are normalized for repo URL comparison. -@@ -295,6 +308,7 @@ def test_install_pardir(script, data): - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option(script): - """ - Test using global distutils options. -@@ -320,6 +334,7 @@ def test_install_with_hacked_egg_info(sc - assert 'Successfully installed hackedegginfo\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_using_install_option_and_editable(script, tmpdir): - """ - Test installing a tool using -e and --install-option -@@ -334,6 +349,7 @@ def test_install_using_install_option_an - assert virtualenv_bin in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_global_option_using_editable(script, tmpdir): - """ - Test using global distutils options, but in an editable installation -@@ -345,6 +361,7 @@ def test_install_global_option_using_edi - assert '0.2.5\n' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_same_name_in_curdir(script): - """ - Test installing a package with the same name of a local folder -@@ -398,6 +415,7 @@ def test_install_folder_using_relative_p - assert egg_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_which_contains_dev_in_name(script): - """ - Test installing package from pypi which contains 'dev' in name -@@ -409,6 +427,7 @@ def test_install_package_which_contains_ - assert egg_info_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_package_with_target(script): - """ - Test installing a package using pip install --target -@@ -481,6 +500,7 @@ def test_url_req_case_mismatch(script, d - assert egg_folder not in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_compiles_pyc(script): - """ - Test installing with --compile on -@@ -501,6 +521,7 @@ def test_compiles_pyc(script): - assert any(exists) - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_compiles_pyc(script, data): - """ - Test installing from wheel with --compile on -diff -up pip-1.5.6/tests/functional/test_install_reqs.py.orig pip-1.5.6/tests/functional/test_install_reqs.py ---- pip-1.5.6/tests/functional/test_install_reqs.py.orig 2014-11-27 11:23:21.114672571 +0100 -+++ pip-1.5.6/tests/functional/test_install_reqs.py 2014-11-27 14:25:42.443560282 +0100 -@@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ - from tests.lib.path import Path - - -+@pytest.mark.skipif(True, reason='No network') - def test_requirements_file(script): - """ - Test installing from a requirements file. -@@ -59,6 +60,7 @@ def test_relative_requirements_file(scri - assert (script.site_packages/'fspkg') in result.files_created, str(result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_requirements_files(script, tmpdir): - """ - Test installing from multiple nested requirements files. -@@ -110,6 +112,7 @@ def test_install_local_editable_with_ext - assert script.site_packages/'simple' in res.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_local_editable_with_subdirectory(script): - version_pkg_path = _create_test_package_with_subdirectory(script, - 'version_subpkg') -diff -up pip-1.5.6/tests/functional/test_install_upgrade.py.orig pip-1.5.6/tests/functional/test_install_upgrade.py ---- pip-1.5.6/tests/functional/test_install_upgrade.py.orig 2014-11-27 11:23:21.159672835 +0100 -+++ pip-1.5.6/tests/functional/test_install_upgrade.py 2014-11-27 11:23:21.743676253 +0100 -@@ -22,6 +22,7 @@ def test_no_upgrade_unless_requested(scr - assert not result.files_created, 'pip install INITools upgraded when it should not have' - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_specific_version(script): - """ - It does upgrade to specific version requested. -@@ -34,6 +35,7 @@ def test_upgrade_to_specific_version(scr - assert script.site_packages/'INITools-0.2-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_if_requested(script): - """ - And it does upgrade if requested. -@@ -56,6 +58,7 @@ def test_upgrade_with_newest_already_ins - assert 'already up-to-date' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_force_reinstall_newest(script): - """ - Force reinstallation of a package even if it is already at its newest -@@ -69,6 +72,7 @@ def test_upgrade_force_reinstall_newest( - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade(script): - """ - Automatic uninstall-before-upgrade. -@@ -82,6 +86,7 @@ def test_uninstall_before_upgrade(script - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_before_upgrade_from_url(script): - """ - Automatic uninstall-before-upgrade from URL. -@@ -95,6 +100,7 @@ def test_uninstall_before_upgrade_from_u - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_to_same_version_from_url(script): - """ - When installing from a URL the same version that is already installed, no -@@ -109,6 +115,7 @@ def test_upgrade_to_same_version_from_ur - assert_all_changes(result, result3, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_from_reqs_file(script): - """ - Upgrade from a requirements file. -@@ -161,6 +168,7 @@ def test_editable_git_upgrade(script): - assert 'some different version' in version2.stdout, "Output: %s" % (version2.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_should_not_install_always_from_cache(script): - """ - If there is an old cached package, pip should download the newer version -@@ -173,6 +181,7 @@ def test_should_not_install_always_from_ - assert script.site_packages/'INITools-0.1-py%s.egg-info' % pyversion in result.files_created - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_with_ignoreinstalled_requested(script): - """ - Test old conflicting package is completely ignored -@@ -185,6 +194,7 @@ def test_install_with_ignoreinstalled_re - assert os.path.exists(script.site_packages_path/'INITools-0.3-py%s.egg-info' % pyversion) - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_no_dists_found(script, tmpdir): - """It can upgrade a VCS requirement that has no distributions otherwise.""" - req = "%s#egg=pip-test-package" % local_checkout( -@@ -194,6 +204,7 @@ def test_upgrade_vcs_req_with_no_dists_f - assert not result.returncode - - -+@pytest.mark.skipif(True, reason='No network') - def test_upgrade_vcs_req_with_dist_found(script): - """It can upgrade a VCS requirement that has distributions on the index.""" - # TODO(pnasrat) Using local_checkout fails on windows - oddness with the test path urls/git. -diff -up pip-1.5.6/tests/functional/test_install_user.py.orig pip-1.5.6/tests/functional/test_install_user.py ---- pip-1.5.6/tests/functional/test_install_user.py.orig 2014-11-27 11:23:21.750676293 +0100 -+++ pip-1.5.6/tests/functional/test_install_user.py 2014-11-27 11:23:22.157678676 +0100 -@@ -42,7 +42,8 @@ def _patch_dist_in_site_packages(script) - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UserSite: - -- def test_reset_env_system_site_packages_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_reset_env_system_site_packages_usersite(self, script, virtualenv): - """ - reset_env(system_site_packages=True) produces env where a --user install can be found using pkg_resources - """ -@@ -53,7 +54,8 @@ class Tests_UserSite: - assert 'INITools'== project_name, "'%s' should be 'INITools'" %project_name - - -- def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): - """ - Test installing current directory ('.') into usersite after installing distribute - """ -@@ -85,7 +87,8 @@ class Tests_UserSite: - result = script.pip('install', '--user', curdir, cwd=run_from, expect_error=True) - assert "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." in result.stdout - -- def test_install_user_conflict_in_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_usersite(self, script, virtualenv): - """ - Test user install with conflict in usersite updates usersite. - """ -@@ -99,7 +102,8 @@ class Tests_UserSite: - assert egg_info_folder in result2.files_created, str(result2) - assert not isfile(initools_v3_file), initools_v3_file - -- def test_install_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install with conflict in global site ignores site and installs to usersite - """ -@@ -129,7 +133,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): - """ - Test user install/upgrade with conflict in global site ignores site and installs to usersite - """ -@@ -159,7 +164,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder), result2.stdout - assert isdir(initools_folder) - -- def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): - """ - Test user install with conflict in globalsite and usersite ignores global site and updates usersite. - """ -@@ -190,7 +196,8 @@ class Tests_UserSite: - assert isdir(egg_info_folder) - assert isdir(initools_folder) - -- def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): - """ - Test user install in --system-site-packages virtualenv with conflict in site fails. - """ -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-11-27 14:27:33.238340755 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-11-27 14:28:28.154727603 +0100 -@@ -36,6 +36,7 @@ def test_get_refs_should_return_branch_n - assert result['branch0.1'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_ignore_no_branch(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) -@@ -79,6 +80,7 @@ def test_check_rev_options_should_handle - - # TODO(pnasrat) fix all helpers to do right things with paths on windows. - @pytest.mark.skipif("sys.platform == 'win32'") -+@pytest.mark.skipif(True, reason='No network') - def test_check_submodule_addition(script): - """ - Submodules are pulled in on install and updated on upgrade. -diff -up pip-1.5.6/tests/functional/test_install_vcs.py.orig pip-1.5.6/tests/functional/test_install_vcs.py ---- pip-1.5.6/tests/functional/test_install_vcs.py.orig 2014-11-27 11:23:22.169678746 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs.py 2014-11-27 14:27:14.133206173 +0100 -@@ -1,7 +1,9 @@ -+import pytest - from tests.lib import _create_test_package, _change_test_package_version - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_editable_from_git_with_https(script, tmpdir): - """ - Test cloning from Git with https. -@@ -13,6 +15,7 @@ def test_install_editable_from_git_with_ - result.assert_installed('pip-test-package', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_sha1_revisions(script): - """ - Git backend should be able to install from SHA1 revisions -@@ -25,6 +28,7 @@ def test_git_with_sha1_revisions(script) - assert '0.1' in version.stdout, version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_branch_name_as_revision(script): - """ - Git backend should be able to install from branch names -@@ -37,6 +41,7 @@ def test_git_with_branch_name_as_revisio - assert 'some different version' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_as_revision(script): - """ - Git backend should be able to install from tag names -@@ -49,6 +54,7 @@ def test_git_with_tag_name_as_revision(s - assert '0.1' in version.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_tag_name_and_update(script, tmpdir): - """ - Test cloning a git repository and updating to a different version. -@@ -64,6 +70,7 @@ def test_git_with_tag_name_and_update(sc - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_branch_should_not_be_changed(script, tmpdir): - """ - Editable installations should not change branch -@@ -77,6 +84,7 @@ def test_git_branch_should_not_be_change - assert '* master' in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_unpacking(script, tmpdir): - """ - Test cloning a git repository from a non-editable URL with a given tag. -@@ -88,6 +96,7 @@ def test_git_with_non_editable_unpacking - assert '0.1.2' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from an editable url which contains "dev" string -@@ -97,6 +106,7 @@ def test_git_with_editable_where_egg_con - result.assert_installed('django-devserver', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_non_editable_where_egg_contains_dev_string(script, tmpdir): - """ - Test cloning a git repository from a non-editable url which contains "dev" string -@@ -107,6 +117,7 @@ def test_git_with_non_editable_where_egg - assert devserver_folder in result.files_created, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_with_ambiguous_revs(script): - """ - Test git with two "names" (tag/branch) pointing to the same commit -@@ -121,6 +132,7 @@ def test_git_with_ambiguous_revs(script) - result.assert_installed('version-pkg', with_files=['.git']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_git_works_with_editable_non_origin_repo(script): - # set up, create a git repo and install it as editable from a local directory path - version_pkg_path = _create_test_package(script) -diff -up pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig pip-1.5.6/tests/functional/test_install_vcs_svn.py ---- pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig 2014-11-27 14:30:00.551378474 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_svn.py 2014-11-27 14:30:03.217397254 +0100 -@@ -1,7 +1,8 @@ -+import pytest - from mock import patch - from pip.vcs.subversion import Subversion - -- -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -@@ -11,6 +12,7 @@ def test_obtain_should_recognize_auth_in - 'http://username:password@svn.example.com/', script.scratch_path/'test']) - - -+@pytest.mark.skipif(True, reason='No network') - @patch('pip.vcs.subversion.call_subprocess') - def test_export_should_recognize_auth_info_url(call_subprocess_mock, script): - svn = Subversion(url='svn+http://username:password@svn.example.com/') -diff -up pip-1.5.6/tests/functional/test_install_wheel.py.orig pip-1.5.6/tests/functional/test_install_wheel.py ---- pip-1.5.6/tests/functional/test_install_wheel.py.orig 2014-11-27 11:23:22.371679928 +0100 -+++ pip-1.5.6/tests/functional/test_install_wheel.py 2014-11-27 11:23:22.372679934 +0100 -@@ -92,6 +92,7 @@ def test_install_from_wheel_with_headers - result.stdout) - - -+@pytest.mark.skipif(True, reason='No network') - def test_install_wheel_with_target(script, data): - """ - Test installing a wheel using pip install --target -diff -up pip-1.5.6/tests/functional/test_list.py.orig pip-1.5.6/tests/functional/test_list.py ---- pip-1.5.6/tests/functional/test_list.py.orig 2014-11-27 11:23:22.379679974 +0100 -+++ pip-1.5.6/tests/functional/test_list.py 2014-11-27 11:31:06.129431433 +0100 -@@ -1,6 +1,7 @@ - import os - import re - import textwrap -+import pytest - - from tests.lib.local_repos import local_checkout - -@@ -26,6 +27,7 @@ def test_local_flag(script, data): - assert 'simple (1.0)' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_uptodate_flag(script, data): - """ - Test the behavior of --uptodate flag in the list command -@@ -39,6 +41,7 @@ def test_uptodate_flag(script, data): - assert 'simple2 (3.0)' in result.stdout, str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_outdated_flag(script, data): - """ - Test the behavior of --outdated flag in the list command -@@ -52,6 +55,7 @@ def test_outdated_flag(script, data): - assert 'simple2' not in result.stdout, str(result) #3.0 is latest - - -+@pytest.mark.skipif(True, reason='No network') - def test_editables_flag(script, data): - """ - Test the behavior of --editables flag in the list command -diff -up pip-1.5.6/tests/functional/test_search.py.orig pip-1.5.6/tests/functional/test_search.py ---- pip-1.5.6/tests/functional/test_search.py.orig 2014-11-27 11:23:22.903683041 +0100 -+++ pip-1.5.6/tests/functional/test_search.py 2014-11-27 11:30:57.397378486 +0100 -@@ -1,3 +1,4 @@ -+import pytest - import pip.download - from pip.commands.search import (compare_versions, - highest_version, -@@ -53,6 +54,7 @@ def test_invalid_pypi_transformation(): - assert transform_hits(pypi_hits) == expected - - -+@pytest.mark.skipif(True, reason='No network') - def test_search(script): - """ - End to end test of search command. -@@ -62,6 +64,7 @@ def test_search(script): - assert 'A tool for installing and managing Python packages' in output.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_multiple_search(script): - """ - Test searching for multiple packages at once. -@@ -80,6 +83,7 @@ def test_search_missing_argument(script) - assert 'ERROR: Missing required argument (search query).' in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_sucess_when_find_packages(): - """ - Test SearchCommand.run for found package -@@ -91,6 +95,7 @@ def test_run_method_should_return_sucess - assert status == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_run_method_should_return_no_matches_found_when_does_not_find_packages(): - """ - Test SearchCommand.run for no matches -@@ -102,6 +107,7 @@ def test_run_method_should_return_no_mat - assert status == NO_MATCHES_FOUND, status - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_should_exit_status_code_zero_when_find_packages(script): - """ - Test search exit status code for package found -@@ -110,6 +116,7 @@ def test_search_should_exit_status_code_ - assert result.returncode == SUCCESS - - -+@pytest.mark.skipif(True, reason='No network') - def test_search_exit_status_code_when_finds_no_package(script): - """ - Test search exit status code for no matches -diff -up pip-1.5.6/tests/functional/test_show.py.orig pip-1.5.6/tests/functional/test_show.py ---- pip-1.5.6/tests/functional/test_show.py.orig 2014-11-27 11:23:23.160684545 +0100 -+++ pip-1.5.6/tests/functional/test_show.py 2014-11-27 11:30:52.417348289 +0100 -@@ -1,4 +1,5 @@ - import re -+import pytest - from pip import __version__ - from pip.commands.show import search_packages_info - -@@ -34,6 +35,7 @@ def test_show_with_files_not_found(scrip - assert lines[6] == 'Cannot locate installed-files.txt', lines[5] - - -+@pytest.mark.skipif(True, reason='No network') - def test_show_with_all_files(script): - """ - Test listing all files in the show command. -diff -up pip-1.5.6/tests/functional/test_uninstall.py.orig pip-1.5.6/tests/functional/test_uninstall.py ---- pip-1.5.6/tests/functional/test_uninstall.py.orig 2014-11-27 11:23:23.168684592 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall.py 2014-11-27 11:30:22.367166080 +0100 -@@ -3,6 +3,7 @@ from __future__ import with_statement - import textwrap - import os - import sys -+import pytest - from os.path import join, abspath, normpath - from tempfile import mkdtemp - from mock import patch -@@ -12,6 +13,7 @@ from tests.lib.local_repos import local_ - from pip.util import rmtree - - -+@pytest.mark.skipif(True, reason='No network') - def test_simple_uninstall(script): - """ - Test simple install and uninstall. -@@ -25,6 +27,7 @@ def test_simple_uninstall(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_with_scripts(script): - """ - Uninstall an easy_installed package with scripts. -@@ -38,6 +41,7 @@ def test_uninstall_with_scripts(script): - assert_all_changes(result, result2, [script.venv/'build', 'cache', easy_install_pth]) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_install_after_import(script): - """ - Uninstall an easy_installed package after it's been imported -@@ -50,6 +54,7 @@ def test_uninstall_easy_install_after_im - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_namespace_package(script): - """ - Uninstall a distribution with a namespace package without clobbering -@@ -90,6 +95,7 @@ def test_uninstall_overlapping_package(s - assert_all_changes(result2, result3, []) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_console_scripts(script): - """ - Test uninstalling a package with more files (console_script entry points, extra directories). -@@ -102,6 +108,7 @@ def test_uninstall_console_scripts(scrip - assert_all_changes(result, result2, [script.venv/'build', 'cache']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_easy_installed_console_scripts(script): - """ - Test uninstalling package with console_scripts that is easy_installed. -@@ -114,6 +121,7 @@ def test_uninstall_easy_installed_consol - assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_from_svn(script, tmpdir): - """ - Test uninstalling an editable installation from svn. -@@ -126,6 +134,7 @@ def test_uninstall_editable_from_svn(scr - assert_all_changes(result, result2, [script.venv/'src', script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_editable_with_source_outside_venv(script, tmpdir): - """ - Test uninstalling editable install from existing source outside the venv. -@@ -149,6 +158,7 @@ def _test_uninstall_editable_with_source - assert_all_changes(result, result3, [script.venv/'build', script.site_packages/'easy-install.pth']) - - -+@pytest.mark.skipif(True, reason='No network') - def test_uninstall_from_reqs_file(script, tmpdir): - """ - Test uninstall from a requirements file. -diff -up pip-1.5.6/tests/functional/test_uninstall_user.py.orig pip-1.5.6/tests/functional/test_uninstall_user.py ---- pip-1.5.6/tests/functional/test_uninstall_user.py.orig 2014-11-27 11:23:23.590687062 +0100 -+++ pip-1.5.6/tests/functional/test_uninstall_user.py 2014-11-27 11:29:55.413002643 +0100 -@@ -17,7 +17,8 @@ from tests.functional.test_install_user - @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") - class Tests_UninstallUserSite: - -- def test_uninstall_from_usersite(self, script, virtualenv): -+ @pytest.mark.skipif(True, reason='No network') -+ def test_uninstall_from_usersite(self, script, virtualenv): - """ - Test uninstall from usersite - """ -diff -up pip-1.5.6/tests/functional/test_wheel.py.orig pip-1.5.6/tests/functional/test_wheel.py ---- pip-1.5.6/tests/functional/test_wheel.py.orig 2014-11-27 11:23:23.598687109 +0100 -+++ pip-1.5.6/tests/functional/test_wheel.py 2014-11-27 11:30:30.345214455 +0100 -@@ -2,6 +2,7 @@ - import os - import sys - import textwrap -+import pytest - - from os.path import exists - -@@ -20,6 +21,7 @@ def test_pip_wheel_fails_without_wheel(s - assert "'pip wheel' requires the 'wheel' package" in result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_success(script, data): - """ - Test 'pip wheel' success. -@@ -32,6 +34,7 @@ def test_pip_wheel_success(script, data) - assert "Successfully built simple" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_downloads_wheels(script, data): - """ - Test 'pip wheel' downloads wheels -@@ -46,6 +49,7 @@ def test_pip_wheel_downloads_wheels(scri - assert "Saved" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail(script, data): - """ - Test 'pip wheel' failure. -@@ -59,6 +63,7 @@ def test_pip_wheel_fail(script, data): - assert "Failed to build wheelbroken" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_ignore_wheels_editables(script, data): - """ - Test 'pip wheel' ignores editables -@@ -85,6 +90,7 @@ def test_pip_wheel_ignore_wheels_editabl - assert ignore_editable in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_clean_option_blocks_cleaning_after_wheel(script, data): - """ - Test --no-clean option blocks cleaning after wheel build -@@ -95,6 +101,7 @@ def test_no_clean_option_blocks_cleaning - assert exists(build), "build/simple should still exist %s" % str(result) - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_source_deps(script, data): - """ - Test 'pip wheel --use-wheel' finds and builds source archive dependencies of wheels -@@ -108,6 +115,7 @@ def test_pip_wheel_source_deps(script, d - assert "Successfully built source" in result.stdout, result.stdout - - -+@pytest.mark.skipif(True, reason='No network') - def test_pip_wheel_fail_cause_of_previous_build_dir(script, data): - """Test when 'pip wheel' tries to install a package that has a previous build directory""" - -diff -up pip-1.5.6/tests/unit/test_finder.py.orig pip-1.5.6/tests/unit/test_finder.py ---- pip-1.5.6/tests/unit/test_finder.py.orig 2014-11-27 11:23:23.937689093 +0100 -+++ pip-1.5.6/tests/unit/test_finder.py 2014-11-27 14:30:48.597716927 +0100 -@@ -71,6 +71,7 @@ def test_finder_detects_latest_already_s - finder.find_requirement(req, True) - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_detects_latest_already_satisfied_pypi_links(): - """Test PackageFinder detects latest already satisified using pypi links""" - req = InstallRequirement.from_line('initools', None) -@@ -199,6 +200,7 @@ def test_finder_priority_file_over_page( - assert link.url.startswith("file://") - - -+@pytest.mark.skipif(True, reason='No network') - def test_finder_priority_page_over_deplink(): - """Test PackageFinder prefers page links over equivalent dependency links""" - req = InstallRequirement.from_line('gmpy==1.15', None) -diff -up pip-1.5.6/tests/unit/test_req.py.orig pip-1.5.6/tests/unit/test_req.py ---- pip-1.5.6/tests/unit/test_req.py.orig 2014-11-27 11:23:23.946689145 +0100 -+++ pip-1.5.6/tests/unit/test_req.py 2014-11-27 11:23:23.947689151 +0100 -@@ -149,6 +149,7 @@ def test_parse_editable_local_extras(isd - normcase_mock.return_value = "/some/path/foo" - assert parse_editable('foo[bar,baz]', 'git') == (None, 'file:///some/path/foo', ('bar', 'baz')) - -+@pytest.mark.skipif(True, reason='No network') - def test_remote_reqs_parse(): - """ - Test parsing a simple remote requirements file -diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py ---- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-12-01 13:31:24.075490830 +0100 -+++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-12-01 13:30:59.208326741 +0100 -@@ -62,6 +62,7 @@ def test_cleanup_after_install_from_loca - script.assert_no_temp() - - -+@pytest.mark.skipif(True, reason='No network') - def test_no_install_and_download_should_not_leave_build_dir(script): - """ - It should remove build/ dir if it was pip that created -diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py ---- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-12-01 13:32:11.419803237 +0100 -+++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-12-01 13:32:30.298927814 +0100 -@@ -13,6 +13,7 @@ from tests.lib.git_submodule_helpers imp - ) - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_tag_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'tag', '0.1', cwd=version_pkg_path) -@@ -25,6 +26,7 @@ def test_get_refs_should_return_tag_name - assert result['0.2'] == commit, result - - -+@pytest.mark.skipif(True, reason='No network') - def test_get_refs_should_return_branch_name_and_commit_pair(script): - version_pkg_path = _create_test_package(script) - script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) diff --git a/sources b/sources deleted file mode 100644 index 6722521..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz -e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz