File tree Expand file tree Collapse file tree 4 files changed +81
-0
lines changed
Expand file tree Collapse file tree 4 files changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Python Workers Vendoring CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ vendoring :
13+ strategy :
14+ matrix :
15+ os : [ubuntu-latest, macos-latest, windows-latest]
16+ runs-on : ${{ matrix.os }}
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python
23+ uses : actions/setup-python@v4
24+ with :
25+ python-version : ' 3.12'
26+
27+ - name : Install Node.js
28+ uses : actions/setup-node@v4
29+ with :
30+ node-version : 22
31+
32+ - name : Install Wrangler
33+ run : npm install -g wrangler
34+
35+ - name : Run vendoring script (Linux/macOS)
36+ if : runner.os != 'Windows'
37+ run : ./.github/workflows/vendoring/unix.sh
38+ shell : bash
39+
40+ - name : Run vendoring script (Windows)
41+ if : runner.os == 'Windows'
42+ continue-on-error : true
43+ run : .github\workflows\vendoring\windows.bat
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ cd 06-vendoring
4+ python3.12 -m venv .venv
5+ source .venv/bin/activate
6+ .venv/bin/pip install pyodide-build
7+ .venv/bin/pyodide venv .venv-pyodide
8+ .venv-pyodide/bin/pip install -t src/vendor -r vendor.txt
9+
10+ if [ -z " $( ls -A src/vendor) " ]; then
11+ echo " Vendoring failed: No files in src/vendor"
12+ exit 1
13+ fi
14+
15+ wrangler deploy --dry-run
16+
17+ echo " Vendoring succeeded, listing files in src/vendor..."
18+ command -v tree & > /dev/null && tree src/vendor || find src/vendor
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ cd 06-vendoring
4+ python -m venv .venv
5+ call .venv\Scripts\activate
6+ .venv\Scripts\pip install pyodide-build
7+ .venv\Scripts\pyodide venv .venv-pyodide
8+ .venv-pyodide\Scripts\pip install -t src/vendor -r vendor.txt
9+
10+ if not exist src\vendor\* (
11+ echo Vendoring failed: No files in src/vendor
12+ exit /b 1
13+ )
14+
15+ wrangler deploy --dry-run
16+
17+ echo Vendoring succeeded, listing files in src/vendor...
18+ tree /f /a src\vendor
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Vendored packages are added to your source files and need to be installed in a s
1212
1313### Vendoring Packages
1414
15+ [ // ] : # ( NOTE: when updating the instructions below, be sure to also update the vendoring.yml CI workflow )
16+
1517First, install Python3.12 and pip for Python 3.12.
1618
1719* Currently, other versions of Python will not work - use 3.12!*
You can’t perform that action at this time.
0 commit comments