From 4088b866296f482b47d404a70ae08bc8d440a47d Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Wed, 5 Jun 2024 07:57:25 -0400 Subject: [PATCH 1/4] CIBW: remove non-ABI3 code --- .github/workflows/publish.yml | 12 ++---------- light-curve/pyproject.toml | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ab24ab9..01686224 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,7 @@ jobs: # We use the same order as in the table # * For Windows we support amd64 only # * For Linux we support ARM64, PPC64le, and x86_64 - # * For CPython we build ABI3 wheels on cp38 only + # * We build wheels for CPython only, one per platform, compatible with ABI3.8 # * We skip PPC64le MUSL Linux, because there is no Rust toolchain for it # * macos-12 runner is x86_64, macos-14 runner is arm64 include: @@ -91,14 +91,6 @@ jobs: CIBW_ARCHS=$(echo ${{ matrix.cibw_build }} | cut -d'_' -f2,3) echo "CIBW_ARCHS=${CIBW_ARCHS}" >> $GITHUB_ENV - - name: Set ABI3 build on Windows - if: ${{ contains(matrix.cibw_build, 'cp3') && matrix.os == 'windows-2019' }} - run: echo "LICU_ADDITIONAL_FEATURES=abi3" >> $env:GITHUB_ENV - - - name: Set ABI3 build on Linux of macOS - if: ${{ contains(matrix.cibw_build, 'cp3') && matrix.os != 'windows-2019' }} - run: echo "LICU_ADDITIONAL_FEATURES=abi3" >> $GITHUB_ENV - - name: Build wheels uses: pypa/cibuildwheel@v2.17.0 with: @@ -143,7 +135,7 @@ jobs: name: artifact_sdist publish: - needs: [cibuildwheel, sdist] + needs: [ cibuildwheel, sdist ] name: Publish light-curve runs-on: ubuntu-latest diff --git a/light-curve/pyproject.toml b/light-curve/pyproject.toml index 2f519aa5..4d639f8e 100644 --- a/light-curve/pyproject.toml +++ b/light-curve/pyproject.toml @@ -31,7 +31,7 @@ full = [ test-no-bench = [ "pytest", "markdown-pytest", - "pytest-benchmark", # We need it here because we use benchmark-specific command line options + "pytest-benchmark", # We need it here because we use benchmark-specific command line options "pytest-subtests>=0.10", "iminuit>=2.21,<3", "numpy", @@ -157,7 +157,7 @@ build-frontend = "build" # - Set PATH to include Rust. # - Set maturin build options, including LICU_ADDITIONAL_FEATURES which may be passed through CIBW_ENVIRONMENT_PASS_LINUX -environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,ceres-system,fftw-system,gsl,${LICU_ADDITIONAL_FEATURES}" } +environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,ceres-system,fftw-system,gsl,mimalloc" } # We use our own images which include Rust, GSL and platform-optimised FFTW # Manylinux CPython @@ -183,10 +183,6 @@ musllinux-aarch64-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_ # musllinux-s390x-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_s390x" musllinux-x86_64-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_x86_64" -[tool.cibuildwheel.linux] -# We use this variable to set additional Cargo features, such as 'abi3' -environment-pass = ["LICU_ADDITIONAL_FEATURES"] - [tool.cibuildwheel.macos] before-all = [ # Install Rust @@ -205,13 +201,13 @@ before-all = [ before-build = ["pip install delvewheel"] repair-wheel-command = "delvewheel repair --add-path=%USERPROFILE%\\Downloads\\fftw-dll64 -w {dest_dir} {wheel}" # We do not support Ceres and GSL on Windows -environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,fftw-source,${LICU_ADDITIONAL_FEATURES}" } +environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,fftw-source,mimalloc" } # Build with Intel MKL on Linux x86_64 [[tool.cibuildwheel.overrides]] select = "*linux_x86_64" # We'd like to use MKL for x86_64 -environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,ceres-system,fftw-mkl,gsl,${LICU_ADDITIONAL_FEATURES}" } +environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,ceres-system,fftw-mkl,gsl,mimalloc" } # Test # We skip benchmark tests, because it requires feets and its transitive @@ -221,3 +217,9 @@ environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--lo select = "cp*-manylinux_x86_64 cp*-manylinux_aarch64 cp*-macosx*" test-command = "pytest {package}/README.md {package}/light_curve/ {package}/tests/ --ignore {package}/tests/test_w_bench.py" test-extras = ["test-no-bench"] + +# Since we build ABI3 wheels, we need to check for ABI3 compatibility +[[tool.cibuildwheel.overrides]] +select = "*" +inherit.repair-wheel-command = "append" +repair-wheel-command = "pipx run abi3audit --strict --report {wheel}" From 49f2f8fdc5890dc9031b128e5b70aa8e7f524a42 Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Wed, 5 Jun 2024 08:19:34 -0400 Subject: [PATCH 2/4] Fix pipx for windows --- light-curve/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/light-curve/pyproject.toml b/light-curve/pyproject.toml index 4d639f8e..6ffe3c4f 100644 --- a/light-curve/pyproject.toml +++ b/light-curve/pyproject.toml @@ -222,4 +222,4 @@ test-extras = ["test-no-bench"] [[tool.cibuildwheel.overrides]] select = "*" inherit.repair-wheel-command = "append" -repair-wheel-command = "pipx run abi3audit --strict --report {wheel}" +repair-wheel-command = "pipx --python=python3.12 run abi3audit --strict --report {wheel}" From 238da8a34856103ca95494119bd009a8c370bfc5 Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Wed, 5 Jun 2024 08:24:20 -0400 Subject: [PATCH 3/4] fix --- light-curve/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/light-curve/pyproject.toml b/light-curve/pyproject.toml index 6ffe3c4f..8bed879f 100644 --- a/light-curve/pyproject.toml +++ b/light-curve/pyproject.toml @@ -222,4 +222,4 @@ test-extras = ["test-no-bench"] [[tool.cibuildwheel.overrides]] select = "*" inherit.repair-wheel-command = "append" -repair-wheel-command = "pipx --python=python3.12 run abi3audit --strict --report {wheel}" +repair-wheel-command = "pipx run --python=python3.12 abi3audit --strict --report {wheel}" From 60753d9cc647c472860f5a30326a87bb86bc2aa7 Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Wed, 5 Jun 2024 08:34:03 -0400 Subject: [PATCH 4/4] Do not use abi3audit, f windows --- light-curve/pyproject.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/light-curve/pyproject.toml b/light-curve/pyproject.toml index 8bed879f..f02572b6 100644 --- a/light-curve/pyproject.toml +++ b/light-curve/pyproject.toml @@ -217,9 +217,3 @@ environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--lo select = "cp*-manylinux_x86_64 cp*-manylinux_aarch64 cp*-macosx*" test-command = "pytest {package}/README.md {package}/light_curve/ {package}/tests/ --ignore {package}/tests/test_w_bench.py" test-extras = ["test-no-bench"] - -# Since we build ABI3 wheels, we need to check for ABI3 compatibility -[[tool.cibuildwheel.overrides]] -select = "*" -inherit.repair-wheel-command = "append" -repair-wheel-command = "pipx run --python=python3.12 abi3audit --strict --report {wheel}"