From b0865b3368c5d846342f761c503b73089a37912f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 6 Feb 2025 18:05:16 +0000 Subject: [PATCH 1/4] Add Linux aarch64 wheels --- .github/workflows/buildwheel.yml | 6 +++--- pyproject.toml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index bc5a2777..80b6144b 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-13, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-13, macos-14] steps: - uses: actions/checkout@v4 @@ -83,10 +83,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-13, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-13, macos-14] # This list to be kept in sync with cibuildwheel config # and python-requires in pyproject.toml. - python-version: ['3.10', '3.11', '3.12', '3.13-dev', 'pypy3.10'] + python-version: ['3.11', '3.12', '3.13', 'pypy3.10'] steps: - uses: actions/setup-python@v5 diff --git a/pyproject.toml b/pyproject.toml index 88b501ab..440c218c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "python-flint" description = "Bindings for FLINT" version = "0.7.0a5" # This needs to be in sync with README, cibuildwheel and CI config. -requires-python = ">= 3.10" +requires-python = ">= 3.11" authors = [ {name = "Fredrik Johansson", email = "fredrik.johansson@gmail.com"}, ] @@ -81,7 +81,7 @@ package = "flint" [tool.cibuildwheel] # requires-python needs to keep in sync with this and also the list of Python # versions the wheels are tested against in CI. -build = "cp310-* cp311-* cp312-* cp313-* pp310-*" +build = "cp311-* cp312-* cp313-* pp310-*" skip = "*-win32 *-manylinux_i686 *-musllinux_*" # This is needed for free-threaded wheels: @@ -89,6 +89,7 @@ skip = "*-win32 *-manylinux_i686 *-musllinux_*" # free-threaded-support = true manylinux-x86_64-image = "manylinux2014" +manylinux-aarch64-image = "manylinux2014" manylinux-i686-image = "manylinux2014" test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" From 8e438a71df06b2e38b2feb8f4f71319eaf3a65cb Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 6 Feb 2025 18:13:32 +0000 Subject: [PATCH 2/4] Fix cibw build script for aarch64 --- bin/cibw_before_all_linux_aarch64.sh | 7 +++++++ ...before_all_linux.sh => cibw_before_all_linux_x86_64.sh} | 0 pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 bin/cibw_before_all_linux_aarch64.sh rename bin/{cibw_before_all_linux.sh => cibw_before_all_linux_x86_64.sh} (100%) diff --git a/bin/cibw_before_all_linux_aarch64.sh b/bin/cibw_before_all_linux_aarch64.sh new file mode 100755 index 00000000..46fe6862 --- /dev/null +++ b/bin/cibw_before_all_linux_aarch64.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +yum install -y xz +bin/build_dependencies_unix.sh\ + --gmp gmp\ + --host aarch64-pc-linux-gnu\ + --use-gmp-github-mirror diff --git a/bin/cibw_before_all_linux.sh b/bin/cibw_before_all_linux_x86_64.sh similarity index 100% rename from bin/cibw_before_all_linux.sh rename to bin/cibw_before_all_linux_x86_64.sh diff --git a/pyproject.toml b/pyproject.toml index 440c218c..e91cd76b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,7 +107,7 @@ PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig" # PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig:$PKG_CONFIG_PATH" [tool.cibuildwheel.linux] -before-all = "bin/cibw_before_all_linux.sh" +before-all = "bin/cibw_before_all_linux_$(uname -m).sh" [tool.cibuildwheel.macos] before-all = "bin/cibw_before_all_macosx_$(uname -m).sh" From c9888283673bd59504b3712f2acab71fb35d09a6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 7 Feb 2025 12:06:45 +0000 Subject: [PATCH 3/4] Bump PyPy version to 3.11 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e91cd76b..a81866a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ package = "flint" [tool.cibuildwheel] # requires-python needs to keep in sync with this and also the list of Python # versions the wheels are tested against in CI. -build = "cp311-* cp312-* cp313-* pp310-*" +build = "cp311-* cp312-* cp313-* pp311-*" skip = "*-win32 *-manylinux_i686 *-musllinux_*" # This is needed for free-threaded wheels: From 4c6b61e542783a64f00b3dfa62ccb12e96376bc7 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 7 Feb 2025 12:24:42 +0000 Subject: [PATCH 4/4] Remove PyPy from wheels and tests PyPy 3.11 is not yet available. --- .github/workflows/buildwheel.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 80b6144b..49ca28d0 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -86,7 +86,7 @@ jobs: os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-13, macos-14] # This list to be kept in sync with cibuildwheel config # and python-requires in pyproject.toml. - python-version: ['3.11', '3.12', '3.13', 'pypy3.10'] + python-version: ['3.11', '3.12', '3.13'] # , 'pypy3.10'] steps: - uses: actions/setup-python@v5 diff --git a/pyproject.toml b/pyproject.toml index a81866a8..dc64bf2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ package = "flint" [tool.cibuildwheel] # requires-python needs to keep in sync with this and also the list of Python # versions the wheels are tested against in CI. -build = "cp311-* cp312-* cp313-* pp311-*" +build = "cp311-* cp312-* cp313-*" # pp311-*" skip = "*-win32 *-manylinux_i686 *-musllinux_*" # This is needed for free-threaded wheels: