|
1 | 1 | load("//:build/python_metadata.bzl", "BUNDLE_VERSION_INFO", "PYODIDE_VERSIONS", "PYTHON_LOCKFILES") |
2 | | -http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
3 | | -http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") |
| 2 | +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") |
4 | 3 |
|
5 | 4 | def _pyodide_core(*, version, sha256, **_kwds): |
6 | 5 | # Use @workerd prefix on build_file so we can use this from edgeworker too |
@@ -74,16 +73,19 @@ def _snapshot_http_files( |
74 | 73 | _snapshot_http_file(name, "test-snapshot/", numpy_snapshot, numpy_snapshot_integrity, None) |
75 | 74 | _snapshot_http_file(name, "test-snapshot/", fastapi_snapshot, fastapi_snapshot_integrity, None) |
76 | 75 |
|
| 76 | +def _impl(mctx): |
| 77 | + for info in PYODIDE_VERSIONS: |
| 78 | + _pyodide_core(**info) |
77 | 79 |
|
78 | | -for info in PYODIDE_VERSIONS: |
79 | | - _pyodide_core(**info) |
| 80 | + for info in BUNDLE_VERSION_INFO.values(): |
| 81 | + for pkg in info["vendored_packages_for_tests"].values(): |
| 82 | + _py_vendor_test_deps(version = info["name"], **pkg) |
80 | 83 |
|
81 | | -for info in BUNDLE_VERSION_INFO.values(): |
82 | | - for pkg in info["vendored_packages_for_tests"].values(): |
83 | | - _py_vendor_test_deps(version = info["name"], **pkg) |
| 84 | + for info in PYTHON_LOCKFILES: |
| 85 | + _pyodide_packages(**info) |
| 86 | + for ver in BUNDLE_VERSION_INFO.values(): |
| 87 | + if ver["name"] == "development": |
| 88 | + continue # development is a copy of earlier bundle snapshots |
| 89 | + _snapshot_http_files(**ver) |
84 | 90 |
|
85 | | -for info in PYTHON_LOCKFILES: |
86 | | - _pyodide_packages(**info) |
87 | | - |
88 | | -for ver in BUNDLE_VERSION_INFO.values(): |
89 | | - _snapshot_http_files(**ver) |
| 91 | +dep_pyodide = module_extension(implementation = _impl) |
0 commit comments