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

barry at users.alioth.debian.org barry at users.alioth.debian.org
Thu Apr 30 22:17:25 UTC 2015


    Date: Thursday, April 30, 2015 @ 22:17:23
  Author: barry
Revision: 32495

Check pointing pip 6.1.1 update.  -- DO NOT RELEASE --

Modified:
  packages/python-pip/trunk/debian/changelog
  packages/python-pip/trunk/debian/control
  packages/python-pip/trunk/debian/patches/better-error-message.patch
  packages/python-pip/trunk/debian/patches/series
  packages/python-pip/trunk/debian/patches/use-wheels.patch
  packages/python-pip/trunk/debian/rules
  packages/python-pip/trunk/debian/watch
Deleted:
  packages/python-pip/trunk/debian/patches/de-vendorize.patch

Modified: packages/python-pip/trunk/debian/changelog
===================================================================
--- packages/python-pip/trunk/debian/changelog	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/changelog	2015-04-30 22:17:23 UTC (rev 32495)
@@ -1,3 +1,31 @@
+python-pip (6.1.1-1) UNRELEASED; urgency=medium
+
+  * DO NOT RELEASE.  TODO:
+    - Update distlib to 0.2.0
+    - Update colorama to 0.3.3
+    - Update requests to 2.6.0
+    - File ITP and get CacheControl 0.11.2 into Debian
+    - Update lockfile to 0.10.2
+    - File ITP and get progress 1.2 into Debian
+    - File ITP and get ipaddress into Debian (for Python 2.7 only)
+    - File ITP and get packaging 15.0 into Debian
+    - Update retrying to 1.3.3
+    - Update Debian Python policy to name the new dependencies, all of
+      which must be installed as -whl.
+  * Team upload.
+  * New upatream release.
+  * d/control: Change Depends for python-pip and python3-pip to require
+    python-pip-whl in all cases.  This fixes the problem where pip used
+    outside of a virtual environment can get broken by packages installed
+    into /usr/local.
+  * d/rules: No longer need to override dh_auto_build to remove pip/_vendor.
+  * d/patches:
+    - Removed de-vendorize.patch: No longer needed.
+    - Updated use-wheels.patch and better-error-message.patch for pip 6.1
+  * d/watch: Use pypi.debian.net mirror.
+
+ -- Barry Warsaw <barry at debian.org>  Thu, 30 Apr 2015 15:33:33 -0400
+
 python-pip (1.5.6-5) unstable; urgency=medium
 
   * Team upload.

Modified: packages/python-pip/trunk/debian/control
===================================================================
--- packages/python-pip/trunk/debian/control	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/control	2015-04-30 22:17:23 UTC (rev 32495)
@@ -28,13 +28,7 @@
 Package: python-pip
 Architecture: all
 Depends: ca-certificates,
-         python-colorama,
-         python-distlib,
-         python-html5lib,
-         python-pkg-resources,
-         python-requests,
-         python-setuptools (>= 0.6c1),
-         python-six,
+         python-pip-whl,
          ${misc:Depends},
          ${python:Depends}
 Recommends: build-essential, python-dev-all (>= 2.6), python-wheel
@@ -47,13 +41,7 @@
 Package: python3-pip
 Architecture: all
 Depends: ca-certificates,
-         python3-colorama,
-         python3-distlib,
-         python3-html5lib,
-         python3-pkg-resources,
-         python3-requests,
-         python3-setuptools,
-         python3-six,
+         python-pip-whl,
          ${misc:Depends},
          ${python3:Depends}
 Recommends: build-essential, python3-dev (>= 3.2), python3-wheel

Modified: packages/python-pip/trunk/debian/patches/better-error-message.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/better-error-message.patch	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/patches/better-error-message.patch	2015-04-30 22:17:23 UTC (rev 32495)
@@ -6,16 +6,31 @@
 
 --- a/pip/commands/wheel.py
 +++ b/pip/commands/wheel.py
-@@ -88,7 +88,11 @@
-         try:
-             import wheel.bdist_wheel
-         except ImportError:
--            raise CommandError("'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheel")
+@@ -101,11 +101,26 @@
+         self.parser.insert_option_group(0, cmd_opts)
+ 
+     def check_required_packages(self):
++        # 2015-04-30 barry at debian.org
++        #
++        # If we're outside of a venv, we want the error message to suggest
++        # apt-get installing the requisite package.  Inside a venv, pip
++        # install is still the right recommendation.
++        import sys
++        from pip.locations import running_under_virtualenv
++        if running_under_virtualenv():
++            recommendation = "pip install wheel"
++        else:
 +            if sys.version_info < (3,):
 +                debian_package = 'python-wheel'
 +            else:
 +                debian_package = 'python3-wheel'
-+            raise CommandError("'pip wheel' requires the 'wheel' package. To fix this, run: sudo apt-get install %s" % debian_package)
- 
-         try:
-             import pkg_resources
++            recommendation = "apt-get install {}".format(debian_package)
+         import_or_raise(
+             'wheel.bdist_wheel',
+             CommandError,
+             "'pip wheel' requires the 'wheel' package. To fix this, run: "
+-            "pip install wheel"
++            + recommendation
+         )
+         pkg_resources = import_or_raise(
+             'pkg_resources',

Deleted: packages/python-pip/trunk/debian/patches/de-vendorize.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/de-vendorize.patch	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/patches/de-vendorize.patch	2015-04-30 22:17:23 UTC (rev 32495)
@@ -1,310 +0,0 @@
-Description: Use Debian packages instead of vendorized versions.
-Author: Barry Warsaw <barry at debian.org>
-Forwarded: not-needed
-
---- a/pip/baseparser.py
-+++ b/pip/baseparser.py
-@@ -9,7 +9,6 @@
- from pip.backwardcompat import ConfigParser, string_types
- from pip.locations import default_config_file
- from pip.util import get_terminal_size, get_prog
--from pip._vendor import pkg_resources
- 
- 
- class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
---- a/pip/download.py
-+++ b/pip/download.py
-@@ -19,13 +19,13 @@
-                       create_download_cache_folder, cache_download)
- from pip.vcs import vcs
- from pip.log import logger
--from pip._vendor import requests, six
--from pip._vendor.requests.adapters import BaseAdapter
--from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
--from pip._vendor.requests.compat import IncompleteRead
--from pip._vendor.requests.exceptions import InvalidURL, ChunkedEncodingError
--from pip._vendor.requests.models import Response
--from pip._vendor.requests.structures import CaseInsensitiveDict
-+import requests, six
-+from requests.adapters import BaseAdapter
-+from requests.auth import AuthBase, HTTPBasicAuth
-+from requests.compat import IncompleteRead
-+from requests.exceptions import InvalidURL, ChunkedEncodingError
-+from requests.models import Response
-+from requests.structures import CaseInsensitiveDict
- 
- __all__ = ['get_file_content',
-            'is_url', 'url_to_path', 'path_to_url',
---- a/pip/commands/show.py
-+++ b/pip/commands/show.py
-@@ -2,7 +2,7 @@
- 
- from pip.basecommand import Command
- from pip.log import logger
--from pip._vendor import pkg_resources
-+import pkg_resources
- 
- 
- class ShowCommand(Command):
---- a/pip/commands/freeze.py
-+++ b/pip/commands/freeze.py
-@@ -6,7 +6,7 @@
- from pip.log import logger
- from pip.basecommand import Command
- from pip.util import get_installed_distributions
--from pip._vendor import pkg_resources
-+import pkg_resources
- 
- 
- class FreezeCommand(Command):
---- a/pip/commands/search.py
-+++ b/pip/commands/search.py
-@@ -9,7 +9,7 @@
- from pip.backwardcompat import xmlrpclib, reduce, cmp
- from pip.exceptions import CommandError
- from pip.status_codes import NO_MATCHES_FOUND
--from pip._vendor import pkg_resources
-+import pkg_resources
- from distutils.version import StrictVersion, LooseVersion
- 
- 
---- a/pip/log.py
-+++ b/pip/log.py
-@@ -6,7 +6,7 @@
- import logging
- 
- from pip import backwardcompat
--from pip._vendor import colorama, pkg_resources
-+import colorama, pkg_resources
- 
- 
- def _color_wrap(*colors):
---- a/pip/req.py
-+++ b/pip/req.py
-@@ -33,7 +33,7 @@
-                           unpack_file_url, unpack_http_url)
- import pip.wheel
- from pip.wheel import move_wheel_files, Wheel, wheel_ext
--from pip._vendor import pkg_resources, six
-+import pkg_resources, six
- 
- 
- def read_text_file(filename):
---- a/pip/util.py
-+++ b/pip/util.py
-@@ -14,8 +14,8 @@
-                                 console_to_str, user_site, PermissionError)
- from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
- from pip.log import logger
--from pip._vendor import pkg_resources
--from pip._vendor.distlib import version
-+import pkg_resources
-+from distlib import version
- 
- __all__ = ['rmtree', 'display_path', 'backup_dir',
-            'find_command', 'ask', 'Inf',
---- a/pip/index.py
-+++ b/pip/index.py
-@@ -14,8 +14,8 @@
- from pip.download import PipSession, url_to_path, path_to_url
- from pip.wheel import Wheel, wheel_ext
- from pip.pep425tags import supported_tags, supported_tags_noarch, get_platform
--from pip._vendor import html5lib, requests, pkg_resources
--from pip._vendor.requests.exceptions import SSLError
-+import html5lib, requests, pkg_resources
-+from requests.exceptions import SSLError
- 
- 
- __all__ = ['PackageFinder']
---- a/pip/wheel.py
-+++ b/pip/wheel.py
-@@ -21,9 +21,8 @@
- from pip.log import logger
- from pip import pep425tags
- from pip.util import call_subprocess, normalize_path, make_path_relative
--from pip._vendor import pkg_resources
--from pip._vendor.distlib.scripts import ScriptMaker
--from pip._vendor import pkg_resources
-+import pkg_resources
-+from distlib.scripts import ScriptMaker
- 
- 
- wheel_ext = '.whl'
---- a/setup.py
-+++ b/setup.py
-@@ -67,9 +67,6 @@
-       license='MIT',
-       packages=find_packages(exclude=["contrib", "docs", "tests*"]),
-       package_data={
--          'pip._vendor.requests': ['*.pem'],
--          'pip._vendor.distlib._backport': ['sysconfig.cfg'],
--          'pip._vendor.distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
-       },
-       entry_points=dict(console_scripts=['pip=pip:main', 'pip%s=pip:main' % sys.version[:1],
-           'pip%s=pip:main' % sys.version[:3]]),
---- a/pip.egg-info/SOURCES.txt
-+++ b/pip.egg-info/SOURCES.txt
-@@ -49,156 +49,6 @@
- pip.egg-info/not-zip-safe
- pip.egg-info/requires.txt
- pip.egg-info/top_level.txt
--pip/_vendor/__init__.py
--pip/_vendor/pkg_resources.py
--pip/_vendor/re-vendor.py
--pip/_vendor/six.py
--pip/_vendor/_markerlib/__init__.py
--pip/_vendor/_markerlib/markers.py
--pip/_vendor/colorama/__init__.py
--pip/_vendor/colorama/ansi.py
--pip/_vendor/colorama/ansitowin32.py
--pip/_vendor/colorama/initialise.py
--pip/_vendor/colorama/win32.py
--pip/_vendor/colorama/winterm.py
--pip/_vendor/distlib/__init__.py
--pip/_vendor/distlib/compat.py
--pip/_vendor/distlib/database.py
--pip/_vendor/distlib/index.py
--pip/_vendor/distlib/locators.py
--pip/_vendor/distlib/manifest.py
--pip/_vendor/distlib/markers.py
--pip/_vendor/distlib/metadata.py
--pip/_vendor/distlib/resources.py
--pip/_vendor/distlib/scripts.py
--pip/_vendor/distlib/t32.exe
--pip/_vendor/distlib/t64.exe
--pip/_vendor/distlib/util.py
--pip/_vendor/distlib/version.py
--pip/_vendor/distlib/w32.exe
--pip/_vendor/distlib/w64.exe
--pip/_vendor/distlib/wheel.py
--pip/_vendor/distlib/_backport/__init__.py
--pip/_vendor/distlib/_backport/misc.py
--pip/_vendor/distlib/_backport/shutil.py
--pip/_vendor/distlib/_backport/sysconfig.cfg
--pip/_vendor/distlib/_backport/sysconfig.py
--pip/_vendor/distlib/_backport/tarfile.py
--pip/_vendor/html5lib/__init__.py
--pip/_vendor/html5lib/constants.py
--pip/_vendor/html5lib/html5parser.py
--pip/_vendor/html5lib/ihatexml.py
--pip/_vendor/html5lib/inputstream.py
--pip/_vendor/html5lib/sanitizer.py
--pip/_vendor/html5lib/tokenizer.py
--pip/_vendor/html5lib/utils.py
--pip/_vendor/html5lib/filters/__init__.py
--pip/_vendor/html5lib/filters/_base.py
--pip/_vendor/html5lib/filters/alphabeticalattributes.py
--pip/_vendor/html5lib/filters/inject_meta_charset.py
--pip/_vendor/html5lib/filters/lint.py
--pip/_vendor/html5lib/filters/optionaltags.py
--pip/_vendor/html5lib/filters/sanitizer.py
--pip/_vendor/html5lib/filters/whitespace.py
--pip/_vendor/html5lib/serializer/__init__.py
--pip/_vendor/html5lib/serializer/htmlserializer.py
--pip/_vendor/html5lib/treeadapters/__init__.py
--pip/_vendor/html5lib/treeadapters/sax.py
--pip/_vendor/html5lib/treebuilders/__init__.py
--pip/_vendor/html5lib/treebuilders/_base.py
--pip/_vendor/html5lib/treebuilders/dom.py
--pip/_vendor/html5lib/treebuilders/etree.py
--pip/_vendor/html5lib/treebuilders/etree_lxml.py
--pip/_vendor/html5lib/treewalkers/__init__.py
--pip/_vendor/html5lib/treewalkers/_base.py
--pip/_vendor/html5lib/treewalkers/dom.py
--pip/_vendor/html5lib/treewalkers/etree.py
--pip/_vendor/html5lib/treewalkers/genshistream.py
--pip/_vendor/html5lib/treewalkers/lxmletree.py
--pip/_vendor/html5lib/treewalkers/pulldom.py
--pip/_vendor/html5lib/trie/__init__.py
--pip/_vendor/html5lib/trie/_base.py
--pip/_vendor/html5lib/trie/datrie.py
--pip/_vendor/html5lib/trie/py.py
--pip/_vendor/requests/__init__.py
--pip/_vendor/requests/adapters.py
--pip/_vendor/requests/api.py
--pip/_vendor/requests/auth.py
--pip/_vendor/requests/cacert.pem
--pip/_vendor/requests/certs.py
--pip/_vendor/requests/compat.py
--pip/_vendor/requests/cookies.py
--pip/_vendor/requests/exceptions.py
--pip/_vendor/requests/hooks.py
--pip/_vendor/requests/models.py
--pip/_vendor/requests/sessions.py
--pip/_vendor/requests/status_codes.py
--pip/_vendor/requests/structures.py
--pip/_vendor/requests/utils.py
--pip/_vendor/requests/packages/__init__.py
--pip/_vendor/requests/packages/chardet/__init__.py
--pip/_vendor/requests/packages/chardet/big5freq.py
--pip/_vendor/requests/packages/chardet/big5prober.py
--pip/_vendor/requests/packages/chardet/chardetect.py
--pip/_vendor/requests/packages/chardet/chardistribution.py
--pip/_vendor/requests/packages/chardet/charsetgroupprober.py
--pip/_vendor/requests/packages/chardet/charsetprober.py
--pip/_vendor/requests/packages/chardet/codingstatemachine.py
--pip/_vendor/requests/packages/chardet/compat.py
--pip/_vendor/requests/packages/chardet/constants.py
--pip/_vendor/requests/packages/chardet/cp949prober.py
--pip/_vendor/requests/packages/chardet/escprober.py
--pip/_vendor/requests/packages/chardet/escsm.py
--pip/_vendor/requests/packages/chardet/eucjpprober.py
--pip/_vendor/requests/packages/chardet/euckrfreq.py
--pip/_vendor/requests/packages/chardet/euckrprober.py
--pip/_vendor/requests/packages/chardet/euctwfreq.py
--pip/_vendor/requests/packages/chardet/euctwprober.py
--pip/_vendor/requests/packages/chardet/gb2312freq.py
--pip/_vendor/requests/packages/chardet/gb2312prober.py
--pip/_vendor/requests/packages/chardet/hebrewprober.py
--pip/_vendor/requests/packages/chardet/jisfreq.py
--pip/_vendor/requests/packages/chardet/jpcntx.py
--pip/_vendor/requests/packages/chardet/langbulgarianmodel.py
--pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
--pip/_vendor/requests/packages/chardet/langgreekmodel.py
--pip/_vendor/requests/packages/chardet/langhebrewmodel.py
--pip/_vendor/requests/packages/chardet/langhungarianmodel.py
--pip/_vendor/requests/packages/chardet/langthaimodel.py
--pip/_vendor/requests/packages/chardet/latin1prober.py
--pip/_vendor/requests/packages/chardet/mbcharsetprober.py
--pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
--pip/_vendor/requests/packages/chardet/mbcssm.py
--pip/_vendor/requests/packages/chardet/sbcharsetprober.py
--pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
--pip/_vendor/requests/packages/chardet/sjisprober.py
--pip/_vendor/requests/packages/chardet/universaldetector.py
--pip/_vendor/requests/packages/chardet/utf8prober.py
--pip/_vendor/requests/packages/urllib3/__init__.py
--pip/_vendor/requests/packages/urllib3/_collections.py
--pip/_vendor/requests/packages/urllib3/connection.py
--pip/_vendor/requests/packages/urllib3/connectionpool.py
--pip/_vendor/requests/packages/urllib3/exceptions.py
--pip/_vendor/requests/packages/urllib3/fields.py
--pip/_vendor/requests/packages/urllib3/filepost.py
--pip/_vendor/requests/packages/urllib3/poolmanager.py
--pip/_vendor/requests/packages/urllib3/request.py
--pip/_vendor/requests/packages/urllib3/response.py
--pip/_vendor/requests/packages/urllib3/contrib/__init__.py
--pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py
--pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
--pip/_vendor/requests/packages/urllib3/packages/__init__.py
--pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
--pip/_vendor/requests/packages/urllib3/packages/six.py
--pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
--pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
--pip/_vendor/requests/packages/urllib3/util/__init__.py
--pip/_vendor/requests/packages/urllib3/util/connection.py
--pip/_vendor/requests/packages/urllib3/util/request.py
--pip/_vendor/requests/packages/urllib3/util/response.py
--pip/_vendor/requests/packages/urllib3/util/ssl_.py
--pip/_vendor/requests/packages/urllib3/util/timeout.py
--pip/_vendor/requests/packages/urllib3/util/url.py
- pip/backwardcompat/__init__.py
- pip/commands/__init__.py
- pip/commands/bundle.py
-@@ -217,4 +67,4 @@
- pip/vcs/bazaar.py
- pip/vcs/git.py
- pip/vcs/mercurial.py
--pip/vcs/subversion.py
-\ No newline at end of file
-+pip/vcs/subversion.py

Modified: packages/python-pip/trunk/debian/patches/series
===================================================================
--- packages/python-pip/trunk/debian/patches/series	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/patches/series	2015-04-30 22:17:23 UTC (rev 32495)
@@ -1,5 +1,3 @@
-de-vendorize.patch
 use-wheels.patch
 better-error-message.patch
-random-install-dir.patch
-no-touch-system-files.patch
+#no-touch-system-files.patch

Modified: packages/python-pip/trunk/debian/patches/use-wheels.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/use-wheels.patch	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/patches/use-wheels.patch	2015-04-30 22:17:23 UTC (rev 32495)
@@ -1,96 +1,64 @@
-Description: We need to add all the recursively devendorized dependent wheels
- to sys.path so that they can be imported.  These wheel files live in
- different places depending on whether we're inside or outside a virtual
- environment.
+Description: In Debian, we de-vendorize all bundled dependencies, placing them
+ in a Debian-specific wheel directory.  The vendorized packages will be
+ automatically pruned during package build.  All we need to do here is
+ calculate the correct WHEEL_DIR and let pip's VendorAlias class do the rest.
 Author: Barry Warsaw <barry at debian.org>
 Forwarded: not-needed
 
---- a/pip/__init__.py
-+++ b/pip/__init__.py
-@@ -4,6 +4,69 @@
+--- a/setup.py
++++ b/setup.py
+@@ -47,7 +47,13 @@
  
- import sys
- import re
-+import errno
+ long_description = read('README.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')
++
+ 
+ find_excludes = ["contrib", "docs", "tests*", "tasks"]
+ 
+--- a/pip/_vendor/__init__.py
++++ b/pip/_vendor/__init__.py
+@@ -11,12 +11,36 @@
+ import os.path
+ import sys
+ 
++# 2015-04-30 barry at debian.org
++#
 +# Upstream pip vendorizes a bunch of its dependencies.  Debian de-vendorizes
 +# (unbundles) these dependencies to be compliant with Debian policy.  Instead,
 +# these dependencies are packaged as wheel (.whl) files in a known location.
 +# When pip itself executes, we have to arrange for these wheels to show up
-+# earlier on sys.path than any  other version of these packages, otherwise
++# earlier on sys.path than any other version of these packages, otherwise
 +# things can break.  See for example Bug #744145.
 +#
 +# The location of the wheels differs depending on whether we're inside or
 +# outside a virtual environment, regardless of whether that venv was created
 +# with virtualenv or pyvenv.  The first thing we have to do is figure out if
-+# we're inside or outside a venv, then search the appropriate wheel directory
-+# and add all the .whls found there to the front of sys.path.  As per Debian
-+# Python Policy, only the wheels needed to support this de-vendorization will
-+# be present, so it's safe to add them all.
++# we're inside or outside a venv.  Then we'll set WHEEL_DIR as appropriate
++# below and let pip's VendorAlias class do the rest.
 +#
 +# venv determination is a bit of a black art, but this algorithm should work
-+# in both Python 2 (virtualenv-only) and Python 3 (pyvenv and virtualenv).  -
-+# updated by barry at debian.org 2015-02-25
++# in both Python 2 (virtualenv-only) and Python 3 (pyvenv and virtualenv).
++from pip.locations import running_under_virtualenv
 +
-+base_prefix = getattr(sys, 'base_prefix', None)
-+real_prefix = getattr(sys, 'real_prefix', None)
-+if base_prefix is None:
-+    # Python 2 has no base_prefix at all.  It also has no pyvenv.  Fall back
-+    # to checking real_prefix.
-+    if real_prefix is None:
-+        # We are not in a venv.
-+        in_venv = False
-+    else:
-+        # We're in a Python 2 virtualenv created venv, but real_prefix should
-+        # never be the same as sys.prefix.
-+        assert sys.prefix != real_prefix
-+        in_venv = True
-+elif sys.prefix != base_prefix:
-+    # We're in a Python 3, pyvenv created venv.
-+    in_venv = True
-+elif real_prefix is None:
-+    # We're in Python 3, outside a venv, but base better equal prefix.
-+    assert sys.prefix == base_prefix
-+    in_venv = False
++if running_under_virtualenv():
++    WHEEL_DIR = os.path.join(sys.prefix, 'lib', 'python-wheels')
 +else:
-+    # We're in a Python 3, virtualenv created venv.
-+    assert real_prefix != sys.prefix
-+    in_venv = True
++    WHEEL_DIR = '/usr/share/python-wheels'
 +
-+
-+if in_venv:
-+    wheel_dir = os.path.join(sys.prefix, 'lib', 'python-wheels')
-+else:
-+    wheel_dir = '/usr/share/python-wheels'
-+
-+# We'll add all the wheels we find to the front of sys.path so that they're
-+# found first, even if the same dependencies are available in site-packages.
-+try:
-+    for filename in os.listdir(wheel_dir):
-+        if os.path.splitext(filename)[1] == '.whl':
-+            sys.path.insert(0, os.path.join(wheel_dir, filename))
-+# FileNotFoundError doesn't exist in Python 2, but ignore it anyway.
-+except OSError as error:
-+    if error.errno != errno.ENOENT:
-+        raise
-+
  
- from pip.exceptions import InstallationError, CommandError, PipError
- from pip.log import logger
---- a/setup.py
-+++ b/setup.py
-@@ -41,7 +41,13 @@
- long_description = "\n" + "\n".join([read('PROJECT.txt'),
-                                      read('docs', 'quickstart.rst')])
+ # By default, look in this directory for a bunch of .whl files which we will
+ # add to the beginning of sys.path before attempting to import anything. This
+ # is done to support downstream re-distributors like Debian and Fedora who
+ # wish to create their own Wheels for our dependencies to aid in debundling.
+-WHEEL_DIR = os.path.abspath(os.path.dirname(__file__))
++#WHEEL_DIR = os.path.abspath(os.path.dirname(__file__))
  
--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'),
+ # Actually look inside of WHEEL_DIR to find .whl files and add them to the
+ # front of our sys.path.

Modified: packages/python-pip/trunk/debian/rules
===================================================================
--- packages/python-pip/trunk/debian/rules	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/rules	2015-04-30 22:17:23 UTC (rev 32495)
@@ -3,13 +3,12 @@
 export PYBUILD_NAME=pip
 #export DH_VERBOSE=1
 
+# To prevent the installation of the vendorized packages.
+export PIP_NO_VENDOR_FOR_DOWNSTREAM=1
+
 %:
 	dh $@ --with python2,python3 --buildsystem=pybuild
 
-override_dh_auto_build:
-	rm -rf pip/_vendor
-	dh_auto_build
-
 override_dh_python3:
 	dh_python3
 	rm -f debian/python3-pip/usr/bin/pip

Modified: packages/python-pip/trunk/debian/watch
===================================================================
--- packages/python-pip/trunk/debian/watch	2015-04-30 20:13:18 UTC (rev 32494)
+++ packages/python-pip/trunk/debian/watch	2015-04-30 22:17:23 UTC (rev 32495)
@@ -1,2 +1,4 @@
 version=3
-https://pypi.python.org/packages/source/p/pip/ pip-(.*)\.tar\.gz
+#opts=uversionmangle=s/(rc|a|b|c)/~$1/,pgpsigurlmangle=s/$/.asc/ \
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+http://pypi.debian.net/pip/pip-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
\ No newline at end of file




More information about the Python-modules-commits mailing list