Compare commits

...

9 Commits

Author SHA1 Message Date
Miro Hrončok f61b997d2f dgroc bump 2014-07-02 00:02:52 +02:00
Miro Hrončok 90a19b96ca dgroc bump 2014-07-01 12:16:00 +02:00
Miro Hrončok 6aae47b6a0 Bootstrapping 2014-06-27 21:13:22 +02:00
Miro Hrončok 5e67d56d2d SCL 2014-06-27 19:46:57 +02:00
Miro Hrončok 4425f8db4a Be less sctrict in wheel version in filename 2014-06-07 18:21:36 +02:00
Miro Hrončok 61ab0cd65d Update the patch to git version 2014-06-07 18:18:53 +02:00
Miro Hrončok 0771ae659c Allow nighly rebuilds of pip as well 2014-06-07 17:21:04 +02:00
Miro Hrončok 9786f82445 Python nightly build bootstraping 2014-06-07 16:18:32 +02:00
Miro Hrončok a89d58b356 Make this for Python 3.5 only 2014-06-07 15:25:12 +02:00
2 changed files with 79 additions and 52 deletions

View File

@ -1,15 +1,14 @@
commit aefacbb76661520415a1c35028f2984e70cfe0bf
Author: Slavek Kabrda <bkabrda@redhat.com> Author: Slavek Kabrda <bkabrda@redhat.com>
Date: Fri Nov 29 13:24:58 2013 +0100 Date: Fri Nov 29 13:24:58 2013 +0100
Allow stripping given prefix from wheel RECORD files Allow stripping given prefix from wheel RECORD files
diff --git a/pip/commands/install.py b/pip/commands/install.py 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 --- a/pip/commands/install.py
+++ b/pip/commands/install.py +++ b/pip/commands/install.py
@@ -137,6 +137,14 @@ class InstallCommand(Command): @@ -132,6 +132,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,24 +22,19 @@ index 1693d01..0287c06 100644
"--compile", "--compile",
action="store_true", action="store_true",
dest="compile", dest="compile",
@@ -273,7 +281,11 @@ class InstallCommand(Command): @@ -311,6 +319,7 @@ class InstallCommand(Command):
requirement_set.locate_files() install_options,
global_options,
if not options.no_install and not self.bundle: root=options.root_path,
- requirement_set.install(install_options, global_options, root=options.root_path) + strip_file_prefix=options.strip_file_prefix,
+ 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 installed = ' '.join([req.name for req in
requirement_set.successfully_installed]) requirement_set.successfully_installed])
if installed: diff --git a/pip/req/req_install.py b/pip/req/req_install.py
diff --git a/pip/req.py b/pip/req.py index 6ec2a42..ac2f213 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 @@ -709,7 +709,7 @@ exec(compile(
@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
name = name.replace(os.path.sep, '/') name = name.replace(os.path.sep, '/')
return name return name
@ -49,7 +43,7 @@ index 3ae306d..c171130 100644
if self.editable: if self.editable:
self.install_editable(install_options, global_options) self.install_editable(install_options, global_options)
return return
if self.is_wheel: @@ -717,7 +717,11 @@ exec(compile(
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)
@ -62,9 +56,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')) @@ -912,13 +916,14 @@ exec(compile(
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):
@ -79,10 +73,10 @@ index 3ae306d..c171130 100644
@property @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 2d4f4df..78a99e9 100644
--- a/pip/wheel.py --- a/pip/wheel.py
+++ b/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, def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
@ -91,7 +85,7 @@ index fa3e270..3a366d0 100644
"""Install a wheel""" """Install a wheel"""
if not scheme: if not scheme:
@@ -357,6 +357,8 @@ if __name__ == '__main__': @@ -365,6 +365,8 @@ if __name__ == '__main__':
writer.writerow(row) writer.writerow(row)
for f in generated: for f in generated:
h, l = rehash(f) h, l = rehash(f)

View File

@ -1,32 +1,34 @@
%if (! 0%{?rhel}) || 0%{?rhel} > 6 %global with_python2 0
%global with_python3 1 %global with_python3 1
%global build_wheel 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 %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} %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} %if 0%{?with_python3}
%global python3_wheelname %python2_wheelname %global python3_wheelname %python2_wheelname
%endif %endif
%endif %endif
Name: python-%{srcname} Name: %{?scl_prefix}python-%{srcname}
Version: 1.5.6 Version: 1.6
Release: 1%{?dist} Release: 0.6.20140702gitc720ca67%{?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
License: MIT License: MIT
URL: http://www.pip-installer.org URL: http://www.pip-installer.org
Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz Source0: python3-nightly-pip-c720ca67.tar
Patch0: pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch Patch0: pip-1.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
%if 0%{?with_python2}
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
%if 0%{?build_wheel} %if 0%{?build_wheel}
@ -34,6 +36,7 @@ BuildRequires: python-pip
BuildRequires: python-wheel BuildRequires: python-wheel
%endif %endif
Requires: python-setuptools Requires: python-setuptools
%endif # with_python2
%description %description
Pip is a replacement for `easy_install Pip is a replacement for `easy_install
@ -43,19 +46,19 @@ easy_installable should be pip-installable as well.
%if 0%{?with_python3} %if 0%{?with_python3}
%package -n python3-pip %package -n %{?scl_prefix}python3-%{srcname}
Summary: A tool for installing and managing Python3 packages Summary: A tool for installing and managing Python3 packages
Group: Development/Libraries Group: Development/Libraries
BuildRequires: python3-devel BuildRequires: %{?scl_prefix}python3-devel
BuildRequires: python3-setuptools BuildRequires: %{?scl_prefix}python3-setuptools
%if 0%{?build_wheel} %if 0%{?build_wheel}
BuildRequires: python3-pip BuildRequires: %{?scl_prefix}python3-pip
BuildRequires: python3-wheel BuildRequires: %{?scl_prefix}python3-wheel
%endif %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 Pip is a replacement for `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
same techniques for finding packages, so packages that were made 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 %endif # with_python3
%prep %prep
%setup -q -n %{srcname}-%{version} %setup -q -n python3-nightly-%{srcname}
%patch0 -p1 %patch0 -p1
@ -75,11 +78,14 @@ cp -a . %{py3dir}
%build %build
%{?scl:scl enable %scl - << \EOF}
%if 0%{?with_python2}
%if 0%{?build_wheel} %if 0%{?build_wheel}
%{__python} setup.py bdist_wheel %{__python2} setup.py bdist_wheel
%else %else
%{__python} setup.py build %{__python2} setup.py build
%endif %endif
%endif # with_python2
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
@ -90,29 +96,36 @@ pushd %{py3dir}
%endif %endif
popd popd
%endif # with_python3 %endif # with_python3
%{?scl:EOF}
%install %install
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
%{?scl:scl enable %scl - << \EOF}
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
%if 0%{?build_wheel} %if 0%{?build_wheel}
pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} 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 # 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) # (pip install wheel doesn't overwrite)
rm %{buildroot}%{_bindir}/pip rm %{buildroot}%{_bindir}/pip
%endif # with_python2
%else %else
%{__python3} setup.py install --skip-build --root %{buildroot} %{__python3} setup.py install --skip-build --root %{buildroot}
%endif %endif
%endif # with_python3 %endif # with_python3
%if 0%{?with_python2}
%if 0%{?build_wheel} %if 0%{?build_wheel}
pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
%else %else
%{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot}
%endif %endif
%endif # with_python2
%{?scl:EOF}
%clean %clean
%{__rm} -rf %{buildroot} %{__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 # unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in
# fedora yet. Once it is, check can be implemented # fedora yet. Once it is, check can be implemented
%if 0%{?with_python2}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE.txt README.rst docs %doc LICENSE.txt README.rst docs
%attr(755,root,root) %{_bindir}/pip %attr(755,root,root) %{_bindir}/pip
%attr(755,root,root) %{_bindir}/pip2* %attr(755,root,root) %{_bindir}/pip2*
%{python_sitelib}/pip* %{python_sitelib}/pip*
%endif # with_python2
%if 0%{?with_python3} %if 0%{?with_python3}
%files -n python3-pip %files -n %{?scl_prefix}python3-%{srcname}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE.txt README.rst docs %doc LICENSE.txt README.rst docs
%attr(755,root,root) %{_bindir}/pip3* %attr(755,root,root) %{_bindir}/pip3*
%{python3_sitelib}/pip* %{python3_sitelib}/pip*
%if ! 0%{?with_python2}
%attr(755,root,root) %{_bindir}/pip
%endif # ! with_python2
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Wed Jul 02 2014 Miro Hrončok <mhroncok@redhat.com> - 1.6-0.6.20140702gitc720ca67
- Update to git: c720ca67
* Tue Jul 01 2014 Miro Hrončok <mhroncok@redhat.com> - 1.6-0.5.20140701git6410ba43
- Update to git: 6410ba43
* Fri Jun 27 2014 Miro Hrončok <mhroncok@redhat.com> - 1.6-0.4.20140626gitbb6c11ed
- Bootstrap
* Thu Jun 26 2014 Miro Hrončok <mhroncok@redhat.com> - 1.6-0.3.20140626gitbb6c11ed
- Update to git: bb6c11ed
- SCL
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-1 * Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-1
- Update to 1.5.6 - Update to 1.5.6