pip2 is not the same as pip: makepip missing for pip2

Bug #1612264 reported by Daniel Hahler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-pip (Debian)
Fix Released
Unknown
python-pip (Ubuntu)
Fix Released
Undecided
Barry Warsaw

Bug Description

debian/rules uses the "makepip.py" program to generate fixed/custom pip and pip3 scripts, but leaves the original pip2 alone:

override_dh_python3:
        dh_python3
        rm -f debian/python3-pip/usr/bin/pip
        rm -f debian/python3-pip/usr/bin/pip3.?
        rm -rf debian/python3-pip/usr/lib/python3.?
        python3 debian/makepip.py /usr/bin/python3 \
                debian/python3-pip/usr/bin/pip3

override_dh_python2:
        dh_python2
        rm -f debian/python-pip/usr/bin/pip2.?
        python3 debian/makepip.py /usr/bin/python \
                debian/python-pip/usr/bin/pip

% diff -u /usr/bin/pip*
--- /usr/bin/pip 2016-05-24 14:23:26.000000000 +0000
+++ /usr/bin/pip2 2016-05-24 14:23:16.000000000 +0000
@@ -1,11 +1,10 @@
 #!/usr/bin/python
-# GENERATED BY DEBIAN
-
+# EASY-INSTALL-ENTRY-SCRIPT: 'pip==8.1.1','console_scripts','pip2'
+__requires__ = 'pip==8.1.1'
 import sys
+from pkg_resources import load_entry_point

-# Run the main entry point, similarly to how setuptools does it, but because
-# we didn't install the actual entry point from setup.py, don't use the
-# pkg_resources API.
-from pip import main
 if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(
+ load_entry_point('pip==8.1.1', 'console_scripts', 'pip2')()
+ )

I think there should be an additional line in override_dh_python2:

 python3 debian/makepip.py /usr/bin/python \
  debian/python-pip/usr/bin/pip2

I've noticed this because Saltstack will prefer "pip2" over "pip".

Changed in python-pip (Debian):
status: Unknown → New
Barry Warsaw (barry)
Changed in python-pip (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
status: New → In Progress
Changed in python-pip (Debian):
status: New → Fix Committed
Changed in python-pip (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Kai Kasurinen (kai-kasurinen) wrote :

Fixed in version python-pip/8.1.2-3

Changed in python-pip (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.