Skip to content

Commit e2882e2

Browse files
committed
include pyodide lock contents within bzl config
1 parent 1243892 commit e2882e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/script.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def gen_bzl_config(tag, dist):
2121
bucket_url = "https://pub-45d734c4145d4285b343833ee450ef38.r2.dev/" + tag + "/"
2222
github_url = "https://github.com/cloudflare/pyodide-build-scripts/releases/download/" + tag + "/"
2323
lock_bytes = (dist / "pyodide-lock.json").read_bytes()
24+
lock_contents = (dist / "pyodide-lock.json").read_text()
2425
lock_hash = hashlib.sha256(lock_bytes).hexdigest()
2526
zip_bytes = (dist / "pyodide_packages.tar.zip").read_bytes()
2627
zip_hash = hashlib.sha256(zip_bytes).hexdigest()
@@ -32,6 +33,7 @@ def gen_bzl_config(tag, dist):
3233
f.write("PYODIDE_PACKAGE_BUCKET_URL = \"" + bucket_url + "\"\n")
3334
f.write("PYODIDE_GITHUB_RELEASE_URL = \"" + github_url + "\"\n")
3435
f.write("PYODIDE_LOCK_SHA256 = \"" + lock_hash + "\"\n")
36+
f.write("PYODIDE_LOCK_CONTENTS = \"\"\"" + lock_contents + "\"\"\"\n")
3537
f.write("PYODIDE_PACKAGES_TAR_ZIP_SHA256 = \"" + zip_hash + "\"\n")
3638

3739
# creates a package bundle .tar.zip file to be bundled in with edgeworker

0 commit comments

Comments
 (0)