Commit cc0a044b authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

* Protect against Python imports of binary incompatible dependencies

parent 78b830c5
Subproject commit 5a59dd4f9c830dc60a7da0ac69ac56fa90efaf2e
Subproject commit c1130340961767ba613f5da548fd6385a999c81f
......@@ -87,7 +87,14 @@ def load_prepare(mod_path, depends_on, has_dependent):
env_var_name = 'LIMA_%s_VERSION' % cap_dep
os.environ[env_var_name] = dep_version
if env_var_name in os.environ:
prev_version = os.environ[env_var_name]
if prev_version != dep_version:
msg = 'Forcing %s to %s, which was previously set to '\
'%s' % (env_var_name, dep_version, prev_version)
raise ImportError('%s: %s' % (mod_name, msg))
os.environ[env_var_name] = dep_version
return cleanup_data
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment