@@ -45,7 +45,7 @@ def gen_bzl_config(tag: str, dist: Path) -> None:
45
45
packages = [package ["name" ] for package in lock ["packages" ].values ()]
46
46
imports_to_test = import_tests .gen (packages )
47
47
48
- Path ("pyodide_bucket.bzl" ).write_text (
48
+ Path (dist / "pyodide_bucket.bzl" ).write_text (
49
49
dedent (
50
50
f"""
51
51
# Do not edit this file by hand. See docs/pyodide.md for info on how to generate it.
@@ -57,15 +57,22 @@ def gen_bzl_config(tag: str, dist: Path) -> None:
57
57
PYODIDE_LOCK_SHA256 = "{ lock_hash } "
58
58
PYODIDE_PACKAGES_TAR_ZIP_SHA256 = "{ zip_hash } "
59
59
PYODIDE_ALL_WHEELS_ZIP_SHA256 = "{ all_wheels_hash } "
60
+ """
61
+ ).strip ()
62
+ )
60
63
61
- # IMPORTANT: when updating this file in git, check the diff to make sure none of the imports below are being removed unexpectedly
64
+ packages_lock_name = "packages_" + tag .replace ("." , "_" )
65
+ packages_lock_name_upper = packages_lock_name .upper ()
66
+ packages_lock_json = json .dumps (imports_to_test , indent = 3 , sort_keys = True )
67
+ Path (dist / (packages_lock_name + ".bzl" )).write_text (
68
+ dedent (
69
+ f"""
70
+ # This file is automatically generated by the Pyodide build script repo
71
+ # (https://github.com/cloudflare/pyodide-build-scripts) and should not be manually modified.
62
72
63
- PYODIDE_IMPORTS_TO_TEST =
73
+ { packages_lock_name_upper } = { packages_lock_json }
64
74
"""
65
75
).strip ()
66
- + " "
67
- + json .dumps (imports_to_test , indent = 3 , sort_keys = True )
68
- + "\n "
69
76
)
70
77
71
78
0 commit comments