diff --git a/hooks/quarantine_hook_reduce_conandata.py b/hooks/hook_reduce_conandata.py similarity index 66% rename from hooks/quarantine_hook_reduce_conandata.py rename to hooks/hook_reduce_conandata.py index d983bf64..f3a1fda0 100644 --- a/hooks/quarantine_hook_reduce_conandata.py +++ b/hooks/hook_reduce_conandata.py @@ -10,10 +10,8 @@ def load_yml(conanfile, path): return None -def post_export(output, conanfile, conanfile_path, reference, **kwargs): - export_folder_path = os.path.dirname(conanfile_path) - - conandata_path = os.path.join(export_folder_path, "conandata.yml") +def post_export(conanfile): + conandata_path = os.path.join(conanfile.export_folder, "conandata.yml") version = str(conanfile.version) conandata_yml = load_yml(conanfile, conandata_path) @@ -25,7 +23,7 @@ def post_export(output, conanfile, conanfile_path, reference, **kwargs): continue info[entry] = {} info[entry][version] = conandata_yml[entry][version] - output.info("Saving conandata.yml: {}".format(info)) + conanfile.output.info("Saving conandata.yml: {}".format(info)) new_conandata_yml = yaml.safe_dump(info, default_flow_style=False) - output.info("New conandata.yml contents: {}".format(new_conandata_yml)) + conanfile.output.info("New conandata.yml contents: {}".format(new_conandata_yml)) save(conanfile, conandata_path, new_conandata_yml)