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
--- 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'