From d714f1b6c5fd8c4b929c3e587f9d4c1026efb4a4 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Mon, 3 Mar 2025 14:23:33 -0800 Subject: [PATCH] update path Signed-off-by: Nikolaj Bjorner --- scripts/mk_nuget_task.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/mk_nuget_task.py b/scripts/mk_nuget_task.py index e35a49d42..cfac605c7 100644 --- a/scripts/mk_nuget_task.py +++ b/scripts/mk_nuget_task.py @@ -77,29 +77,24 @@ def unpack(packages, symbols, arch): replace(f"{tmp}/{package_dir}/bin/libz3.pdb", f"out/runtimes/{dst}/native/libz3.pdb") files = ["Microsoft.Z3.dll", "Microsoft.Z3.pdb", "Microsoft.Z3.xml"] for b in files: - tmp_package_dir = os.path.join(tmp, package_dir) - tmp_bin_dir = os.path.join(tmp_package_dir, "bin") - file1 = os.path.join(tmp_bin_dir, b) - file2 = os.path.join(tmp_bin_dir, "netstandard2.0", b) + file1 = f"{package_dir}/bin/{b}" + file2 = f"{package_dir}/bin/netstandard2.0/{b}" found_path = False # check that file1 exists in zip_ref: try: zip_ref.extract(file1, f"{tmp}") - replace(f"{tmp}/{package_dir}/bin/{b}", f"out/lib/netstandard2.0/{b}") + replace(f"{tmp}/{file1}", f"out/lib/netstandard2.0/{b}") found_path = True except: pass try: zip_ref.extract(file2, f"{tmp}") - replace(f"{tmp}/{package_dir}/bin/netstandard2.0/{b}", f"out/lib/netstandard2.0/{b}") + replace(f"{tmp}/{file2}", f"out/lib/netstandard2.0/{b}") found_path = True except: pass if not found_path: print(f"Could not find file path {file1} nor {file2}") - print(tmp, os.listdir(tmp)) - print(tmp_package_dir, os.listdir(tmp_package_dir)) - print(tmp_bin_dir, os.listdir(tmp_bin_dir)) def mk_targets(source_root):