Skip to content

Commit 2dd674a

Browse files
authored
Include the package tag and lockfile hash in the generated bazel file (#11)
1 parent 32b84fc commit 2dd674a

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

packages/script.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,10 @@ def gen_bzl_config(tag: str, dist: Path) -> None:
4545
packages = [package["name"] for package in lock["packages"].values()]
4646
imports_to_test = import_tests.gen(packages)
4747

48-
Path(dist / "pyodide_bucket.bzl").write_text(
49-
dedent(
50-
f"""
51-
# Do not edit this file by hand. See docs/pyodide.md for info on how to generate it.
52-
# These variables are factored out here because they are being shared by the WORKSPACE files in
53-
# both edgeworker and workerd, as well as src/pyodide/BUILD.bazel
54-
55-
PYODIDE_PACKAGE_BUCKET_URL = "{bucket_url}"
56-
PYODIDE_GITHUB_RELEASE_URL = "{github_url}"
57-
PYODIDE_LOCK_SHA256 = "{lock_hash}"
58-
PYODIDE_PACKAGES_TAR_ZIP_SHA256 = "{zip_hash}"
59-
PYODIDE_ALL_WHEELS_ZIP_SHA256 = "{all_wheels_hash}"
60-
"""
61-
).strip()
62-
)
63-
6448
packages_lock_name = "packages_" + tag.replace(".", "_")
6549
packages_lock_name_upper = packages_lock_name.upper()
50+
info = {"tag": tag, "lockfile_hash": lock_hash}
51+
json_contents = {"info": info, "packages": imports_to_test}
6652
packages_lock_json = indent(json.dumps(imports_to_test, indent=3, sort_keys=True), " "*12).strip()
6753
Path(dist / (packages_lock_name + ".bzl")).write_text(
6854
dedent(

0 commit comments

Comments
 (0)