Bug 805835 - Update virtualenv to fix lib64 path issues; r=glandium
The following commits were cherry-picked from virtualenv's Git repository from the develop branch: 0da2c50eafbf6841afad078e04aa873780905b99 e1ec5f3b9f5c3cfa533f5ce440d7ac251c14ad7d da95f04065328a98d16bcad1e9ad0e89f3a41ebe These should hopefully be part of virtualenv 1.8.3, whenever it is released.
This commit is contained in:
@@ -238,7 +238,10 @@ def addsitepackages(known_paths, sys_prefix=sys.prefix, exec_prefix=sys.exec_pre
|
||||
lib64_dir = os.path.join(prefix, "lib64", "python" + sys.version[:3], "site-packages")
|
||||
if (os.path.exists(lib64_dir) and
|
||||
os.path.realpath(lib64_dir) not in [os.path.realpath(p) for p in sitedirs]):
|
||||
sitedirs.append(lib64_dir)
|
||||
if sys.maxsize > 2**32:
|
||||
sitedirs.insert(0, lib64_dir)
|
||||
else:
|
||||
sitedirs.append(lib64_dir)
|
||||
try:
|
||||
# sys.getobjects only available in --with-pydebug build
|
||||
sys.getobjects
|
||||
@@ -577,7 +580,10 @@ def virtual_install_main_packages():
|
||||
hardcoded_relative_dirs = paths[:] # for the special 'darwin' case below
|
||||
lib64_path = os.path.join(sys.real_prefix, 'lib64', 'python'+sys.version[:3])
|
||||
if os.path.exists(lib64_path):
|
||||
paths.append(lib64_path)
|
||||
if sys.maxsize > 2**32:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user