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