Bug 1100925 - Added modification for MinGW64 version of Python so it will have system modules. r?gps
Added a quick for MinGW64 then adds the default location of system modules to
sys.path.
MozReview-Commit-ID: IubUhpB3rOf
--- a/python/virtualenv/site.py
+++ b/python/virtualenv/site.py
@@ -574,17 +574,18 @@ def virtual_install_main_packages():
'lib-python', 'modified-%s' % cpyver))
hardcoded_relative_dirs = paths[:] # for the special 'darwin' case below
#
# This is hardcoded in the Python executable, but relative to sys.prefix:
for path in paths[:]:
plat_path = os.path.join(path, 'plat-%s' % sys.platform)
if os.path.exists(plat_path):
paths.append(plat_path)
- elif sys.platform == 'win32':
+ # MOZ: The MSYS2 and MinGW versions of Python have their main packages in the UNIX directory this checks specifically for the native win32 python
+ elif sys.platform == 'win32' and os.sep == '\\':
paths = [os.path.join(sys.real_prefix, 'Lib'), os.path.join(sys.real_prefix, 'DLLs')]
else:
paths = [os.path.join(sys.real_prefix, 'lib', 'python'+sys.version[:3])]
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):
if _is_64bit:
paths.insert(0, lib64_path)