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

Barry Warsaw barry at moszumanska.debian.org
Thu Aug 13 22:41:47 UTC 2015


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

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

commit fb8a305a413bdb928de18c62a42de0beb998fdc7
Merge: 7c83f25 4973b1c
Author: Barry Warsaw <barry at debian.org>
Date:   Thu Aug 13 18:22:28 2015 -0400

    merge patched into master

 debian/.git-dpm                                    |  4 +--
 .../handle-pkg_resources-devendorization.patch     | 36 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 pex/pex_bootstrapper.py                            | 14 +++++++++
 4 files changed, 53 insertions(+), 2 deletions(-)

diff --cc debian/.git-dpm
index 8805940,0000000..35c495e
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- e497a82aa8ffdbd3e1fd5dfb2c976b37d97d9c05
- e497a82aa8ffdbd3e1fd5dfb2c976b37d97d9c05
++4973b1c7297170a595e6d21fde776a75ab7f8acc
++4973b1c7297170a595e6d21fde776a75ab7f8acc
 +5053627b97fcec5fe41e5714cb6b21529b46d5dd
 +5053627b97fcec5fe41e5714cb6b21529b46d5dd
 +python-pex_1.0.3.orig.tar.gz
 +7a8182da2bc74b8a06a0a00289244fda6586daf6
 +106905
diff --cc debian/patches/handle-pkg_resources-devendorization.patch
index 0000000,0000000..807e1bd
new file mode 100644
--- /dev/null
+++ b/debian/patches/handle-pkg_resources-devendorization.patch
@@@ -1,0 -1,0 +1,36 @@@
++From 4973b1c7297170a595e6d21fde776a75ab7f8acc Mon Sep 17 00:00:00 2001
++From: Barry Warsaw <barry at debian.org>
++Date: Thu, 13 Aug 2015 18:21:53 -0400
++Subject: Work around Debian's devendorizing of pkg_resource dependencies.
++
++Forwarded: not-needed
++Patch-Name: handle-pkg_resources-devendorization.patch
++---
++ pex/pex_bootstrapper.py | 14 ++++++++++++++
++ 1 file changed, 14 insertions(+)
++
++diff --git a/pex/pex_bootstrapper.py b/pex/pex_bootstrapper.py
++index 586c788..401b2a7 100644
++--- a/pex/pex_bootstrapper.py
+++++ b/pex/pex_bootstrapper.py
++@@ -95,6 +95,20 @@ def bootstrap_pex(entry_point):
++   register_finders()
++   maybe_reexec_pex()
++ 
+++  # 2015-03-24 BAW (Debian/Ubuntu): This will make grown Pythonistas weep.  In
+++  # Debian, we devendorize pkg_resources by removing all its bundled
+++  # dependencies and making it use the system versions.  This plays havoc with
+++  # pex though, because pex messes with sys.path and sys.modules and ends up
+++  # double importing sub-modules from pkg_resources.  This confuses Python
+++  # deeply, resulting in AttributeError tracebacks when pkg_resources itself
+++  # tries to dig sub-modules out of its own namespace.  Yes, AttributeErrors,
+++  # not ImportErrors.  By pure trial and error, this seems to work around the
+++  # problem.
+++  import sys
+++  for modname in list(sys.modules):
+++    if modname.startswith('pkg_resources.'):
+++      del sys.modules[modname]
+++
++   from . import pex
++   pex.PEX(entry_point).execute()
++ 
diff --cc debian/patches/series
index 5fcf0cb,0000000..ccc0d2e
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,1 -1,0 +1,2 @@@
 +bump-setuptools-max-version.patch
++handle-pkg_resources-devendorization.patch

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



More information about the Python-modules-commits mailing list