[Python-modules-commits] r24622 - in packages/python-pip/trunk/debian (10 files)

stefanor at users.alioth.debian.org stefanor at users.alioth.debian.org
Sun Jun 2 11:32:00 UTC 2013


    Date: Sunday, June 2, 2013 @ 11:31:58
  Author: stefanor
Revision: 24622

Rework pip-X.Y script creation, to actually work with multiple supported
python3 versions, and to have the correct shebang in the scripts
(Closes: #680150).

Added:
  packages/python-pip/trunk/debian/patches/no-python-specific-scripts.patch
Modified:
  packages/python-pip/trunk/debian/changelog
  packages/python-pip/trunk/debian/patches/format_egg_string.patch
  packages/python-pip/trunk/debian/patches/series
  packages/python-pip/trunk/debian/patches/system-ca-certificates.patch
  packages/python-pip/trunk/debian/pip.1
  packages/python-pip/trunk/debian/python-pip.install
  packages/python-pip/trunk/debian/python3-pip.install
  packages/python-pip/trunk/debian/rules
Deleted:
  packages/python-pip/trunk/debian/patches/remove_hardcoded_python_version.patch

Modified: packages/python-pip/trunk/debian/changelog
===================================================================
--- packages/python-pip/trunk/debian/changelog	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/changelog	2013-06-02 11:31:58 UTC (rev 24622)
@@ -29,6 +29,11 @@
   * Rebuild without python2.6, and drop the manpage for pip-2.6
     (Closes: #679196).
 
+  [ Stefano Rivera ]
+  * Rework pip-X.Y script creation, to actually work with multiple supported
+    python3 versions, and to have the correct shebang in the scripts
+    (Closes: #680150).
+
  -- Jakub Wilk <jwilk at debian.org>  Sun, 05 May 2013 16:03:05 +0200
 
 python-pip (1.1-3) unstable; urgency=low

Modified: packages/python-pip/trunk/debian/patches/format_egg_string.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/format_egg_string.patch	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/patches/format_egg_string.patch	2013-06-02 11:31:58 UTC (rev 24622)
@@ -1,5 +1,6 @@
-# Description: use the same .egg string format than Debian python-setuptools
-# Author: Carl Chenet <chaica at ohmytux.com>
+Description: use the same .egg string format than Debian python-setuptools
+Author: Carl Chenet <chaica at ohmytux.com>
+Bug-Debian: http://bugs.debian.org/562544
 
 --- a/pip/req.py
 +++ b/pip/req.py

Added: packages/python-pip/trunk/debian/patches/no-python-specific-scripts.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/no-python-specific-scripts.patch	                        (rev 0)
+++ packages/python-pip/trunk/debian/patches/no-python-specific-scripts.patch	2013-06-02 11:31:58 UTC (rev 24622)
@@ -0,0 +1,18 @@
+Description: Don't install Python version specific endpoints from setup.py
+ We'll do them ourselves in the packaging, so that they'll have the correct
+ shebangs.
+ This also ensures that we will support multiple Python3 versions, where the
+ entry-points.txt came from only one of the versions.
+Author: Stefano Rivera <stefanor at debian.org>
+
+--- a/setup.py
++++ b/setup.py
+@@ -50,7 +50,7 @@
+       url='http://www.pip-installer.org',
+       license='MIT',
+       packages=['pip', 'pip.commands', 'pip.vcs', 'pip.backwardcompat'],
+-      entry_points=dict(console_scripts=['pip=pip:main', 'pip-%s=pip:main' % sys.version[:3]]),
++      entry_points=dict(console_scripts=['pip=pip:main']),
+       test_suite='nose.collector',
+       tests_require=tests_require,
+       zip_safe=False,

Deleted: packages/python-pip/trunk/debian/patches/remove_hardcoded_python_version.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/remove_hardcoded_python_version.patch	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/patches/remove_hardcoded_python_version.patch	2013-06-02 11:31:58 UTC (rev 24622)
@@ -1,14 +0,0 @@
-# Description: remove the harcoded python version in console exe
-# Author: Carl Chenet <chaica at debian.org>
-
---- a/setup.py
-+++ b/setup.py
-@@ -51,7 +51,7 @@
-       license='MIT',
-       packages=['pip', 'pip.commands', 'pip.vcs', 'pip.backwardcompat'],
-       package_data={'pip': ['*.pem']},
--      entry_points=dict(console_scripts=['pip=pip:main', 'pip-%s=pip:main' % sys.version[:3]]),
-+      entry_points=dict(console_scripts=['pip-%s=pip:main' % sys.version[:3]]),
-       test_suite='nose.collector',
-       tests_require=tests_require,
-       zip_safe=False,

Modified: packages/python-pip/trunk/debian/patches/series
===================================================================
--- packages/python-pip/trunk/debian/patches/series	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/patches/series	2013-06-02 11:31:58 UTC (rev 24622)
@@ -1,3 +1,3 @@
 format_egg_string.patch
-remove_hardcoded_python_version.patch
 system-ca-certificates.patch
+no-python-specific-scripts.patch

Modified: packages/python-pip/trunk/debian/patches/system-ca-certificates.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/system-ca-certificates.patch	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/patches/system-ca-certificates.patch	2013-06-02 11:31:58 UTC (rev 24622)
@@ -20,7 +20,7 @@
        license='MIT',
        packages=['pip', 'pip.commands', 'pip.vcs', 'pip.backwardcompat'],
 -      package_data={'pip': ['*.pem']},
-       entry_points=dict(console_scripts=['pip-%s=pip:main' % sys.version[:3]]),
+       entry_points=dict(console_scripts=['pip=pip:main', 'pip-%s=pip:main' % sys.version[:3]]),
        test_suite='nose.collector',
        tests_require=tests_require,
 --- a/pip/download.py

Modified: packages/python-pip/trunk/debian/pip.1
===================================================================
--- packages/python-pip/trunk/debian/pip.1	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/pip.1	2013-06-02 11:31:58 UTC (rev 24622)
@@ -32,6 +32,8 @@
 .SH "SYNOPSIS"
 .sp
 \fBpip\fR [\fIcommand\fR] [\fIoptions\fR]
+.sp
+\fBpip\-X.Y\fR [\fIcommand\fR] [\fIoptions\fR]
 .SH "DESCRIPTION"
 .sp
 pip is an alternative Python package installer\&. It performs the same basic job as easy_install, but with some extra features\&. It can work with version control repositories (currently only Git, Mercurial, and Bazaar repositories), logs output extensively, and prevents partial installs by downloading all requirements before starting installation\&.

Modified: packages/python-pip/trunk/debian/python-pip.install
===================================================================
--- packages/python-pip/trunk/debian/python-pip.install	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/python-pip.install	2013-06-02 11:31:58 UTC (rev 24622)
@@ -1,2 +1,3 @@
 usr/lib/python2*
+usr/bin/pip
 usr/bin/pip-2.*

Modified: packages/python-pip/trunk/debian/python3-pip.install
===================================================================
--- packages/python-pip/trunk/debian/python3-pip.install	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/python3-pip.install	2013-06-02 11:31:58 UTC (rev 24622)
@@ -1,2 +1,2 @@
 usr/lib/python3
-usr/bin/pip-3.2
+usr/bin/pip-3.*

Modified: packages/python-pip/trunk/debian/rules
===================================================================
--- packages/python-pip/trunk/debian/rules	2013-06-02 10:08:26 UTC (rev 24621)
+++ packages/python-pip/trunk/debian/rules	2013-06-02 11:31:58 UTC (rev 24622)
@@ -2,6 +2,7 @@
 
 PYTHON2=$(shell pyversions -vr)
 PYTHON3=$(shell py3versions -vr)
+PYTHON3_DEF=$(shell py3versions -vd)
 
 %:
 	dh $@ --with python2,python3
@@ -10,13 +11,21 @@
 	dh_auto_build
 	set -ex; for py in $(PYTHON3) ; do \
 		python$$py setup.py build; \
-	done;
+	done
 
 override_dh_auto_install:
+	# Build for python3 first so that /usr/bin/pip is python2
+	set -ex; for py in $(PYTHON3) ; do \
+		python$$py setup.py install --skip-build \
+		                            --root=$(CURDIR)/debian/tmp \
+		                            --install-layout=deb; \
+		cp debian/tmp/usr/bin/pip debian/tmp/usr/bin/pip-$$py; \
+	done
 	dh_auto_install
-	set -ex; for py in $(PYTHON3) ; do \
-		python$$py setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
-	done;
+	set -ex; for py in $(PYTHON2) ; do \
+		sed "1 s/python$$/python$$py/" debian/tmp/usr/bin/pip \
+		    > debian/tmp/usr/bin/pip-$$py; \
+	done
 
 override_dh_auto_clean:
 	dh_auto_clean
@@ -25,3 +34,19 @@
 
 override_dh_installchangelogs:
 	dh_installchangelogs CHANGES.txt
+
+override_dh_installman:
+	cp debian/pip.1 build/pip-$(PYTHON3_DEF).1
+	dh_installman -p python-pip debian/pip.1
+	dh_installman -p python3-pip build/pip-$(PYTHON3_DEF).1
+
+override_dh_compress:
+	dh_compress
+	set -ex; for py in $(PYTHON2); do \
+		dh_link -p python-pip /usr/share/man/man1/pip.1.gz \
+		                      /usr/share/man/man1/pip-$$py.1.gz; \
+	done
+	set -ex; for py in $(filter-out $(PYTHON3_DEF),$(PYTHON3)); do \
+		dh_link -p python3-pip /usr/share/man/man1/pip-$(PYTHON3_DEF).1.gz \
+		                       /usr/share/man/man1/pip-$$py.1.gz; \
+	done




More information about the Python-modules-commits mailing list