From 1bc9b4a1443006480364f062e2ef4427495f9f11 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 30 Apr 2026 12:35:57 +0100 Subject: [PATCH 1/3] Bump to FLINT 3.5.0 --- bin/build_variables.sh | 2 +- bin/patch-flint-windows-arm64-link-3.5.0.diff | 32 +++++++++++++++++++ bin/pyodide_build_dependencies.sh | 3 +- meson.build | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 bin/patch-flint-windows-arm64-link-3.5.0.diff diff --git a/bin/build_variables.sh b/bin/build_variables.sh index 256f4d84..bb21c9fc 100644 --- a/bin/build_variables.sh +++ b/bin/build_variables.sh @@ -19,4 +19,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from) # These are the actual dependencies used (at least by default): GMPVER=6.3.0 MPFRVER=4.2.2 -FLINTVER=3.4.0 +FLINTVER=3.5.0 diff --git a/bin/patch-flint-windows-arm64-link-3.5.0.diff b/bin/patch-flint-windows-arm64-link-3.5.0.diff new file mode 100644 index 00000000..950757a0 --- /dev/null +++ b/bin/patch-flint-windows-arm64-link-3.5.0.diff @@ -0,0 +1,32 @@ +diff --git a/Makefile.in b/Makefile.in +index 8185fa609..a3822f53b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -424,22 +424,16 @@ endif + + ifneq ($(SHARED), 0) + shared: $(FLINT_DIR)/$(FLINT_LIB_FULL) +-# The following is to avoid reaching the maximum length of command line +-# arguments, mainly present on MinGW. +-define xxx_merged_lobj_rule +-$(BUILD_DIR)/$(1)_merged.lo: $($(1)_LOBJS) | $(BUILD_DIR) +- @$(LD) -r $($(1)_LOBJS) -o $(BUILD_DIR)/$(1)_merged.lo +-endef +-$(foreach dir, $(DIRS), $(eval $(call xxx_merged_lobj_rule,$(dir)))) +-MERGED_LOBJS:=$(foreach dir, $(DIRS),$(BUILD_DIR)/$(dir)_merged.lo) + ifeq ($(WANT_LTO),1) + SHARED_LIB_DEPS:=$(LOBJS) + else +-SHARED_LIB_DEPS:=$(MERGED_LOBJS) ++SHARED_LINK_RSP := $(BUILD_DIR)/libflint-shared.rsp ++SHARED_LIB_DEPS:=$(LOBJS) + endif +-$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS) ++$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS) | $(BUILD_DIR) + @echo "Building $(FLINT_LIB_FULL)" +- $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) $(SHARED_LIB_DEPS) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS) ++ @: $(file >$(SHARED_LINK_RSP))$(foreach obj,$(LOBJS),$(file >>$(SHARED_LINK_RSP),$(obj))) ++ $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) @$(SHARED_LINK_RSP) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS) + @$(RM_F) $(FLINT_LIB) + @$(RM_F) $(FLINT_LIB_MAJOR) + @$(LN_S) $(FLINT_LIB_FULL) $(FLINT_LIB) diff --git a/bin/pyodide_build_dependencies.sh b/bin/pyodide_build_dependencies.sh index d8b776e8..e910e36f 100755 --- a/bin/pyodide_build_dependencies.sh +++ b/bin/pyodide_build_dependencies.sh @@ -111,7 +111,8 @@ fi # Patch needed for FLINT == 3.4.0 # This is https://github.com/flintlib/flint/pull/2594 - patch -N -Z -p1 < "$SCRIPT_DIR/patch-flint-emscripten-profiler.diff" + # Not needed as of FLINT 3.5.0 + # patch -N -Z -p1 < "$SCRIPT_DIR/patch-flint-emscripten-profiler.diff" ./bootstrap.sh diff --git a/meson.build b/meson.build index fbabce65..7a996a2a 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,7 @@ project( # then we can consider not using a speculative upper version cap here. # flint_lower = '>=3.0' -flint_upper = '<3.5' +flint_upper = '<3.6' cython_lower = '>=3.0.11' cython_upper = '<3.3' From 2d93d952817839fc7e09f0b69eb964857ec5d44e Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 30 Apr 2026 13:13:39 +0100 Subject: [PATCH 2/3] Bump FLINT version (update docs) --- README.md | 2 +- bin/pyodide_build_dependencies.sh | 8 ++++---- doc/source/build.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fd9f22ec..5ac486d4 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ Compatible versions: | python-flint | Release date | CPython | FLINT | Cython | |--------------|---------------|-------------|------------|------------------| -| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.4` | `3.1-3.2?` | +| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.5` | `3.1-3.2?` | | `0.8.0` | 29th Aug 2025 | `3.11-3.14` | `3.0-3.3` | `3.1` only | | `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` | | `0.6.0` | 1st Feb 2024 | `3.9-3.12` | `3.0` only | `3.0` only | diff --git a/bin/pyodide_build_dependencies.sh b/bin/pyodide_build_dependencies.sh index e910e36f..bd43bde1 100755 --- a/bin/pyodide_build_dependencies.sh +++ b/bin/pyodide_build_dependencies.sh @@ -109,10 +109,10 @@ else cd flint fi - # Patch needed for FLINT == 3.4.0 - # This is https://github.com/flintlib/flint/pull/2594 - # Not needed as of FLINT 3.5.0 - # patch -N -Z -p1 < "$SCRIPT_DIR/patch-flint-emscripten-profiler.diff" + # FLINT 3.4.0 needs this patch, while newer FLINT releases already have it. + if patch --dry-run -N -Z -p1 < "$SCRIPT_DIR/patch-flint-emscripten-profiler.diff" > /dev/null 2>&1; then + patch -N -Z -p1 < "$SCRIPT_DIR/patch-flint-emscripten-profiler.diff" + fi ./bootstrap.sh diff --git a/doc/source/build.rst b/doc/source/build.rst index 68b1ecca..c2a8ca6b 100644 --- a/doc/source/build.rst +++ b/doc/source/build.rst @@ -87,7 +87,7 @@ Compatible versions: * - 0.9.0 - Not yet - 3.11-3.14 - - 3.0-3.4 + - 3.0-3.5 - 3.1-3.2? * - 0.8.0 - 29th Aug 2025 From 7d1d048f67880405cc04ff9284588f140c9dd4cc Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 30 Apr 2026 13:22:16 +0100 Subject: [PATCH 3/3] Add FLINT 3.4.0 to test matrix --- .github/workflows/buildwheel.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 6bcafc81..3c27866b 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -307,7 +307,13 @@ jobs: fail-fast: false matrix: # Supported Flint versions: - flint-tag: ['v3.0.1', 'v3.1.3-p1', 'v3.2.2', 'v3.3.1'] + flint-tag: [ + 'v3.0.1', + 'v3.1.3-p1', + 'v3.2.2', + 'v3.3.1', + 'v3.4.0', + ] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: