diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5261de2472..f34a16540ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 }} diff --git a/emscripten/Makefile b/emscripten/Makefile index 54094382c1b..d77e24f5845 100644 --- a/emscripten/Makefile +++ b/emscripten/Makefile @@ -34,7 +34,7 @@ PYTHONLIBDIR=$(BUILDROOT)/install/Python-$(PYVERSION)/lib all: $(PYTHONLIBDIR)/libpython$(PYMAJORMINOR).a -$(BUILDROOT)/.exists: +$(BUILDROOT)/.exists: mkdir -p $(BUILDROOT) touch $@ @@ -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) diff --git a/emscripten/pybuilddir.txt b/emscripten/pybuilddir.txt deleted file mode 100644 index 59f2a4a7546..00000000000 --- a/emscripten/pybuilddir.txt +++ /dev/null @@ -1 +0,0 @@ -build/lib.linux-x86_64-3.11 \ No newline at end of file diff --git a/emscripten/runner.py b/emscripten/runner.py index 95eaa8d4f36..7b8f0ddda17 100755 --- a/emscripten/runner.py +++ b/emscripten/runner.py @@ -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)) diff --git a/noxfile.py b/noxfile.py index 3cf76738135..3da0f5809c0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,6 +2,7 @@ import json import os import re +from shlex import quote import shutil import subprocess import sys @@ -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", @@ -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)}", )