[python-pip] update pip to 1.0.2 and add python3 package

Tim Flink tflink at fedoraproject.org
Sun Oct 23 18:03:11 UTC 2011


commit aded0dc96ca6b27537893d4aa1f7480791a8a98c
Author: Tim Flink <tflink at fedoraproject.org>
Date:   Sun Oct 23 12:02:40 2011 -0600

    update pip to 1.0.2 and add python3 package

 .gitignore      |    1 +
 python-pip.spec |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 sources         |    2 +-
 3 files changed, 73 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7e84806..11be19f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ pip-0.7.2.tar.gz
 /pip-0.8.tar.gz
 /pip-0.8.2.tar.gz
 /pip-0.8.3.tar.gz
+/pip-1.0.2.tar.gz
diff --git a/python-pip.spec b/python-pip.spec
index 389ba42..d4f1bc9 100644
--- a/python-pip.spec
+++ b/python-pip.spec
@@ -1,11 +1,16 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if (! 0%{?rhel}) || 0%{?rhel} > 6
+%global with_python3 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
 
 Name:           python-%{srcname}
-Version:        0.8.3
+Version:        1.0.2
 Release:        1%{?dist}
-Summary:        Pip installs packages.  Python packages.  An easy_install replacement
+Summary:        Pip installs packages.  Python3 packages.  An easy_install replacement
 
 Group:          Development/Libraries
 License:        MIT
@@ -15,43 +20,102 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 BuildRequires:  python-devel
-BuildRequires:  python-setuptools-devel
+BuildRequires:  python-setuptools
 Requires:       python-setuptools
 
 %description
-
 Pip is a replacement for `easy_install
 <http://peak.telecommunity.com/DevCenter/EasyInstall>`_.  It uses mostly the
 same techniques for finding packages, so packages that were made
 easy_installable should be pip-installable as well.
 
-pip is meant to improve on easy_install.bulletin boards, etc.).
+
+%if 0%{?with_python3}
+%package -n python3-pip
+Summary:        Pip installs packages.  Python3 packages.  An easy_install replacement
+Group:          Development/Libraries
+
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+Requires:  python3-setuptools
+
+%description -n python3-pip
+Pip is a replacement for `easy_install
+<http://peak.telecommunity.com/DevCenter/EasyInstall>`_.  It uses mostly the
+same techniques for finding packages, so packages that were made
+easy_installable should be pip-installable as well.
+%endif # with_python3
 
 %prep
 %setup -q -n %{srcname}-%{version}
 %{__sed} -i '1d' pip/__init__.py
 
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif # with_python3
+
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
 %install
 %{__rm} -rf %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+
+# Change the name of the pip executable in order to not conflict with perl-pip
+# https://bugzilla.redhat.com/show_bug.cgi?id=616399
+mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python3
+
+# The install process creates both pip and pip-<python_abiversion> that seem to
+# be the same. Remove the extra script
+rm %{buildroot}%{_bindir}/pip-3*
+
+popd
+%endif # with_python3
+
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
-%{__rm} -rf %{buildroot}%{_bindir}/pip-*
+
+# The install process creates both pip and pip-<python_abiversion> that seem to
+# be the same. Since removing pip-* also clobbers pip-python3, just remove pip-2*
+%{__rm} -rf %{buildroot}%{_bindir}/pip-2*
 
 # Change the name of the pip executable in order to not conflict with perl-pip
 # https://bugzilla.redhat.com/show_bug.cgi?id=616399
 mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python
 
+
 %clean
 %{__rm} -rf %{buildroot}
 
+# unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in
+# fedora yet. Once it is, check can be implemented
+
 %files
+%defattr(-,root,root,-)
 %doc PKG-INFO docs
 %attr(755,root,root) %{_bindir}/pip-python
 %{python_sitelib}/pip*
 
+%if 0%{?with_python3}
+%files -n python3-pip
+%defattr(-,root,root,-)
+%doc PKG-INFO docs
+%attr(755,root,root) %{_bindir}/pip-python3
+%{python3_sitelib}/pip*
+%endif # with_python3
+
 %changelog
+* Sat Oct 22 2011 Tim Flink <tflink at fedoraproject.org> - 1.0.2-1
+- update to 1.0.2 and added python3 subpackage
+
 * Wed Jun 22 2011 Tim Flink <tflink at fedoraproject.org> - 0.8.3-1
 - update to 0.8.3 and project home page
 
diff --git a/sources b/sources
index a3c8d33..7e4d5f9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0603337a81f83df2b1d2f1151565efac  pip-0.8.3.tar.gz
+47ec6ff3f6d962696fe08d4c8264ad49  pip-1.0.2.tar.gz


More information about the scm-commits mailing list