diff --git a/ci/setup_cibuildwheel.sh b/ci/setup_cibuildwheel.sh new file mode 100755 index 0000000..7326d12 --- /dev/null +++ b/ci/setup_cibuildwheel.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# NOTE: ensure to use the correct package manager depending on the manylinux +# image used. + +if which yum; then + yum install -y alsa-lib-devel + exit +fi + +if which apk; then + apk add alsa-lib-dev + exit +fi + +if which apt-get; then + apt-get install -y libasound2-dev + exit +fi + +echo "Cannot install ALSA headers! No package manager detected" +exit 1 diff --git a/pyproject.toml b/pyproject.toml index cad5d6d..a818c6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,15 +56,10 @@ ext-modules = [ ] -[tool.cibuildwheel.linux] -# Use uv and build +[tool.cibuildwheel] +platform = "linux" build-frontend = "build[uv]" - -# NOTE: ensure to use the correct package manager depending on the manylinux -# image used. For AlmaLinux based images, use `yum`, for Debian based images -# use `apt`. `cibuildwheel` v3.1.4 defaults to manylinux_2_28, which is -# based on AlmaLinux 8. -before-all = "yum install -y alsa-lib-devel" +before-all = "ci/setup_cibuildwheel.sh" [dependency-groups]