Bug 1100925 - Added modification for MinGW64 version of Python so it will have system modules. r=gps
authorNathan Hakkakzadeh <nhakkakzadeh@mozilla.com>
Wed, 06 Jul 2016 14:16:50 -0700
changeset 305199 2a590793fd0ef0d927431e99b50a316b55dbe250
parent 305198 dafdf2ce12471d187e7171c0ca80ece1626cd593
child 305200 53ee209a0557b5c11e821c980c5a460fd09c1730
push id79518
push usercbook@mozilla.com
push dateSun, 17 Jul 2016 08:09:59 +0000
treeherdermozilla-inbound@711963e8daa3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1100925
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
python/virtualenv/site.py
--- 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)