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

barry at users.alioth.debian.org barry at users.alioth.debian.org
Fri May 9 21:26:16 UTC 2014


    Date: Friday, May 9, 2014 @ 21:26:15
  Author: barry
Revision: 28818

* Team upload.
* d/patches/use-venv-wheels.patch:
  - When inside a virtual environment, add to sys.path any wheels found
    in <venv>/usr/share/python-wheels
  - Adjust setup.py's test_requires since python-virtualenv is enough to
    satisfy the requirement, but the tools aren't smart enough to know this.
* d/compat: Bump to version 8.
* d/control:
  - Add python-pip-wheels binary package.
  - Add to Build-Depends: python{,3}-mock, python{,3}-test,
    python{,3}-scripttest, python-virtualenv, python3-wheel
  - Update other Build-Depends.
  - wrap-and-sort
* d/rules:
  - Build and install the pip universal wheel.
  - Use --build-system=pybuild.
  - Remove unnecessary files here instead of in d/*.pyremove.
* d/python-pip-wheels.install: Added.
* d/python-pip.install: Removed.
* d/python-pip.pyremove: Removed.
* d/python3-pip.install: Removed.
* d/python3-pip.manpages: Updated.
* d/python3-pip.pyremove: Removed.

Added:
  packages/python-pip/trunk/debian/patches/use-venv-wheels.patch
  packages/python-pip/trunk/debian/python-pip-wheels.install
Modified:
  packages/python-pip/trunk/debian/changelog
  packages/python-pip/trunk/debian/compat
  packages/python-pip/trunk/debian/control
  packages/python-pip/trunk/debian/patches/series
  packages/python-pip/trunk/debian/python3-pip.manpages
  packages/python-pip/trunk/debian/rules
Deleted:
  packages/python-pip/trunk/debian/python-pip.install
  packages/python-pip/trunk/debian/python-pip.pyremove
  packages/python-pip/trunk/debian/python3-pip.install
  packages/python-pip/trunk/debian/python3-pip.pyremove

Modified: packages/python-pip/trunk/debian/changelog
===================================================================
--- packages/python-pip/trunk/debian/changelog	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/changelog	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1,3 +1,31 @@
+python-pip (1.5.4-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * d/patches/use-venv-wheels.patch:
+    - When inside a virtual environment, add to sys.path any wheels found
+      in <venv>/usr/share/python-wheels
+    - Adjust setup.py's test_requires since python-virtualenv is enough to
+      satisfy the requirement, but the tools aren't smart enough to know this.
+  * d/compat: Bump to version 8.
+  * d/control:
+    - Add python-pip-wheels binary package.
+    - Add to Build-Depends: python{,3}-mock, python{,3}-test,
+      python{,3}-scripttest, python-virtualenv, python3-wheel
+    - Update other Build-Depends.
+    - wrap-and-sort
+  * d/rules:
+    - Build and install the pip universal wheel.
+    - Use --build-system=pybuild.
+    - Remove unnecessary files here instead of in d/*.pyremove.
+  * d/python-pip-wheels.install: Added.
+  * d/python-pip.install: Removed.
+  * d/python-pip.pyremove: Removed.
+  * d/python3-pip.install: Removed.
+  * d/python3-pip.manpages: Updated.
+  * d/python3-pip.pyremove: Removed.
+
+ -- Barry Warsaw <barry at debian.org>  Fri, 09 May 2014 14:44:32 -0400
+
 python-pip (1.5.4-1) unstable; urgency=medium
 
   * Team upload.

Modified: packages/python-pip/trunk/debian/compat
===================================================================
--- packages/python-pip/trunk/debian/compat	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/compat	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1 +1 @@
-7
+8

Modified: packages/python-pip/trunk/debian/control
===================================================================
--- packages/python-pip/trunk/debian/control	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/control	2014-05-09 21:26:15 UTC (rev 28818)
@@ -4,10 +4,20 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Carl Chenet <chaica at debian.org>, Jeff Licquia <licquia at debian.org>
 Homepage: http://www.pip-installer.org/
-Build-Depends: debhelper (>= 7.0.50~),
+Build-Depends: debhelper (>= 8),
+               dh-python,
                python-all (>= 2.6),
-               python3-all (>= 3.2)
-Build-Depends-Indep: python-setuptools (>= 0.6c1), python3-setuptools
+               python-mock,
+               python-pytest,
+               python-scripttest,
+               python-setuptools,
+               python-virtualenv,
+               python3-all,
+               python3-mock,
+               python3-pytest,
+               python3-scripttest,
+               python3-setuptools,
+               python3-wheel
 Standards-Version: 3.9.5
 X-Python-Version: >= 2.6
 X-Python3-Version: >= 3.2
@@ -16,16 +26,16 @@
 
 Package: python-pip
 Architecture: all
-Depends: ${misc:Depends},
-         ${python:Depends},
-         ca-certificates,
+Depends: ca-certificates,
          python-colorama,
          python-distlib,
          python-html5lib,
          python-pkg-resources,
+         python-requests,
          python-setuptools (>= 0.6c1),
          python-six,
-         python-requests,
+         ${misc:Depends},
+         ${python:Depends}
 Recommends: build-essential, python-dev-all (>= 2.6)
 Description: alternative Python package installer
  pip is a replacement for easy_install, and is intended to be an improved
@@ -35,16 +45,16 @@
 
 Package: python3-pip
 Architecture: all
-Depends: ${misc:Depends},
-         ${python3:Depends},
-         ca-certificates,
+Depends: ca-certificates,
          python3-colorama,
          python3-distlib,
          python3-html5lib,
          python3-pkg-resources,
+         python3-requests,
          python3-setuptools,
          python3-six,
-         python3-requests,
+         ${misc:Depends},
+         ${python3:Depends}
 Recommends: build-essential, python3-dev (>= 3.2)
 Description: alternative Python package installer - Python 3 version of the package
  pip is a replacement for easy_install, and is intended to be an improved
@@ -53,3 +63,15 @@
  sources, and can install from version control repositories.
  .
  This is the Python 3 version of the package.
+
+Package: python-pip-wheels
+Architecture: all
+Depends: ${misc:Depends}
+Description: alternative Python package installer
+ pip is a replacement for easy_install, and is intended to be an improved
+ Python package installer.  It integrates with virtualenv, doesn't do partial
+ installs, can save package state for replaying, can install from non-egg
+ sources, and can install from version control repositories.
+ .
+ This is the support package for the PEP 427 wheel version of the package,
+ required for using pip inside a virtual environment.

Modified: packages/python-pip/trunk/debian/patches/series
===================================================================
--- packages/python-pip/trunk/debian/patches/series	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/patches/series	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1,2 +1,3 @@
 format_egg_string.patch
 de-vendorize.patch
+use-venv-wheels.patch

Added: packages/python-pip/trunk/debian/patches/use-venv-wheels.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/use-venv-wheels.patch	                        (rev 0)
+++ packages/python-pip/trunk/debian/patches/use-venv-wheels.patch	2014-05-09 21:26:15 UTC (rev 28818)
@@ -0,0 +1,51 @@
+Description: When inside a pyvenv created virtual environment, we need to add
+ all the recursively devendorized dependent wheels to sys.path so that they
+ can be imported.  These should not live outside the venv (i.e. in system
+ paths) in order to preserve venv isolation.
+Author: Barry Warsaw <barry at debian.org>
+Forwarded: not-needed
+
+--- a/pip/__init__.py
++++ b/pip/__init__.py
+@@ -171,6 +171,24 @@
+     if initial_args is None:
+         initial_args = sys.argv[1:]
+ 
++    # Debian pyvenv support.  When inside a pyvenv created virtual
++    # environment, we have to add all the devendorized wheels to sys.path from
++    # inside the venv, otherwise the devendorized packages won't be found.
++    # Only do this in a venv so it doesn't affect global pip operation.
++    if sys.prefix != sys.base_prefix:
++        wheel_dir = os.path.join(
++            sys.base_prefix, 'usr', 'share', 'python-wheels')
++        # We'll just add all the wheels we find.  When pyvenv initializes the
++        # venv by calling `$python -Im ensurepip`, it'll only copy the wheels
++        # needed to make pip work.
++        try:
++            for filename in os.listdir(wheel_dir):
++                if os.path.splitext(filename)[1] == '.whl':
++                    sys.path.extend(os.path.join(wheel_dir, filename))
++        except FileNotFoundError:
++            # Oh well.
++            pass
++
+     autocomplete()
+ 
+     try:
+--- a/setup.py
++++ b/setup.py
+@@ -41,7 +41,13 @@
+ long_description = "\n" + "\n".join([read('PROJECT.txt'),
+                                      read('docs', 'quickstart.rst')])
+ 
+-tests_require = ['pytest', 'virtualenv>=1.10', 'scripttest>=1.3', 'mock']
++tests_require = ['pytest', 'scripttest>=1.3', 'mock']
++
++# In Debian, the virtualenv Build-Depends will satisfy this requirement
++# but setup() is too dumb to notice that.
++if sys.version_info < (3,):
++    tests_require.append('virtualenv>=1.10')
++
+ 
+ setup(name="pip",
+       version=find_version('pip', '__init__.py'),

Added: packages/python-pip/trunk/debian/python-pip-wheels.install
===================================================================
--- packages/python-pip/trunk/debian/python-pip-wheels.install	                        (rev 0)
+++ packages/python-pip/trunk/debian/python-pip-wheels.install	2014-05-09 21:26:15 UTC (rev 28818)
@@ -0,0 +1 @@
+usr/share/python-wheels

Deleted: packages/python-pip/trunk/debian/python-pip.install
===================================================================
--- packages/python-pip/trunk/debian/python-pip.install	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/python-pip.install	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1,3 +0,0 @@
-usr/bin/pip
-usr/bin/pip2
-usr/lib/python2*

Deleted: packages/python-pip/trunk/debian/python-pip.pyremove
===================================================================
--- packages/python-pip/trunk/debian/python-pip.pyremove	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/python-pip.pyremove	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1 +0,0 @@
-pip/_vendor

Deleted: packages/python-pip/trunk/debian/python3-pip.install
===================================================================
--- packages/python-pip/trunk/debian/python3-pip.install	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/python3-pip.install	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1,2 +0,0 @@
-usr/bin/pip3
-usr/lib/python3

Modified: packages/python-pip/trunk/debian/python3-pip.manpages
===================================================================
--- packages/python-pip/trunk/debian/python3-pip.manpages	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/python3-pip.manpages	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1 +1 @@
-build/pip3.1
+debian/pip3.1

Deleted: packages/python-pip/trunk/debian/python3-pip.pyremove
===================================================================
--- packages/python-pip/trunk/debian/python3-pip.pyremove	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/python3-pip.pyremove	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1 +0,0 @@
-pip/_vendor

Modified: packages/python-pip/trunk/debian/rules
===================================================================
--- packages/python-pip/trunk/debian/rules	2014-05-09 20:36:52 UTC (rev 28817)
+++ packages/python-pip/trunk/debian/rules	2014-05-09 21:26:15 UTC (rev 28818)
@@ -1,32 +1,37 @@
 #!/usr/bin/make -f
 
-PYTHON2=$(shell pyversions -vr)
-PYTHON3=$(shell py3versions -vr)
+export PYBUILD_NAME=pip
+#export DH_VERBOSE=1
 
 %:
-	dh $@ --with python2,python3
+	dh $@ --with python2,python3 --buildsystem=pybuild
 
 override_dh_auto_build:
+	rm -rf pip/_vendor
 	dh_auto_build
-	set -ex; for py in $(PYTHON3) ; do \
-		python$$py setup.py build; \
-	done
 
+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*/dist-packages/pip-*.egg-info
+
+override_dh_python2:
+	dh_python2
+	rm -f debian/python-pip/usr/bin/pip2.?
+
 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; \
-	done
-	sed -i "1 s/python3.[0-9]*/python3/" debian/tmp/usr/bin/pip3
-	cp debian/pip.1 build/pip3.1
+	cp debian/pip.1 debian/pip3.1
 	dh_auto_install
+	mkdir -p $(CURDIR)/debian/tmp/usr/share/python-wheels
+	python3 setup.py bdist_wheel \
+		--universal \
+		-d $(CURDIR)/debian/tmp/usr/share/python-wheels
 
-override_dh_auto_clean:
-	dh_auto_clean
-	rm -rf build
-	rm -rf *.egg-info
-
 override_dh_installchangelogs:
 	dh_installchangelogs CHANGES.txt
+
+override_dh_clean:
+	dh_clean
+	rm -f debian/pip3.1
+	rm -rf debian/tmp/usr/share/python-wheels




More information about the Python-modules-commits mailing list