[python-pip] Update to 6.0.8

Matej Stuchlik mstuchli at fedoraproject.org
Fri Mar 6 13:33:54 UTC 2015


commit f50907e1c1b65c68127c0c4b3f72d1980f5b3e4d
Author: Matej Stuchlik <mstuchli at redhat.com>
Date:   Thu Jan 15 14:05:55 2015 +0100

    Update to 6.0.8

 .gitignore                                         |  1 +
 ...-stripping-prefix-from-wheel-RECORD-files.patch | 47 ++++++++++------------
 python-pip.spec                                    | 35 +++++++++++-----
 skip-network-tests.patch                           | 24 -----------
 sources                                            |  3 +-
 5 files changed, 49 insertions(+), 61 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b633d86..9ee51e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ pip-0.7.2.tar.gz
 /pip-1.5.4.tar.gz
 /pip-1.5.6.tar.gz
 /pip-1.5.6-tests.tar.gz
+/pip-6.0.8.tar.gz
diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
index f2e8487..bc7fa88 100644
--- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
+++ b/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
@@ -9,7 +9,7 @@ index 1693d01..0287c06 100644
 --- a/pip/commands/install.py
 +++ b/pip/commands/install.py
 @@ -137,6 +137,14 @@ class InstallCommand(Command):
-             help="Install everything relative to this alternate root directory.")
+                  "directory.")
  
          cmd_opts.add_option(
 +            '--strip-file-prefix',
@@ -23,26 +23,22 @@ index 1693d01..0287c06 100644
              "--compile",
              action="store_true",
              dest="compile",
-@@ -273,7 +281,11 @@ class InstallCommand(Command):
-                 requirement_set.locate_files()
- 
-             if not options.no_install and not self.bundle:
--                requirement_set.install(install_options, global_options, root=options.root_path)
-+                requirement_set.install(
-+                    install_options,
-+                    global_options,
-+                    root=options.root_path,
-+                    strip_file_prefix=options.strip_file_prefix)
-                 installed = ' '.join([req.name for req in
-                                       requirement_set.successfully_installed])
-                 if installed:
-diff --git a/pip/req.py b/pip/req.py
+@@ -345,6 +353,7 @@ class InstallCommand(Command):
+                             install_options,
+                             global_options,
+                             root=options.root_path,
++                            strip_file_prefix=options.strip_file_prefix,
+                         )
+                         reqs = sorted(
+                             requirement_set.successfully_installed,
+
+diff --git a/pip/req/req_install.py b/pip/req/req_install.py
 index 3ae306d..c171130 100644
---- a/pip/req.py
-+++ b/pip/req.py
+--- a/pip/req/req_install.py
++++ b/pip/req/req_install.py
 @@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
-         name = name.replace(os.path.sep, '/')
-         return name
+         else:
+             return True
  
 -    def install(self, install_options, global_options=(), root=None):
 +    def install(self, install_options, global_options=(), root=None, strip_file_prefix=None):
@@ -62,9 +58,9 @@ index 3ae306d..c171130 100644
              self.install_succeeded = True
              return
  
-@@ -844,13 +848,14 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
-         self._bundle_build_dirs = bundle_build_dirs
-         self._bundle_editable_dirs = bundle_editable_dirs
+@@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
+     def is_wheel(self):
+         return self.url and '.whl' in self.url
  
 -    def move_wheel_files(self, wheeldir, root=None):
 +    def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None):
@@ -74,10 +70,11 @@ index 3ae306d..c171130 100644
              home=self.target_dir,
              root=root,
              pycompile=self.pycompile,
+             isolated=self.isolated,
 +            strip_file_prefix=strip_file_prefix,
          )
  
-     @property
+     def get_dist(self):
 diff --git a/pip/wheel.py b/pip/wheel.py
 index fa3e270..3a366d0 100644
 --- a/pip/wheel.py
@@ -86,8 +83,8 @@ index fa3e270..3a366d0 100644
  
  
  def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
--                     pycompile=True, scheme=None):
-+                     pycompile=True, scheme=None, strip_file_prefix=None):
+-                     pycompile=True, scheme=None, isolated=False):
++                     pycompile=True, scheme=None, isolated=False, strip_file_prefix=None):
      """Install a wheel"""
  
      if not scheme:
diff --git a/python-pip.spec b/python-pip.spec
index dc6bb78..f9551e9 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,7 +1,7 @@
 %if (! 0%{?rhel}) || 0%{?rhel} > 7
 %global with_python3 1
 %global build_wheel 1
-%global with_tests 1
+%global with_tests 0
 %endif
 %if 0%{?rhel} && 0%{?rhel} < 6
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -16,8 +16,8 @@
 %endif
 
 Name:           python-%{srcname}
-Version:        1.5.6
-Release:        5%{?dist}
+Version:        6.0.8
+Release:        1%{?dist}
 Summary:        A tool for installing and managing Python packages
 
 Group:          Development/Libraries
@@ -28,12 +28,11 @@ Source0:        http://pypi.python.org/packages/source/p/pip/%{srcname}-%{versio
 # to get tests:
 # git clone https://github.com/pypa/pip && cd fig
 # git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/
-Source1:        pip-1.5.6-tests.tar.gz
+%if 0%{?with_tests}
+Source1:        pip-6.0.8-tests.tar.gz
+%endif
 
 Patch0:         pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
-# patch by dstufft, more at http://seclists.org/oss-sec/2014/q4/655
-Patch1:         local-dos.patch
-Patch2:         skip-network-tests.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -43,6 +42,8 @@ BuildRequires:  python-setuptools
 %if 0%{?with_tests}
 BuildRequires:  python-mock
 BuildRequires:  pytest
+BuildRequires:  python-pretend
+BuildRequires:  python-freezegun
 BuildRequires:  python-scripttest
 BuildRequires:  python-virtualenv
 %endif
@@ -66,6 +67,14 @@ Group:          Development/Libraries
 
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
+%if 0%{?with_tests}
+BuildRequires:  python3-mock
+BuildRequires:  python3-pytest
+BuildRequires:  python3-pretend
+BuildRequires:  python3-freezegun
+BuildRequires:  python3-scripttest
+BuildRequires:  python3-virtualenv
+%endif
 %if 0%{?build_wheel}
 BuildRequires:  python3-pip
 BuildRequires:  python3-wheel
@@ -81,11 +90,11 @@ easy_installable should be pip-installable as well.
 
 %prep
 %setup -q -n %{srcname}-%{version}
+%if 0%{?with_tests}
 tar -xf %{SOURCE1}
+%endif
 
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %{__sed} -i '1d' pip/__init__.py
 
@@ -135,7 +144,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
 
 %if 0%{?with_tests}
 %check
-python setup.py test
+py.test -m 'not network'
+pushd %{py3dir}
+py.test-3.4 -m 'not network'
+popd
 %endif
 
 
@@ -161,6 +173,9 @@ python setup.py test
 %endif # with_python3
 
 %changelog
+* Fri Mar 06 2015 Matej Stuchlik <mstuchli at redhat.com> - 6.0.8-1
+- Update to 6.0.8
+
 * Thu Dec 18 2014 Slavek Kabrda <bkabrda at redhat.com> - 1.5.6-5
 - Only enable tests on Fedora.
 
diff --git a/skip-network-tests.patch b/skip-network-tests.patch
index 4fbbf1a..9dec67e 100644
--- a/skip-network-tests.patch
+++ b/skip-network-tests.patch
@@ -1,27 +1,3 @@
-diff -up pip-1.5.6/tests/functional/test_bundle.py.orig pip-1.5.6/tests/functional/test_bundle.py
---- pip-1.5.6/tests/functional/test_bundle.py.orig	2014-11-27 11:23:19.857665215 +0100
-+++ pip-1.5.6/tests/functional/test_bundle.py	2014-11-27 11:31:10.992460920 +0100
-@@ -1,10 +1,12 @@
- import zipfile
- import textwrap
-+import pytest
- from os.path import abspath, exists, join
- from pip.download import path_to_url
- from tests.lib.local_repos import local_checkout
- 
- 
-+ at pytest.mark.skipif(True, reason='No network')
- def test_create_bundle(script, tmpdir, data):
-     """
-     Test making a bundle.  We'll grab one package from the filesystem
-@@ -30,6 +32,7 @@ def test_create_bundle(script, tmpdir, d
-     assert 'build/pip/' in files
- 
- 
-+ at pytest.mark.skipif(True, reason='No network')
- def test_cleanup_after_create_bundle(script, tmpdir, data):
-     """
-     Test clean up after making a bundle. Make sure (build|src)-bundle/ dirs are removed but not src/.
 diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py
 --- pip-1.5.6/tests/functional/test_freeze.py.orig	2014-11-27 11:23:19.947665742 +0100
 +++ pip-1.5.6/tests/functional/test_freeze.py	2014-11-27 11:30:45.937308998 +0100
diff --git a/sources b/sources
index 185df82..7d60591 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-01026f87978932060cc86c1dc527903e  pip-1.5.6.tar.gz
-03fb001023223970c16e9379f53af8b6  pip-1.5.6-tests.tar.gz
+2332e6f97e75ded3bddde0ced01dbda3  pip-6.0.8.tar.gz


More information about the scm-commits mailing list