Update to 8.0.2

This commit is contained in:
Slavek Kabrda 2016-02-22 11:35:39 +01:00
parent 6ab95f60b9
commit 686a4e2e6d
2 changed files with 29 additions and 19 deletions

View File

@ -20,13 +20,13 @@ index 1693d01..0287c06 100644
+ ) + )
+ +
+ cmd_opts.add_option( + cmd_opts.add_option(
"--compile", '--prefix',
action="store_true", dest='prefix_path',
dest="compile", metavar='dir',
@@ -345,6 +353,7 @@ class InstallCommand(Command): @@ -345,6 +353,7 @@ class InstallCommand(Command):
install_options,
global_options, global_options,
root=options.root_path, root=options.root_path,
prefix=options.prefix_path,
+ strip_file_prefix=options.strip_file_prefix, + strip_file_prefix=options.strip_file_prefix,
) )
reqs = sorted( reqs = sorted(
@ -36,39 +36,43 @@ diff --git a/pip/req/req_install.py b/pip/req/req_install.py
index 3ae306d..c171130 100644 index 3ae306d..c171130 100644
--- a/pip/req/req_install.py --- a/pip/req/req_install.py
+++ b/pip/req/req_install.py +++ b/pip/req/req_install.py
@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) @@ -615,17 +615,21 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
else: else:
return True 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): - prefix=None):
+ def install(self, install_options, global_options=[], root=None, prefix=None, strip_file_prefix=None):
if self.editable: if self.editable:
self.install_editable(install_options, global_options) self.install_editable(
install_options, global_options, prefix=prefix)
return return
if self.is_wheel: if self.is_wheel:
version = pip.wheel.wheel_version(self.source_dir) version = pip.wheel.wheel_version(self.source_dir)
pip.wheel.check_compatibility(version, self.name) pip.wheel.check_compatibility(version, self.name)
- self.move_wheel_files(self.source_dir, root=root) - self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
+ self.move_wheel_files( + self.move_wheel_files(
+ self.source_dir, + self.source_dir,
+ root=root, + root=root,
+ prefix=prefix,
+ strip_file_prefix=strip_file_prefix + strip_file_prefix=strip_file_prefix
+ ) + )
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,15 +848,16 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
def is_wheel(self): def is_wheel(self):
return self.link and self.link.is_wheel return self.link and self.link.is_wheel
- def move_wheel_files(self, wheeldir, root=None): - def move_wheel_files(self, wheeldir, root=None, prefix=None):
+ def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): + def move_wheel_files(self, wheeldir, root=None, prefix=None, strip_file_prefix=None):
move_wheel_files( move_wheel_files(
self.name, self.req, wheeldir, self.name, self.req, wheeldir,
user=self.use_user_site, user=self.use_user_site,
home=self.target_dir, home=self.target_dir,
root=root, root=root,
prefix=prefix,
pycompile=self.pycompile, pycompile=self.pycompile,
isolated=self.isolated, isolated=self.isolated,
+ strip_file_prefix=strip_file_prefix, + strip_file_prefix=strip_file_prefix,
@ -83,8 +87,8 @@ index fa3e270..3a366d0 100644
def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
- pycompile=True, scheme=None, isolated=False): - pycompile=True, scheme=None, isolated=False, prefix=None):
+ pycompile=True, scheme=None, isolated=False, strip_file_prefix=None): + pycompile=True, scheme=None, isolated=False, prefix=None, strip_file_prefix=None):
"""Install a wheel""" """Install a wheel"""
if not scheme: if not scheme:

View File

@ -21,8 +21,8 @@
%endif %endif
Name: python-%{srcname} Name: python-%{srcname}
Version: 7.1.0 Version: 8.0.2
Release: 4%{?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
@ -31,10 +31,10 @@ URL: http://www.pip-installer.org
Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz
# to get tests: # to get tests:
# git clone https://github.com/pypa/pip && cd fig # git clone https://github.com/pypa/pip && cd pip
# git checkout 1.5.6 && tar -czvf pip-1.5.6-tests.tar.gz tests/ # git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/
%if 0%{?with_tests} %if 0%{?with_tests}
Source1: pip-7.1.0-tests.tar.gz Source1: pip-8.0.2-tests.tar.gz
%endif %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
@ -45,10 +45,12 @@ BuildArch: noarch
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
%if 0%{?with_tests} %if 0%{?with_tests}
BuildRequires: git
BuildRequires: python-mock BuildRequires: python-mock
BuildRequires: pytest BuildRequires: pytest
BuildRequires: python-pretend BuildRequires: python-pretend
BuildRequires: python-freezegun BuildRequires: python-freezegun
BuildRequires: python-pytest-capturelog
BuildRequires: python-scripttest BuildRequires: python-scripttest
BuildRequires: python-virtualenv BuildRequires: python-virtualenv
%endif %endif
@ -78,6 +80,7 @@ BuildRequires: python3-mock
BuildRequires: python3-pytest BuildRequires: python3-pytest
BuildRequires: python3-pretend BuildRequires: python3-pretend
BuildRequires: python3-freezegun BuildRequires: python3-freezegun
BuildRequires: python3-pytest-capturelog
BuildRequires: python3-scripttest BuildRequires: python3-scripttest
BuildRequires: python3-virtualenv BuildRequires: python3-virtualenv
%endif %endif
@ -232,6 +235,9 @@ popd
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Mon Feb 22 2016 Slavek Kabrda <bkabrda@redhat.com> - 8.0.2-1
- Update to 8.0.2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-4 * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild