[PATCH 2 of 3 v3] demandimport: replace distutils.msvc9compiler ignore with reject
timeless
timeless at fmr.im
Wed Sep 21 15:09:33 EDT 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1474484334 0
# Wed Sep 21 18:58:54 2016 +0000
# Node ID adb54fd7d90f0ca607432ed7ae884da55ec427de
# Parent 33884775ee4b22109085387b0317aa17db73c483
# Available At https://bitbucket.org/timeless/mercurial-crew
# hg pull https://bitbucket.org/timeless/mercurial-crew -r adb54fd7d90f
demandimport: replace distutils.msvc9compiler ignore with reject
diff -r 33884775ee4b -r adb54fd7d90f mercurial/demandimport.py
--- a/mercurial/demandimport.py Wed Sep 21 18:59:07 2016 +0000
+++ b/mercurial/demandimport.py Wed Sep 21 18:58:54 2016 +0000
@@ -296,8 +296,6 @@
'rfc822',
'mimetools',
'sqlalchemy.events', # has import-time side effects (issue5085)
- # setuptools 8 expects this module to explode early when not on windows
- 'distutils.msvc9compiler',
]
rejects = {}
@@ -310,6 +308,11 @@
if not mod in rejects:
rejects[mod] = {}
rejects[mod][prop] = [cls, msg]
+
+# setuptools 8 expects this module to explode early when not on windows
+if os.name != 'nt':
+ reject('distutils', 'msvc9compiler', ImportError, 'No module named _winreg')
+
def isenabled():
return builtins.__import__ == _demandimport
More information about the Mercurial-devel
mailing list