##// END OF EJS Templates
policy: extend API version checks for cffi...
Yuya Nishihara -
r32511:2e431fb9 default
parent child Browse files
Show More
@@ -72,16 +72,16 b' def _importfrom(pkgname, modname):'
72
72
73 # keep in sync with "version" in C modules
73 # keep in sync with "version" in C modules
74 _cextversions = {
74 _cextversions = {
75 r'base85': 1,
75 (r'cext', r'base85'): 1,
76 r'bdiff': 1,
76 (r'cext', r'bdiff'): 1,
77 r'diffhelpers': 1,
77 (r'cext', r'diffhelpers'): 1,
78 r'mpatch': 1,
78 (r'cext', r'mpatch'): 1,
79 r'osutil': 1,
79 (r'cext', r'osutil'): 1,
80 r'parsers': 1,
80 (r'cext', r'parsers'): 1,
81 }
81 }
82
82
83 def _checkmod(pkgname, modname, mod):
83 def _checkmod(pkgname, modname, mod):
84 expected = _cextversions.get(modname)
84 expected = _cextversions.get((pkgname, modname))
85 actual = getattr(mod, r'version', None)
85 actual = getattr(mod, r'version', None)
86 if actual != expected:
86 if actual != expected:
87 raise ImportError(r'cannot import module %s.%s '
87 raise ImportError(r'cannot import module %s.%s '
General Comments 0
You need to be logged in to leave comments. Login now