def system_check_touch(): system_check = _load_state(_SYSTEM_CHECK, {}) config_stamp = sourcestamp.compute(config.config_dir) system_check["config_stamp"] = config_stamp _save_state(_SYSTEM_CHECK, system_check)
def built_module_touch(module): built_modules = _load_state(_BUILT_MODULES, {}) source_stamp = sourcestamp.compute(module.get_source_dir()) built_modules[module.name] = {"source_stamp": source_stamp} _save_state(_BUILT_MODULES, built_modules)
def system_check_is_unchanged(): system_check = _load_state(_SYSTEM_CHECK) if not system_check or not "config_stamp" in system_check: return False config_stamp = sourcestamp.compute(config.config_dir) return system_check["config_stamp"] == config_stamp
def built_module_is_unchanged(module): built_modules = _load_state(_BUILT_MODULES, {}) if module.name not in built_modules: return False built_module = built_modules[module.name] if "source_stamp" not in built_module: return False old_source_stamp = built_module["source_stamp"] new_source_stamp = sourcestamp.compute(module.get_source_dir()) return old_source_stamp == new_source_stamp