[Python-modules-commits] r23205 - in packages/python-virtualenv/trunk/debian (2 files)

warsaw-guest at users.alioth.debian.org warsaw-guest at users.alioth.debian.org
Mon Dec 24 16:39:32 UTC 2012


    Date: Monday, December 24, 2012 @ 16:39:27
  Author: warsaw-guest
Revision: 23205

debian/patches/multiarch.patch: Use system multiarch path, if available.
Closes: #695707

Modified:
  packages/python-virtualenv/trunk/debian/changelog
  packages/python-virtualenv/trunk/debian/patches/multiarch.patch

Modified: packages/python-virtualenv/trunk/debian/changelog
===================================================================
--- packages/python-virtualenv/trunk/debian/changelog	2012-12-23 17:59:39 UTC (rev 23204)
+++ packages/python-virtualenv/trunk/debian/changelog	2012-12-24 16:39:27 UTC (rev 23205)
@@ -1,8 +1,8 @@
 python-virtualenv (1.8.4-2) experimental; urgency=low
 
   * Team upload.
-  * debian/patches/multiarch.patch: Use system multiarch path.
-  * Closes: #695707
+  * debian/patches/multiarch.patch: Use system multiarch path, if available.
+    Closes: #695707
 
  -- Barry Warsaw <barry at python.org>  Wed, 12 Dec 2012 14:10:49 -0500
 

Modified: packages/python-virtualenv/trunk/debian/patches/multiarch.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/multiarch.patch	2012-12-23 17:59:39 UTC (rev 23204)
+++ packages/python-virtualenv/trunk/debian/patches/multiarch.patch	2012-12-24 16:39:27 UTC (rev 23205)
@@ -1,12 +1,12 @@
 Description: Adjust the platform sys.path entry to include the full
- multiarch triplet.
+ multiarch triplet.  Fallback to the old way for non-multiarch aware Pythons.
 Author: Barry Warsaw <barry at python.org>
 Forwarded: not-needed
 Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695707
 
 --- a/virtualenv_embedded/site.py
 +++ b/virtualenv_embedded/site.py
-@@ -584,9 +584,15 @@
+@@ -584,9 +584,19 @@
                  paths.insert(0, lib64_path)
              else:
                  paths.append(lib64_path)
@@ -18,10 +18,14 @@
 +        # here, which is where the real stuff lives.  As per PEP 421, in
 +        # Python 3.3+, this lives in sys.implementation, while in Python 2.7
 +        # it lives in sys.
-+        multiarch = getattr(sys, 'implementation', sys)._multiarch
++        try:
++            arch = getattr(sys, 'implementation', sys)._multiarch
++        except AttributeError:
++            # This is a non-multiarch aware Python.  Fallback to the old way.
++            arch = sys.platform
 +        plat_path = os.path.join(sys.real_prefix, 'lib', 
 +                                 'python'+sys.version[:3],
-+                                 'plat-%s' % multiarch)
++                                 'plat-%s' % arch)
          if os.path.exists(plat_path):
              paths.append(plat_path)
      # This is hardcoded in the Python executable, but




More information about the Python-modules-commits mailing list