summaryrefslogtreecommitdiff
path: root/multilib.patch
diff options
context:
space:
mode:
authorJan Rękorajski2016-10-18 20:49:57 (GMT)
committerJan Rękorajski2016-10-18 20:49:57 (GMT)
commitc325651652162fb84722912081b49aaf5a2465ef (patch)
tree34affa35f1776227bf213a7b6ec196ac1470c54d /multilib.patch
parent7cef4d31345a0c26c5c80b9031f138e04485c874 (diff)
downloadpython-virtualenv-c325651652162fb84722912081b49aaf5a2465ef.zip
python-virtualenv-c325651652162fb84722912081b49aaf5a2465ef.tar.gz
- rel 2
Diffstat (limited to 'multilib.patch')
-rw-r--r--multilib.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/multilib.patch b/multilib.patch
new file mode 100644
index 0000000..b33ab80
--- /dev/null
+++ b/multilib.patch
@@ -0,0 +1,66 @@
+--- virtualenv-15.0.1/virtualenv.py~ 2016-03-17 16:16:07.000000000 +0100
++++ virtualenv-15.0.1/virtualenv.py 2016-10-18 22:48:47.174956732 +0200
+@@ -1094,7 +1094,7 @@
+ else:
+ prefix = sys.prefix
+ mkdir(lib_dir)
+- fix_lib64(lib_dir, symlink)
++ fix_libarch(lib_dir, symlink)
+ stdlib_dirs = [os.path.dirname(os.__file__)]
+ if is_win:
+ stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
+@@ -1498,7 +1498,7 @@
+ copyfile(os.path.abspath(os.path.join(home_dir, subdir_name)), \
+ os.path.join(local_path, subdir_name), symlink)
+
+-def fix_lib64(lib_dir, symlink=True):
++def fix_libarch(lib_dir, symlink=True):
+ """
+ Some platforms (particularly Gentoo on x64) put things in lib64/pythonX.Y
+ instead of lib/pythonX.Y. If this is such a platform we'll just create a
+@@ -1507,29 +1507,37 @@
+ # PyPy's library path scheme is not affected by this.
+ # Return early or we will die on the following assert.
+ if is_pypy:
+- logger.debug('PyPy detected, skipping lib64 symlinking')
++ logger.debug('PyPy detected, skipping lib64/libx32 symlinking')
+ return
+- # Check we have a lib64 library path
+- if not [p for p in distutils.sysconfig.get_config_vars().values()
++ lib_arch = None
++ # Check we have a lib64 or libx32 library path
++ if [p for p in distutils.sysconfig.get_config_vars().values()
++ if isinstance(p, basestring) and 'libx32' in p]:
++ lib_arch = 'libx32'
++
++ if [p for p in distutils.sysconfig.get_config_vars().values()
+ if isinstance(p, basestring) and 'lib64' in p]:
++ lib_arch = 'lib64'
++
++ if not lib_arch:
+ return
+
+- logger.debug('This system uses lib64; symlinking lib64 to lib')
++ logger.debug('This system uses %s; symlinking %s to lib', lib_arch, lib_arch)
+
+ assert os.path.basename(lib_dir) == 'python%s' % sys.version[:3], (
+ "Unexpected python lib dir: %r" % lib_dir)
+ lib_parent = os.path.dirname(lib_dir)
+ top_level = os.path.dirname(lib_parent)
+ lib_dir = os.path.join(top_level, 'lib')
+- lib64_link = os.path.join(top_level, 'lib64')
++ libarch_link = os.path.join(top_level, lib_arch)
+ assert os.path.basename(lib_parent) == 'lib', (
+ "Unexpected parent dir: %r" % lib_parent)
+- if os.path.lexists(lib64_link):
++ if os.path.lexists(libarch_link):
+ return
+ if symlink:
+- os.symlink('lib', lib64_link)
++ os.symlink('lib', libarch_link)
+ else:
+- copyfile('lib', lib64_link)
++ copyfile('lib', libarch_link)
+
+ def resolve_interpreter(exe):
+ """