Show More
@@ -70,8 +70,18 b' def _importfrom(pkgname, modname):' | |||||
70 | getattr(mod, r'__doc__', None) |
|
70 | getattr(mod, r'__doc__', None) | |
71 | return fakelocals[modname] |
|
71 | return fakelocals[modname] | |
72 |
|
72 | |||
|
73 | # keep in sync with "version" in C modules | |||
|
74 | _cextversions = { | |||
|
75 | r'base85': 1, | |||
|
76 | r'bdiff': 1, | |||
|
77 | r'diffhelpers': 1, | |||
|
78 | r'mpatch': 1, | |||
|
79 | r'osutil': 1, | |||
|
80 | r'parsers': 1, | |||
|
81 | } | |||
|
82 | ||||
73 | def _checkmod(pkgname, modname, mod): |
|
83 | def _checkmod(pkgname, modname, mod): | |
74 | expected = 1 # TODO: maybe defined in table? |
|
84 | expected = _cextversions.get(modname) | |
75 | actual = getattr(mod, r'version', None) |
|
85 | actual = getattr(mod, r'version', None) | |
76 | if actual != expected: |
|
86 | if actual != expected: | |
77 | 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