f4pga/flows/common_modules/generic_script_wrapper: fix relocating files when paths are specified explicitely (#628)
This commit is contained in:
commit
cfe69b69e9
|
@ -177,9 +177,10 @@ class GenericScriptWrapperModule(Module):
|
|||
with open(target, "wb") as f:
|
||||
f.write(data)
|
||||
|
||||
for _, file, target in self.file_outputs:
|
||||
for dep, file, _ in self.file_outputs:
|
||||
file = ctx.r_env.resolve(file, final=True)
|
||||
target = ctx.r_env.resolve(target, final=True)
|
||||
target = ctx.r_env.resolve(getattr(ctx.outputs, dep), final=True)
|
||||
print(f"file is: {file}, target is: {target}")
|
||||
if target != file:
|
||||
Path(file).rename(target)
|
||||
|
||||
|
|
|
@ -238,12 +238,12 @@ class Flow:
|
|||
sfprint(verbosity, f" {Style.BRIGHT + status} " f"{dep + Style.RESET_ALL}: {source}")
|
||||
|
||||
def _build_dep(self, dep):
|
||||
paths = self.dep_paths.get(dep)
|
||||
provider = self.os_map.get(dep)
|
||||
r_env = self.cfg.r_env if provider is None else self.cfg.get_r_env(provider.name)
|
||||
paths = r_env.resolve(self.dep_paths.get(dep))
|
||||
if not paths:
|
||||
sfprint(2, f"Dependency {dep} is unresolved.")
|
||||
return False
|
||||
|
||||
provider = self.os_map.get(dep)
|
||||
run = (provider.name in self.run_stages) if provider else False
|
||||
|
||||
if p_req_exists(paths) and not run:
|
||||
|
|
Loading…
Reference in New Issue