Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6068911523 |
5 changed files with 63 additions and 48 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,4 +9,3 @@ 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):
|
||||||
"directory.")
|
help="Install everything relative to this alternate root directory.")
|
||||||
|
|
||||||
cmd_opts.add_option(
|
cmd_opts.add_option(
|
||||||
+ '--strip-file-prefix',
|
+ '--strip-file-prefix',
|
||||||
|
|
@ -23,22 +23,26 @@ index 1693d01..0287c06 100644
|
||||||
"--compile",
|
"--compile",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
dest="compile",
|
dest="compile",
|
||||||
@@ -345,6 +353,7 @@ class InstallCommand(Command):
|
@@ -273,7 +281,11 @@ class InstallCommand(Command):
|
||||||
install_options,
|
requirement_set.locate_files()
|
||||||
global_options,
|
|
||||||
root=options.root_path,
|
if not options.no_install and not self.bundle:
|
||||||
+ strip_file_prefix=options.strip_file_prefix,
|
- requirement_set.install(install_options, global_options, root=options.root_path)
|
||||||
)
|
+ requirement_set.install(
|
||||||
reqs = sorted(
|
+ install_options,
|
||||||
requirement_set.successfully_installed,
|
+ global_options,
|
||||||
|
+ root=options.root_path,
|
||||||
diff --git a/pip/req/req_install.py b/pip/req/req_install.py
|
+ 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/req_install.py
|
--- a/pip/req.py
|
||||||
+++ b/pip/req/req_install.py
|
+++ b/pip/req.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'))
|
||||||
else:
|
name = name.replace(os.path.sep, '/')
|
||||||
return True
|
return name
|
||||||
|
|
||||||
- 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):
|
||||||
|
|
@ -58,9 +62,9 @@ index 3ae306d..c171130 100644
|
||||||
self.install_succeeded = True
|
self.install_succeeded = True
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
|
@@ -844,13 +848,14 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
|
||||||
def is_wheel(self):
|
self._bundle_build_dirs = bundle_build_dirs
|
||||||
return self.url and '.whl' in self.url
|
self._bundle_editable_dirs = bundle_editable_dirs
|
||||||
|
|
||||||
- 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):
|
||||||
|
|
@ -70,11 +74,10 @@ 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,
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_dist(self):
|
@property
|
||||||
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
|
||||||
|
|
@ -83,8 +86,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, isolated=False):
|
- pycompile=True, scheme=None):
|
||||||
+ pycompile=True, scheme=None, isolated=False, strip_file_prefix=None):
|
+ pycompile=True, scheme=None, 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 0
|
%global with_tests 1
|
||||||
%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: 6.0.8
|
Version: 1.5.6
|
||||||
Release: 1%{?dist}
|
Release: 6%{?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,11 +28,12 @@ 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/
|
||||||
%if 0%{?with_tests}
|
Source1: pip-1.5.6-tests.tar.gz
|
||||||
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)
|
||||||
|
|
||||||
|
|
@ -42,8 +43,6 @@ 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
|
||||||
|
|
@ -67,14 +66,6 @@ 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
|
||||||
|
|
@ -90,11 +81,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
|
||||||
|
|
||||||
|
|
@ -144,10 +135,7 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
|
||||||
|
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
%check
|
%check
|
||||||
py.test -m 'not network'
|
python setup.py test
|
||||||
pushd %{py3dir}
|
|
||||||
py.test-3.4 -m 'not network'
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -173,8 +161,8 @@ popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Mar 06 2015 Matej Stuchlik <mstuchli@redhat.com> - 6.0.8-1
|
* Tue Mar 10 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-7
|
||||||
- Update to 6.0.8
|
- Revert the 6.0.8 update
|
||||||
|
|
||||||
* 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,3 +1,27 @@
|
||||||
|
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
|
||||||
|
|
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
2332e6f97e75ded3bddde0ced01dbda3 pip-6.0.8.tar.gz
|
01026f87978932060cc86c1dc527903e pip-1.5.6.tar.gz
|
||||||
|
03fb001023223970c16e9379f53af8b6 pip-1.5.6-tests.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue