From 8392ed2a94786093e5d79e9c796fd4b3c1ad16a2 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Mon, 2 Oct 2023 21:12:33 +0100 Subject: [PATCH] bump "latest" CI jobs to 3.12 --- .github/workflows/ci.yml | 8 ++++---- .gitignore | 1 + .python-version | 2 +- emscripten/.gitignore | 1 + emscripten/Makefile | 13 +++++++------ emscripten/pybuilddir.txt | 1 - noxfile.py | 2 ++ pyo3-runtime/pyproject.toml | 1 + 8 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 emscripten/.gitignore delete mode 100644 emscripten/pybuilddir.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc87bca5..d4f71af1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: matrix: extra-features: ["multiple-pymethods"] rust: [stable] - python-version: ["3.11"] + python-version: ["3.12"] platform: [ { @@ -221,7 +221,7 @@ jobs: include: # Test minimal supported Rust version - rust: 1.56.0 - python-version: "3.11" + python-version: "3.12" platform: { os: "ubuntu-latest", @@ -233,7 +233,7 @@ jobs: # Test the `nightly` feature - rust: nightly - python-version: "3.11" + python-version: "3.12" platform: { os: "ubuntu-latest", @@ -244,7 +244,7 @@ jobs: # Test 32-bit Windows only with the latest Python version - rust: stable - python-version: "3.11" + python-version: "3.12" platform: { os: "windows-latest", diff --git a/.gitignore b/.gitignore index f67547aa..4240d326 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ valgrind-python.supp *.pyd lcov.info netlify_build/ +.nox/ diff --git a/.python-version b/.python-version index 2c073331..e4fba218 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11 +3.12 diff --git a/emscripten/.gitignore b/emscripten/.gitignore new file mode 100644 index 00000000..a8ee9284 --- /dev/null +++ b/emscripten/.gitignore @@ -0,0 +1 @@ +pybuilddir.txt diff --git a/emscripten/Makefile b/emscripten/Makefile index af224854..5420603e 100644 --- a/emscripten/Makefile +++ b/emscripten/Makefile @@ -2,9 +2,10 @@ CURDIR=$(abspath .) # These three are passed in from nox. BUILDROOT ?= $(CURDIR)/builddir -PYMAJORMINORMICRO ?= 3.11.0 +PYMAJORMINORMICRO ?= 3.12.0 +PYTHON ?= python3.12 -EMSCRIPTEN_VERSION=3.1.13 +EMSCRIPTEN_VERSION=3.1.46 export EMSDKDIR = $(BUILDROOT)/emsdk @@ -34,7 +35,7 @@ PYTHONLIBDIR=$(BUILDROOT)/install/Python-$(PYVERSION)/lib all: $(PYTHONLIBDIR)/libpython$(PYMAJORMINOR).a -$(BUILDROOT)/.exists: +$(BUILDROOT)/.exists: mkdir -p $(BUILDROOT) touch $@ @@ -66,18 +67,18 @@ $(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) $(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) -m sysconfig --generate-posix-vars cp `cat pybuilddir.txt`/$(SYSCONFIGDATA_NAME).py $(PYTHONBUILD)/Lib mkdir -p $(PYTHONLIBDIR) - # Copy libexpat.a, libmpdec.a, and libpython3.11.a + # Copy libexpat.a, libmpdec.a, and libpython3.12.a # In noxfile, we explicitly link libexpat and libmpdec via RUSTFLAGS find $(PYTHONBUILD) -name '*.a' -exec cp {} $(PYTHONLIBDIR) \; # Install Python stdlib diff --git a/emscripten/pybuilddir.txt b/emscripten/pybuilddir.txt deleted file mode 100644 index 59f2a4a7..00000000 --- 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/noxfile.py b/noxfile.py index eb1a4d4d..0fec8f81 100644 --- a/noxfile.py +++ b/noxfile.py @@ -261,6 +261,7 @@ def build_emscripten(session: nox.Session): "make", "-C", str(info.emscripten_dir), + f"PYTHON={sys.executable}", f"BUILDROOT={info.builddir}", f"PYMAJORMINORMICRO={info.pymajorminormicro}", f"PYPRERELEASE={info.pydev}", @@ -288,6 +289,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=-lz", "-C link-arg=-lbz2", "-C link-arg=-sALLOW_MEMORY_GROWTH=1", diff --git a/pyo3-runtime/pyproject.toml b/pyo3-runtime/pyproject.toml index 3aa7dbd1..b02c64dd 100644 --- a/pyo3-runtime/pyproject.toml +++ b/pyo3-runtime/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ]