From 45faae855b76ef6039bef81b0582dbfc877ee796 Mon Sep 17 00:00:00 2001 From: David Irvine Date: Thu, 28 Nov 2024 20:16:46 +0000 Subject: [PATCH] fix(build): enforce Python 3.8+ and set manylinux2014 compatibility This commit updates build configurations to ensure proper Python version compatibility and Linux wheel building: - Add Python version constraint (>=3.8) to pyo3 dependency - Set manylinux2014 as explicit target for Linux builds - Add --compatibility manylinux2014 flag to maturin build args These changes prevent building for unsupported Python versions while ensuring proper wheel compatibility across Linux distributions. --- .github/workflows/python-publish.yml | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index aa608ef2d..b4138349f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -90,8 +90,8 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - manylinux: auto - args: --release --out dist + manylinux: "2014" + args: --release --out dist --compatibility manylinux2014 sccache: 'true' - name: Upload wheels uses: actions/upload-artifact@v3 diff --git a/Cargo.toml b/Cargo.toml index 61268fcfb..e38cdd39c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ num_cpus = "1.13.0" itertools = "~0.10.0" tempfile = "3.6.0" xor_name = "5.0.0" -pyo3 = { version = "0.20.0", optional = true, features = ["extension-module"] } +pyo3 = { version = "0.20.0", optional = true, features = ["extension-module"], python-version = ">=3.8" } [dependencies.brotli] version = "~3.3.0"