diff --git a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch b/pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch similarity index 69% rename from pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch rename to pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch index f2e8487..0d12952 100644 --- a/pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +++ b/pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch @@ -1,15 +1,14 @@ -commit aefacbb76661520415a1c35028f2984e70cfe0bf Author: Slavek Kabrda Date: Fri Nov 29 13:24:58 2013 +0100 Allow stripping given prefix from wheel RECORD files diff --git a/pip/commands/install.py b/pip/commands/install.py -index 1693d01..0287c06 100644 +index 20b54b9..b421d1b 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.") +@@ -132,6 +132,14 @@ class InstallCommand(Command): + "directory.") cmd_opts.add_option( + '--strip-file-prefix', @@ -23,24 +22,19 @@ 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) +@@ -311,6 +319,7 @@ class InstallCommand(Command): + 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 ---- a/pip/req.py -+++ b/pip/req.py -@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +diff --git a/pip/req/req_install.py b/pip/req/req_install.py +index 6ec2a42..ac2f213 100644 +--- a/pip/req/req_install.py ++++ b/pip/req/req_install.py +@@ -709,7 +709,7 @@ exec(compile( name = name.replace(os.path.sep, '/') return name @@ -49,7 +43,7 @@ index 3ae306d..c171130 100644 if self.editable: self.install_editable(install_options, global_options) return - if self.is_wheel: +@@ -717,7 +717,11 @@ exec(compile( version = pip.wheel.wheel_version(self.source_dir) pip.wheel.check_compatibility(version, self.name) @@ -62,9 +56,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 +@@ -912,13 +916,14 @@ exec(compile( + 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): @@ -79,10 +73,10 @@ index 3ae306d..c171130 100644 @property diff --git a/pip/wheel.py b/pip/wheel.py -index fa3e270..3a366d0 100644 +index 2d4f4df..78a99e9 100644 --- a/pip/wheel.py +++ b/pip/wheel.py -@@ -136,7 +136,7 @@ def get_entrypoints(filename): +@@ -127,7 +127,7 @@ def get_entrypoints(filename): def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, @@ -91,7 +85,7 @@ index fa3e270..3a366d0 100644 """Install a wheel""" if not scheme: -@@ -357,6 +357,8 @@ if __name__ == '__main__': +@@ -365,6 +365,8 @@ if __name__ == '__main__': writer.writerow(row) for f in generated: h, l = rehash(f) diff --git a/python-pip.spec b/python-pip.spec index e6d032e..19b0dc8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,32 +1,34 @@ -%if (! 0%{?rhel}) || 0%{?rhel} > 6 +%global with_python2 0 %global with_python3 1 %global build_wheel 1 -%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())")} -%endif %global srcname pip + +%{?scl:%scl_package python-%{srcname}} +%{!?scl:%global pkg_name %{name}} +%{?scl:%global py3dir %{_builddir}/python3-%{name}-%{version}-%{release}} + %if 0%{?build_wheel} -%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%global python2_wheelname %{srcname}-*-py2.py3-none-any.whl %if 0%{?with_python3} %global python3_wheelname %python2_wheelname %endif %endif -Name: python-%{srcname} -Version: 1.5.6 -Release: 1%{?dist} +Name: %{?scl_prefix}python-%{srcname} +Version: 1.6 +Release: 0.6.20140702gitc720ca67%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries License: MIT URL: http://www.pip-installer.org -Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz -Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch +Source0: python3-nightly-pip-c720ca67.tar +Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +%if 0%{?with_python2} BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?build_wheel} @@ -34,6 +36,7 @@ BuildRequires: python-pip BuildRequires: python-wheel %endif Requires: python-setuptools +%endif # with_python2 %description Pip is a replacement for `easy_install @@ -43,19 +46,19 @@ easy_installable should be pip-installable as well. %if 0%{?with_python3} -%package -n python3-pip +%package -n %{?scl_prefix}python3-%{srcname} Summary: A tool for installing and managing Python3 packages Group: Development/Libraries -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: %{?scl_prefix}python3-devel +BuildRequires: %{?scl_prefix}python3-setuptools %if 0%{?build_wheel} -BuildRequires: python3-pip -BuildRequires: python3-wheel +BuildRequires: %{?scl_prefix}python3-pip +BuildRequires: %{?scl_prefix}python3-wheel %endif -Requires: python3-setuptools +Requires: %{?scl_prefix}python3-setuptools -%description -n python3-pip +%description -n %{?scl_prefix}python3-%{srcname} Pip is a replacement for `easy_install `_. It uses mostly the same techniques for finding packages, so packages that were made @@ -63,7 +66,7 @@ easy_installable should be pip-installable as well. %endif # with_python3 %prep -%setup -q -n %{srcname}-%{version} +%setup -q -n python3-nightly-%{srcname} %patch0 -p1 @@ -75,11 +78,14 @@ cp -a . %{py3dir} %build +%{?scl:scl enable %scl - << \EOF} +%if 0%{?with_python2} %if 0%{?build_wheel} -%{__python} setup.py bdist_wheel +%{__python2} setup.py bdist_wheel %else -%{__python} setup.py build +%{__python2} setup.py build %endif +%endif # with_python2 %if 0%{?with_python3} pushd %{py3dir} @@ -90,29 +96,36 @@ pushd %{py3dir} %endif popd %endif # with_python3 - +%{?scl:EOF} %install %{__rm} -rf %{buildroot} +%{?scl:scl enable %scl - << \EOF} %if 0%{?with_python3} pushd %{py3dir} %if 0%{?build_wheel} pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} + +%if 0%{?with_python2} # 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 +%endif # with_python2 + %else %{__python3} setup.py install --skip-build --root %{buildroot} %endif %endif # with_python3 +%if 0%{?with_python2} %if 0%{?build_wheel} pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} %else %{__python} setup.py install -O1 --skip-build --root %{buildroot} %endif - +%endif # with_python2 +%{?scl:EOF} %clean %{__rm} -rf %{buildroot} @@ -120,22 +133,42 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi # unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in # fedora yet. Once it is, check can be implemented +%if 0%{?with_python2} %files %defattr(-,root,root,-) %doc LICENSE.txt README.rst docs %attr(755,root,root) %{_bindir}/pip %attr(755,root,root) %{_bindir}/pip2* %{python_sitelib}/pip* +%endif # with_python2 %if 0%{?with_python3} -%files -n python3-pip +%files -n %{?scl_prefix}python3-%{srcname} %defattr(-,root,root,-) %doc LICENSE.txt README.rst docs %attr(755,root,root) %{_bindir}/pip3* %{python3_sitelib}/pip* + +%if ! 0%{?with_python2} +%attr(755,root,root) %{_bindir}/pip +%endif # ! with_python2 + %endif # with_python3 %changelog +* Wed Jul 02 2014 Miro Hrončok - 1.6-0.6.20140702gitc720ca67 +- Update to git: c720ca67 + +* Tue Jul 01 2014 Miro Hrončok - 1.6-0.5.20140701git6410ba43 +- Update to git: 6410ba43 + +* Fri Jun 27 2014 Miro Hrončok - 1.6-0.4.20140626gitbb6c11ed +- Bootstrap + +* Thu Jun 26 2014 Miro Hrončok - 1.6-0.3.20140626gitbb6c11ed +- Update to git: bb6c11ed +- SCL + * Sun May 25 2014 Matej Stuchlik - 1.5.6-1 - Update to 1.5.6 @@ -211,7 +244,7 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi * 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 +- 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