[Python-modules-commits] [python-pip] 09/16: merge patched into master
Barry Warsaw
barry at moszumanska.debian.org
Fri Jan 29 22:23:21 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 ac1d933ba96d61995acbfa877a4313dd4b8c5471
Merge: 775f88c de57da1
Author: Barry Warsaw <barry at python.org>
Date: Fri Jan 29 15:12:04 2016 -0500
merge patched into master
debian/.git-dpm | 4 +-
debian/patches/enable-debundling.patch | 17 ++--
debian/patches/hands-off-system-packages.patch | 28 +++----
debian/patches/series | 1 -
debian/patches/use-wheels.patch | 109 -------------------------
pip/__init__.py | 63 --------------
pip/_vendor/__init__.py | 2 +-
setup.py | 8 +-
8 files changed, 29 insertions(+), 203 deletions(-)
diff --cc debian/.git-dpm
index 56b6461,0000000..f8154e0
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
- 6e14ca521f088ea4bfc8eefa0dfff2118726a554
- 6e14ca521f088ea4bfc8eefa0dfff2118726a554
++de57da1c3ff699d9b039ab1ec3ad246e7e3253a1
++de57da1c3ff699d9b039ab1ec3ad246e7e3253a1
+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/enable-debundling.patch
index 085d8e5,0000000..42ab793
mode 100644,000000..100644
--- a/debian/patches/enable-debundling.patch
+++ b/debian/patches/enable-debundling.patch
@@@ -1,23 -1,0 +1,30 @@@
- From 6e14ca521f088ea4bfc8eefa0dfff2118726a554 Mon Sep 17 00:00:00 2001
++From de57da1c3ff699d9b039ab1ec3ad246e7e3253a1 Mon Sep 17 00:00:00 2001
+From: Barry Warsaw <barry at python.org>
+Date: Thu, 3 Dec 2015 17:24:13 -0500
+Subject: Tell pip to alias the bundled packages.
+
+Patch-Name: enable-debundling.patch
+---
- pip/_vendor/__init__.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
++ 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..a96666b 100644
++index b09a7c3..1cb35a1 100644
+--- a/pip/_vendor/__init__.py
++++ b/pip/_vendor/__init__.py
- @@ -14,7 +14,7 @@ import sys
++@@ -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/hands-off-system-packages.patch
index 9fa1934,0000000..bec4928
mode 100644,000000..100644
--- a/debian/patches/hands-off-system-packages.patch
+++ b/debian/patches/hands-off-system-packages.patch
@@@ -1,76 -1,0 +1,74 @@@
- From 6bbe98288a07a75097111aa29aa2a9e008e585e6 Mon Sep 17 00:00:00 2001
++From 3826944eeef81e83673a177f26d373108cf8d28d Mon Sep 17 00:00:00 2001
+From: Geoffrey Thomas <geofft at ldpreload.com>
+Date: Wed, 3 Dec 2014 11:18:11 -0600
- Subject: =?UTF-8?q?Prevent=20pip=20from=20removing=20system=20installed=20?=
- =?UTF-8?q?packages=20Adjust=20is=5Flocal=20to=0Aconsider=20OS-owned=20pat?=
- =?UTF-8?q?hs=20nonlocal.=20=20Fix=20error=20message=20for=20is=5Flocal=20?=
- =?UTF-8?q?in=20the=0Anon-virtualenv=20case=0A.=0ASee=20Debian=20#771794?=
- =?UTF-8?q?=20for=20the=20motivation.=0AFrom:=20Geoffrey=20Thomas=20<geoff?=
- =?UTF-8?q?t at ldpreload.com>=0A.=0AWhile=20not=20committed=20upstream,=20th?=
- =?UTF-8?q?e=20patch=20author=20has=20submitted=20it=20and=20it=20is=0Abei?=
- =?UTF-8?q?ng=20reviewed.=20=20Upstream=20did=20provide=20positive=20feedb?=
- =?UTF-8?q?ack=20for=20inclusion=20in=0ADebian.=0AAuthor:=20Geoffrey=20Tho?=
- =?UTF-8?q?mas=20<geofft at ldpreload.com>=0ABug-Debian:=20http://bugs.debian?=
- =?UTF-8?q?.org/771794=0AOrigin:=20https://github.com/geofft/pip.git=0AFor?=
- =?UTF-8?q?warded:=20not-needed=0AReviewed-By:=20Donald=20Stufft=20<donald?=
- =?UTF-8?q?@stufft.io>=0AReviewed-By:=20Scott=20Kitterman=20<scott at kitterm?=
- =?UTF-8?q?an.com>=0ALast-Update:=202014-12-04?=
++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(-)
+
+diff --git a/pip/utils/__init__.py b/pip/utils/__init__.py
+index 4768ecb..ca54f34 100644
+--- a/pip/utils/__init__.py
++++ b/pip/utils/__init__.py
+@@ -275,22 +275,39 @@ 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:
++ 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))
diff --cc debian/patches/series
index ebeddd0,0000000..2c4b0cf
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,3 -1,0 +1,2 @@@
- use-wheels.patch
+hands-off-system-packages.patch
+enable-debundling.patch
--
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