Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ jobs:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
# TODO bump emscripten builds to test on 3.13
python-version: 3.11
python-version: 3.13
id: setup-python
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -463,7 +462,7 @@ jobs:
components: rust-src
- uses: actions/setup-node@v5
with:
node-version: 18
node-version: 22
- run: python -m pip install --upgrade pip && pip install nox[uv]
- uses: actions/cache/restore@v4
id: cache
Expand Down Expand Up @@ -698,7 +697,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
- run: python -m pip install --upgrade pip && pip install nox[uv]
# TODO test will be fixed in https://github.com/PyO3/pyo3/pull/5450
# - run: nox -s test-introspection
# - run: nox -s test-introspection
env:
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}

Expand Down
6 changes: 3 additions & 3 deletions emscripten/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PYTHONLIBDIR=$(BUILDROOT)/install/Python-$(PYVERSION)/lib

all: $(PYTHONLIBDIR)/libpython$(PYMAJORMINOR).a

$(BUILDROOT)/.exists:
$(BUILDROOT)/.exists:
mkdir -p $(BUILDROOT)
touch $@

Expand Down Expand Up @@ -66,14 +66,14 @@ $(PYTHONBUILD)/Makefile: $(PYTHONBUILD)/.patched $(BUILDROOT)/emsdk
--build=$(shell $(PYTHONBUILD)/config.guess) \
--with-emscripten-target=browser \
--enable-wasm-dynamic-linking \
--with-build-python=python3.11
--with-build-python=python$(PYMAJORMINOR)

$(PYTHONLIBDIR)/libpython$(PYMAJORMINOR).a : $(PYTHONBUILD)/Makefile
cd $(PYTHONBUILD) && \
emmake make -j3 libpython$(PYMAJORMINOR).a

# Generate sysconfigdata
_PYTHON_SYSCONFIGDATA_NAME=$(SYSCONFIGDATA_NAME) _PYTHON_PROJECT_BASE=$(PYTHONBUILD) python3.11 -m sysconfig --generate-posix-vars
_PYTHON_SYSCONFIGDATA_NAME=$(SYSCONFIGDATA_NAME) _PYTHON_PROJECT_BASE=$(PYTHONBUILD) python$(PYMAJORMINOR) -m sysconfig --generate-posix-vars
cp `cat pybuilddir.txt`/$(SYSCONFIGDATA_NAME).py $(PYTHONBUILD)/Lib

mkdir -p $(PYTHONLIBDIR)
Expand Down
1 change: 0 additions & 1 deletion emscripten/pybuilddir.txt

This file was deleted.

5 changes: 4 additions & 1 deletion emscripten/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@

p = pathlib.Path(sys.argv[1])

sys.exit(subprocess.call(["node", p.name], cwd=p.parent))
command = ["node", p.name, *sys.argv[2:]]
print("Running:", " ".join(command))

sys.exit(subprocess.call(command, cwd=p.parent))
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import re
from shlex import quote
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -422,6 +423,7 @@ def test_emscripten(session: nox.Session):
f"-C link-arg=-lpython{info.pymajorminor}",
"-C link-arg=-lexpat",
"-C link-arg=-lmpdec",
"-C link-arg=-lHacl_Hash_SHA2",
"-C link-arg=-lsqlite3",
"-C link-arg=-lz",
"-C link-arg=-lbz2",
Expand All @@ -436,7 +438,7 @@ def test_emscripten(session: nox.Session):
session,
"bash",
"-c",
f"source {info.builddir / 'emsdk/emsdk_env.sh'} && cargo test",
f"source {info.builddir / 'emsdk/emsdk_env.sh'} && cargo test {' '.join(quote(arg) for arg in session.posargs)}",
)


Expand Down
Loading