From 95f5b693afdf9595757a108009e4c21d44e534f5 Mon Sep 17 00:00:00 2001 From: Mike Foster Date: Wed, 8 May 2024 09:00:11 +0000 Subject: [PATCH] use pyproject.toml to configure cibuildwheel --- .github/workflows/deploy-python.yml | 7 ------- pyproject.toml | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-python.yml b/.github/workflows/deploy-python.yml index 0f1ee44..39c351c 100644 --- a/.github/workflows/deploy-python.yml +++ b/.github/workflows/deploy-python.yml @@ -33,13 +33,6 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.17.0 - env: - # CIBW_CONFIG_SETTINGS: "--build-option=--py-limited-api=cp38" # speeds up process at cost of less specific wheels - CIBW_BEFORE_ALL_LINUX: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal" - CIBW_BEFORE_ALL_MACOS: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal" - CIBW_BEFORE_ALL: "rustup target add all" - CIBW_ENVIRONMENT_LINUX: PATH="$HOME/.cargo/bin:$PATH" # other OS directly update environment from rustup.sh - CIBW_SKIP: "*-musllinux_i686" # No musllinux-i686 rust compiler available. # with: # package-dir: . # output-dir: wheelhouse diff --git a/pyproject.toml b/pyproject.toml index 61eef6a..3428a02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,13 @@ path = "fizzbuzzo3/Cargo.toml" # Default value, can be omitted binding = "PyO3" # Default value, can be omitted features = ["pyo3/extension-module"] +[tool.cibuildwheel] +skip = "*-musllinux_i686" # No musllinux-i686 rust compiler available. +linux.before-all = "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal" +linux.environment = { PATH="$HOME/.cargo/bin:$PATH" } +macos.before-all = "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal" +windows.before-all = "rustup target add aarch64-pc-windows-msvc i586-pc-windows-msvc i686-pc-windows-msvc x86_64-pc-windows-msvc" + [project.optional-dependencies] dev = [ "black",