Bug 1100925 - For whatever reason MinGW Python cannot import functools which is needed in the build process. r=gps
authorNathan Hakkakzadeh <nhakkakzadeh@mozilla.com>
Thu, 02 Jun 2016 13:53:10 -0700
changeset 305194 b88241fa95abfc16bfb1bdcddc92895c2de5ea46
parent 305193 bbd6316e775c989ec9c594fa26419cc8df0953b0
child 305195 ca387c1ae6a3152e39561f37e605214df73fc18d
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 - 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'