If you apply the multarchi27.diff patch in bug #695958, then this patch to
virtualenv will do the trick.

Ignore the earlier two python-virtualenv patches.

=== modified file 'debian/changelog'
--- debian/changelog	2012-11-30 15:06:23 +0000
+++ debian/changelog	2012-12-12 19:11:43 +0000
@@ -1,3 +1,10 @@
+python-virtualenv (1.8.4-2) experimental; urgency=low
+
+  * debian/patches/multiarch.patch: Use system multiarch path if available.
+    Closes: #695707
+
+ -- Barry Warsaw <ba...@python.org>  Wed, 12 Dec 2012 14:10:49 -0500
+
 python-virtualenv (1.8.4-1) experimental; urgency=low
 
   * Team upload.

=== added file 'debian/patches/multiarch.patch'
--- debian/patches/multiarch.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/multiarch.patch	2012-12-17 19:26:03 +0000
@@ -0,0 +1,24 @@
+Description: Use system multiarch path if available.
+Author: Barry Warsaw <ba...@python.org>
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695707
+Forwarded: no
+
+--- a/virtualenv_embedded/site.py
++++ b/virtualenv_embedded/site.py
+@@ -584,9 +584,13 @@
+                 paths.insert(0, lib64_path)
+             else:
+                 paths.append(lib64_path)
+-        # This is hardcoded in the Python executable, but relative to sys.prefix:
+-        plat_path = os.path.join(sys.real_prefix, 'lib', 'python'+sys.version[:3],
+-                                 'plat-%s' % sys.platform)
++        # This is hardcoded in the Python executable, but relative to
++        # sys.prefix.  In Python 3.3+ the multiarch triplet lives in (as per
++        # PEP 421) sys.implementation, but in Python 2.7 it lives in sys.
++        multiarch = getattr(sys, 'implementation', sys)._architecture
++        plat_path = os.path.join(sys.real_prefix, 'lib',
++                                 'python'+sys.version[:3],
++                                 'plat-%s' % multiarch)
+         if os.path.exists(plat_path):
+             paths.append(plat_path)
+     # This is hardcoded in the Python executable, but

=== modified file 'debian/patches/series'
--- debian/patches/series	2012-11-30 15:06:23 +0000
+++ debian/patches/series	2012-12-12 19:10:23 +0000
@@ -2,3 +2,4 @@
 use_distribute.patch
 system-python.patch
 entry-points.patch
+multiarch.patch

Reply via email to