From 929ebf7d702be589e47d4a8bc997e1edb80bcc75 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 10 Nov 2018 10:23:36 -0600 Subject: [PATCH] match top folder name to zip name [drop 'replace("-", "_")'] --- circuitpython_build_tools/scripts/build_bundles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circuitpython_build_tools/scripts/build_bundles.py b/circuitpython_build_tools/scripts/build_bundles.py index 7cffbb4..ecb18c1 100755 --- a/circuitpython_build_tools/scripts/build_bundles.py +++ b/circuitpython_build_tools/scripts/build_bundles.py @@ -109,9 +109,9 @@ def build_bundle(libs, bundle_version, output_filename, bundle.comment = json.dumps(build_metadata).encode("utf-8") if multiple_libs: readme_zip_dir = build_dir.replace(".zip", "") - total_size += add_file(bundle, "README.txt", os.path.join(readme_zip_dir.replace("-", "_"), "README.txt")) + total_size += add_file(bundle, "README.txt", os.path.join(readme_zip_dir, "README.txt")) for root, dirs, files in os.walk(build_dir): - ziproot = root[len(build_dir + "/"):].replace("-", "_") + ziproot = root[len(build_dir + "/"):] for filename in files: total_size += add_file(bundle, os.path.join(root, filename), os.path.join(ziproot, filename.replace("-", "_")))