[Python-modules-commits] [python-pip] 04/04: merge patched into master

Barry Warsaw barry at moszumanska.debian.org
Fri Jan 29 22:34:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-pip.

commit 2508bba31d430b5b6f3bfddae07d1191f40aa8cf
Merge: 94dae9c 144ba14
Author: Barry Warsaw <barry at python.org>
Date:   Fri Jan 29 17:29:58 2016 -0500

    merge patched into master

 debian/.git-dpm                                |  4 ++--
 debian/patches/debundle.patch                  |  2 +-
 debian/patches/handle-unbundled-requests.patch |  2 +-
 debian/patches/hands-off-system-packages.patch | 11 ++++++-----
 pip/utils/__init__.py                          |  1 +
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --cc debian/.git-dpm
index 9ee9e04,0000000..a0e1054
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 95be52582556a4aee8cf659f703c2dc9d80fb4ca
- 95be52582556a4aee8cf659f703c2dc9d80fb4ca
++144ba146cde273b815a80859537b09c068fd47e6
++144ba146cde273b815a80859537b09c068fd47e6
 +c9fd1b7c41802c64663a7a4646bf9b546f2389e2
 +c9fd1b7c41802c64663a7a4646bf9b546f2389e2
 +python-pip_8.0.2.orig.tar.gz
 +974a8c345d272b9d9072287f399aab8410067f7e
 +1130183
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/debundle.patch
index f16d200,0000000..28bd76a
mode 100644,000000..100644
--- a/debian/patches/debundle.patch
+++ b/debian/patches/debundle.patch
@@@ -1,30 -1,0 +1,30 @@@
- From bf860692b3d9c96ffa0cd1eb24dee042eae2f1f3 Mon Sep 17 00:00:00 2001
++From 4ad0c64374fc905a82542d4f56a36470a414b421 Mon Sep 17 00:00:00 2001
 +From: Barry Warsaw <barry at python.org>
 +Date: Thu, 3 Dec 2015 17:24:13 -0500
 +Subject: Devendorize wheels and use system built wheels.
 +
 +Patch-Name: debundle.patch
 +---
 + pip/_vendor/__init__.py | 4 ++--
 + 1 file changed, 2 insertions(+), 2 deletions(-)
 +
 +diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py
 +index b09a7c3..1cb35a1 100644
 +--- a/pip/_vendor/__init__.py
 ++++ b/pip/_vendor/__init__.py
 +@@ -14,13 +14,13 @@ import sys
 + # Downstream redistributors which have debundled our dependencies should also
 + # patch this value to be true. This will trigger the additional patching
 + # to cause things like "six" to be available as pip.
 +-DEBUNDLED = False
 ++DEBUNDLED = True
 + 
 + # 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.join(sys.prefix, 'share', 'python-wheels'))
 + 
 + 
 + # Define a small helper function to alias our vendored modules to the real ones
diff --cc debian/patches/handle-unbundled-requests.patch
index 7201fb5,0000000..e2be9c4
mode 100644,000000..100644
--- a/debian/patches/handle-unbundled-requests.patch
+++ b/debian/patches/handle-unbundled-requests.patch
@@@ -1,29 -1,0 +1,29 @@@
- From 95be52582556a4aee8cf659f703c2dc9d80fb4ca Mon Sep 17 00:00:00 2001
++From 144ba146cde273b815a80859537b09c068fd47e6 Mon Sep 17 00:00:00 2001
 +From: Barry Warsaw <barry at python.org>
 +Date: Fri, 29 Jan 2016 16:56:43 -0500
 +Subject: Debian already unbundles things from requests.
 +
 +Patch-Name: handle-unbundled-requests.patch
 +---
 + pip/_vendor/__init__.py | 8 ++++++--
 + 1 file changed, 6 insertions(+), 2 deletions(-)
 +
 +diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py
 +index 1cb35a1..c64896a 100644
 +--- a/pip/_vendor/__init__.py
 ++++ b/pip/_vendor/__init__.py
 +@@ -82,8 +82,12 @@ if DEBUNDLED:
 +     vendored("requests.packages.urllib3.fields")
 +     vendored("requests.packages.urllib3.filepost")
 +     vendored("requests.packages.urllib3.packages")
 +-    vendored("requests.packages.urllib3.packages.ordered_dict")
 +-    vendored("requests.packages.urllib3.packages.six")
 ++    try:
 ++        vendored("requests.packages.urllib3.packages.ordered_dict")
 ++        vendored("requests.packages.urllib3.packages.six")
 ++    except ImportError:
 ++        # Debian already unbundles these from requests.
 ++        pass
 +     vendored("requests.packages.urllib3.packages.ssl_match_hostname")
 +     vendored("requests.packages.urllib3.packages.ssl_match_hostname."
 +              "_implementation")
diff --cc debian/patches/hands-off-system-packages.patch
index bec4928,0000000..70c4962
mode 100644,000000..100644
--- a/debian/patches/hands-off-system-packages.patch
+++ b/debian/patches/hands-off-system-packages.patch
@@@ -1,74 -1,0 +1,75 @@@
- From 3826944eeef81e83673a177f26d373108cf8d28d Mon Sep 17 00:00:00 2001
++From f740c160e0e133d889e674046bc249d08c22bb34 Mon Sep 17 00:00:00 2001
 +From: Geoffrey Thomas <geofft at ldpreload.com>
 +Date: Wed, 3 Dec 2014 11:18:11 -0600
 +Subject: Prevent pip from removing system packages.
 +
 +Adjust is_local() to consider OS-owned paths non-local.  Fix the error
 +message for is_local() in the non-virtualenv case.
 +
 +Author: Geoffrey Thomas <geofft at ldpreload.com>
 +Bug-Debian: http://bugs.debian.org/771794
 +Origin: https://github.com/geofft/pip.git
 +Forwarded: not-needed
 +Reviewed-By: Donald Stufft <donald at stufft.io>
 +Reviewed-By: Scott Kitterman <scott at kitterman.com>
 +Last-Update: 2014-12-04
 +
 +Patch-Name: hands-off-system-packages.patch
 +---
-  pip/utils/__init__.py | 35 ++++++++++++++++++++++++++---------
-  1 file changed, 26 insertions(+), 9 deletions(-)
++ pip/utils/__init__.py | 36 +++++++++++++++++++++++++++---------
++ 1 file changed, 27 insertions(+), 9 deletions(-)
 +
 +diff --git a/pip/utils/__init__.py b/pip/utils/__init__.py
- index 4768ecb..ca54f34 100644
++index 4768ecb..7bf8de4 100644
 +--- a/pip/utils/__init__.py
 ++++ b/pip/utils/__init__.py
- @@ -275,22 +275,39 @@ def renames(old, new):
++@@ -275,22 +275,40 @@ def renames(old, new):
 + 
 + def is_local(path):
 +     """
 +-    Return True if path is within sys.prefix, if we're running in a virtualenv.
 ++    Return True if this is a path pip is allowed to modify.
 + 
 +-    If we're not in a virtualenv, all paths are considered "local."
 ++    If we're in a virtualenv, sys.prefix points to the virtualenv's
 ++    prefix; only sys.prefix is considered local.
 ++
 ++    If we're not in a virtualenv, in general we can modify anything.
 ++    However, if the OS vendor has configured distutils to install
 ++    somewhere other than sys.prefix (which could be a subdirectory of
 ++    sys.prefix, e.g. /usr/local), we consider sys.prefix itself nonlocal
 ++    and the domain of the OS vendor. (In other words, everything _other
 ++    than_ sys.prefix is considered local.)
 + 
 +     """
 +-    if not running_under_virtualenv():
 +-        return True
 +-    return normalize_path(path).startswith(normalize_path(sys.prefix))
 ++
 ++    path = normalize_path(path)
 ++    prefix = normalize_path(sys.prefix)
 ++
 ++    if running_under_virtualenv():
 ++        return path.startswith(normalize_path(sys.prefix))
 ++    else:
+++        from pip.locations import distutils_scheme
 ++        if path.startswith(prefix):
 ++            for local_path in distutils_scheme("").values():
 ++                if path.startswith(normalize_path(local_path)):
 ++                    return True
 ++            return False
 ++        else:
 ++            return True
 + 
 + 
 + def dist_is_local(dist):
 +     """
 +-    Return True if given Distribution object is installed locally
 +-    (i.e. within current virtualenv).
 +-
 +-    Always True if we're not in a virtualenv.
 ++    Return True if given Distribution object is installed somewhere pip
 ++    is allowed to modify.
 + 
 +     """
 +     return is_local(dist_location(dist))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pip.git



More information about the Python-modules-commits mailing list