Bug 1100925 - For whatever reason MinGW Python cannot import functools which is needed in the build process. r?gps draft
authorNathan Hakkakzadeh <nhakkakzadeh@mozilla.com>
Thu, 02 Jun 2016 13:53:10 -0700
changeset 387332 4e98c78b084c5cb1a41b5a386359bdaad565643d
parent 387331 b147f21757d83c0d23a24766d40184bce2097689
child 387333 c35a1942dd8fdcc0bdc9a7f0d98e0bf35038951a
child 387433 5809399602693eb91a1c4f620bc22ea722e8250c
push id22942
push userbmo:nhakkakzadeh@mozilla.com
push dateWed, 13 Jul 2016 21:21:35 +0000
reviewersgps
bugs1100925
milestone50.0a1
Bug 1100925 - For whatever reason MinGW Python cannot import functools which is needed in the build process. r?gps By placing the functools module in the REQUIRED_MODULES list, the environment will not throw an ImportError when the build systemimports functools. MozReview-Commit-ID: 8DjzXqxvxXd
python/virtualenv/virtualenv.py
--- a/python/virtualenv/virtualenv.py
+++ b/python/virtualenv/virtualenv.py
@@ -126,16 +126,18 @@ REQUIRED_MODULES = ['os', 'posix', 'posi
 REQUIRED_FILES = ['lib-dynload', 'config']
 
 majver, minver = sys.version_info[:2]
 if majver == 2:
     if minver >= 6:
         REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
     if minver >= 7:
         REQUIRED_MODULES.extend(['_weakrefset'])
+    if is_msys2:
+        REQUIRED_MODULES.extend(['functools'])
 elif majver == 3:
     # Some extra modules are needed for Python 3, but different ones
     # for different versions.
     REQUIRED_MODULES.extend([
     	'_abcoll', 'warnings', 'linecache', 'abc', 'io', '_weakrefset',
     	'copyreg', 'tempfile', 'random', '__future__', 'collections',
     	'keyword', 'tarfile', 'shutil', 'struct', 'copy', 'tokenize',
     	'token', 'functools', 'heapq', 'bisect', 'weakref', 'reprlib'