1 --- virtualenv-15.0.1/virtualenv.py~ 2016-03-17 16:16:07.000000000 +0100
2 +++ virtualenv-15.0.1/virtualenv.py 2016-10-18 22:48:47.174956732 +0200
7 - fix_lib64(lib_dir, symlink)
8 + fix_libarch(lib_dir, symlink)
9 stdlib_dirs = [os.path.dirname(os.__file__)]
11 stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
13 copyfile(os.path.abspath(os.path.join(home_dir, subdir_name)), \
14 os.path.join(local_path, subdir_name), symlink)
16 -def fix_lib64(lib_dir, symlink=True):
17 +def fix_libarch(lib_dir, symlink=True):
19 Some platforms (particularly Gentoo on x64) put things in lib64/pythonX.Y
20 instead of lib/pythonX.Y. If this is such a platform we'll just create a
21 @@ -1507,29 +1507,37 @@
22 # PyPy's library path scheme is not affected by this.
23 # Return early or we will die on the following assert.
25 - logger.debug('PyPy detected, skipping lib64 symlinking')
26 + logger.debug('PyPy detected, skipping lib64/libx32 symlinking')
28 - # Check we have a lib64 library path
29 - if not [p for p in distutils.sysconfig.get_config_vars().values()
31 + # Check we have a lib64 or libx32 library path
32 + if [p for p in distutils.sysconfig.get_config_vars().values()
33 + if isinstance(p, basestring) and 'libx32' in p]:
36 + if [p for p in distutils.sysconfig.get_config_vars().values()
37 if isinstance(p, basestring) and 'lib64' in p]:
43 - logger.debug('This system uses lib64; symlinking lib64 to lib')
44 + logger.debug('This system uses %s; symlinking %s to lib', lib_arch, lib_arch)
46 assert os.path.basename(lib_dir) == 'python%s' % sys.version[:3], (
47 "Unexpected python lib dir: %r" % lib_dir)
48 lib_parent = os.path.dirname(lib_dir)
49 top_level = os.path.dirname(lib_parent)
50 lib_dir = os.path.join(top_level, 'lib')
51 - lib64_link = os.path.join(top_level, 'lib64')
52 + libarch_link = os.path.join(top_level, lib_arch)
53 assert os.path.basename(lib_parent) == 'lib', (
54 "Unexpected parent dir: %r" % lib_parent)
55 - if os.path.lexists(lib64_link):
56 + if os.path.lexists(libarch_link):
59 - os.symlink('lib', lib64_link)
60 + os.symlink('lib', libarch_link)
62 - copyfile('lib', lib64_link)
63 + copyfile('lib', libarch_link)
65 def resolve_interpreter(exe):