Skip to content

Commit 143900e

Browse files
authored
fix: commit wheels to repo for environments without pip (#567)
Reverts the wheel removal from #549. Wheels must be committed to the repo because: 1. The webpack-bundled pyodide worker cannot use loadPackage from CDN (Electron worker threads don't support pyodide's package installation) 2. micropip.install from PyPI cannot install cfn-lint because pydantic-core has no wasm32 wheel for the version aws-sam-translator requires (>=2.12.5 needs pydantic-core>=2.41.5, but only 2.27.2 exists for wasm32) 3. Build environments like the canary don't have pip to run download-wheels The maintenance workflow keeps these updated weekly. Wheels are installed with deps=False to bypass the pydantic version constraint (2.10.6 is API-compatible with what sam-translator needs).
1 parent daeda4b commit 143900e

28 files changed

Lines changed: 2 additions & 19 deletions

.github/workflows/maintenance.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Automated Maintenance
22

33
on:
44
schedule:
5-
- cron: '0 10 * * 1'
5+
- cron: '0 10 * * *'
66
workflow_dispatch:
77

88
permissions:
@@ -34,23 +34,7 @@ jobs:
3434
cd /tmp/git-secrets
3535
sudo make install
3636
37-
- name: Update requirements-pyodide.txt
38-
run: |
39-
PACKAGES=$(grep -v '^#' requirements-pyodide.txt | grep -v '^$' | sed 's/==.*//' | tr '\n' ' ')
40-
41-
rm -rf /tmp/wheels-update && mkdir /tmp/wheels-update
42-
python3 -m pip download --dest /tmp/wheels-update \
43-
--only-binary=:all: --python-version 313 --platform any \
44-
--implementation py --abi none --no-deps $PACKAGES
45-
46-
# Regenerate lock file from downloaded wheel filenames
47-
head -8 requirements-pyodide.txt > /tmp/requirements-header.txt
48-
ls /tmp/wheels-update/*.whl | xargs -I{} basename {} | sort | \
49-
sed 's/^\(.*\)-\(.*\)-py[23].*/\1==\2/' | sed 's/_/-/g' \
50-
> /tmp/requirements-pins.txt
51-
cat /tmp/requirements-header.txt /tmp/requirements-pins.txt > requirements-pyodide.txt
52-
53-
- name: Verify wheels download
37+
- name: Update wheels
5438
run: npm run download-wheels
5539

5640
- name: Create Pull Request

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ tools/*
1616
/jscpd
1717
/tmp
1818
/.idea/
19-
/assets/wheels/
13.3 KB
Binary file not shown.
66 KB
Binary file not shown.
422 KB
Binary file not shown.
137 KB
Binary file not shown.
14.3 MB
Binary file not shown.
5.77 MB
Binary file not shown.
19.9 KB
Binary file not shown.
12.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)