def check_command_dependencies(cmd_name): # FIXME: temporary hack to inform the user, handle command dependency # automatically at some point if cmd_name == "build": configure_cmd = get_command("configure") if not configure_cmd.has_run(): raise UsageException("""\ The project was not configured: you need to run 'bentomaker configure' first""") if not configure_cmd.up_to_date(): raise UsageException("""\ The project configuration has changed. You need to re-run 'bentomaker configure' first""") elif cmd_name in ["install", "build_egg", "build_wininst"]: build_cmd = get_command("build") if not build_cmd.has_run(): raise UsageException("""\ The project was not built: you need to 'bentomaker build' first""") built_config = _read_argv_checksum("build") configured_config = _read_argv_checksum("configure") if built_config != configured_config: raise UsageException("""\ The project was reconfigured: you need to re-run 'bentomaker build' before \ installing""")
def store(self): Context.store(self) self.yaku_build_ctx.store() checksum = _read_argv_checksum("configure") _write_argv_checksum(checksum, "build")