[Python-modules-commits] [python-pex] 05/07: merge patched into master

Barry Warsaw barry at moszumanska.debian.org
Wed Mar 25 14:56:24 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 18035de5280b45c958492f3cdfff8490cc693d47
Merge: 3030963 342f859
Author: Barry Warsaw <barry at python.org>
Date:   Wed Mar 25 10:48:58 2015 -0400

    merge patched into master

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

diff --cc debian/.git-dpm
index 4fab4fc,0000000..96ada5e
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
- a4f32e7a2e382e3c750e67ab81055747f5900924
- a4f32e7a2e382e3c750e67ab81055747f5900924
++342f85998e64ef0ded447fe1ac98968e0946d525
++342f85998e64ef0ded447fe1ac98968e0946d525
 +5a53fd5b89920a5134773ad201cc4cb5b3750cb7
 +5a53fd5b89920a5134773ad201cc4cb5b3750cb7
 +python-pex_0.8.6.orig.tar.gz
 +56a37ca04305a6fab6964df3a2d48f924f14cb3a
 +57218
diff --cc debian/patches/handle-pkg_resources-devendorization.patch
index 0000000,0000000..be42eb9
new file mode 100644
--- /dev/null
+++ b/debian/patches/handle-pkg_resources-devendorization.patch
@@@ -1,0 -1,0 +1,37 @@@
++From 342f85998e64ef0ded447fe1ac98968e0946d525 Mon Sep 17 00:00:00 2001
++From: Barry Warsaw <barry at ubuntu.com>
++Date: Wed, 25 Mar 2015 10:48:51 -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 d47683e..9ff60d1 100644
++--- a/pex/pex_bootstrapper.py
+++++ b/pex/pex_bootstrapper.py
++@@ -64,6 +64,20 @@ def bootstrap_pex(entry_point):
++   monkeypatch_build_zipmanifest()
++   register_finders()
++ 
+++  # 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/modern-setuptools.patch
index 6ed5814,0000000..208399f
mode 100644,000000..100644
--- a/debian/patches/modern-setuptools.patch
+++ b/debian/patches/modern-setuptools.patch
@@@ -1,25 -1,0 +1,26 @@@
 +From a4f32e7a2e382e3c750e67ab81055747f5900924 Mon Sep 17 00:00:00 2001
 +From: Barry Warsaw <barry at ubuntu.com>
 +Date: Wed, 25 Mar 2015 10:46:09 -0400
 +Subject: Ubuntu Vivid (15.04) has setuptools 12.2, so the upper limit in
++
 + the setup.py must be removed.  There's no good reason for it anyway.
 +Bug: https://github.com/pantsbuild/pex/issues/55
 +
 +Patch-Name: modern-setuptools.patch
 +---
 + setup.py | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/setup.py b/setup.py
 +index 1c899d7..6a45661 100644
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -36,7 +36,7 @@ setup(
 +     'pex.bin',
 +   ],
 +   install_requires = [
 +-    'setuptools>=2.2,<8',
 ++    'setuptools>=2.2',
 +   ],
 +   tests_require = [
 +     'mock',
diff --cc debian/patches/series
index da04bff,0000000..c61c045
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,1 -1,0 +1,2 @@@
 +modern-setuptools.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