Skip to content

Commit c70db15

Browse files
Add pyodide-build repository as a submodule (#140)
1 parent 0eebdc3 commit c70db15

File tree

8 files changed

+35
-9
lines changed

8 files changed

+35
-9
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
- uses: actions/checkout@v4
3737
with:
3838
fetch-depth: 0
39+
submodules: recursive
40+
persist-credentials: false
3941

4042
- name: Install Emscripten ccache
4143
run: |
@@ -244,6 +246,10 @@ jobs:
244246

245247
steps:
246248
- uses: actions/checkout@v4
249+
with:
250+
fetch-depth: 0
251+
submodules: recursive
252+
persist-credentials: false
247253

248254
- name: Cache conda
249255
uses: actions/cache@v4
@@ -316,6 +322,8 @@ jobs:
316322
- uses: actions/checkout@v4
317323
with:
318324
fetch-depth: 0
325+
submodules: recursive
326+
persist-credentials: false
319327

320328
- name: Setup Mambaforge
321329
uses: conda-incubator/setup-miniconda@v3

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "pyodide-build"]
2+
path = pyodide-build
3+
url = https://github.com/pyodide/pyodide-build

.gitpod.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
additionalRepositories:
22
- url: https://github.com/emscripten-core/emsdk
3+
- url: https://github.com/pyodide/pyodide-build
4+
checkoutLocation: pyodide-build
35
tasks:
6+
- name: Sync submodule(s)
7+
init: git submodule update --init --recursive
8+
command: echo "Submodules initialized"
49
- name: Setup
510
init: |
611
pyenv global system
712
conda env create -f environment.yml
813
conda activate pyodide-env
914
10-
pip install git+https://github.com/pyodide/pyodide-build.git
15+
pip install ./pyodide-build/
1116
pyodide xbuildenv install
1217
1318
EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@ Collections of package recipes for Pyodide
44

55
## Adding a new package
66

7-
> Note: Use Python 3.12 or upper to run the following commands.
7+
> Note: Use Python 3.13 or upper to run the following commands.
88
99
To add a new package, create a package recipe in the `packages` directory.
10-
You can start by creating a boilerplate recipe with the following command:
10+
11+
It is required to clone the repository with the `--recurse-submodules` option to ensure
12+
that all submodules are initialized. If hyou have already cloned the repository without
13+
this option, you can run the following command to initialize the submodules:
14+
15+
```bash
16+
$ git submodule update --init --recursive
17+
```
18+
19+
You can then start by creating a boilerplate recipe with the following command:
1120

1221
```bash
13-
$ pip install pyodide-build
22+
$ pip install ./pyodide-build
1423
$ pyodide skeleton pypi <package-name>
1524
```
1625

docs/MAINTAINERS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ by updating the `Makefile.envs` file in the pyodide/pyodide repository.
3030
To build and test packages locally, you need to prepare the necessary tools and dependencies.
3131

3232
- compatible Python version
33-
- pyodide-build
33+
- pyodide-build, which is provided by the `pyodide-build` Git submodule in the repository root
3434
- emscripten
3535
- selenium (for testing)
3636

@@ -71,9 +71,9 @@ The `pyodide-recipes` repository is used to build packages for both stable and n
7171
We use different branches for those versions:
7272

7373
- `main`: the default branch, used for nightly versions of Pyodide
74-
- It uses nightly xbuildenv and nightly pyodide-build to build packages.
74+
- It uses nightly xbuildenv and the pyodide-build submodule to build packages.
7575
- `<version>`: a branch for stable versions of Pyodide
76-
- It uses stable xbuildenv and nightly (or stable if there is any breaking change) pyodide-build to build packages.
76+
- It uses stable xbuildenv and pyodide-build submodule (or a stable version, if there are any breaking changes) to build packages.
7777

7878
Let's say we have a stable Pyodide version `0.27.0`, and we are developing a new version `0.28.0`.
7979

pyodide-build

Submodule pyodide-build added at ee11882

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ pytest-httpserver
66
pytest-benchmark
77
auditwheel-emscripten
88
pytest-asyncio
9-
pyodide-build
9+
./pyodide-build/
1010
zstandard
1111
brotli

tools/prepare_pyodide_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

3-
python -m pip install "git+https://github.com/pyodide/pyodide-build"
3+
python -m pip install ./pyodide-build/
44
pyodide xbuildenv install

0 commit comments

Comments
 (0)