+def isSupported(module, project):
+ tag_dict = project.info("ALL_CPU_TAGS")
+ module = project.info("MODULES")[module]
+ if "supports" in module:
+ support_string = module["supports"]
+ for tag, value in tag_dict.items():
+ while support_string.find(tag) != -1:
+ support_string = support_string.replace(tag, value)
+ supported = {}
+ try:
+ exec "supported = " + support_string in {}, supported
+ except:
+ raise SupportedException(support_string)
+ return supported["supported"]
+ else:
+ return True
+
+