From af1c18a4c5ae8786e0e43bbbdd7d6aadb3ba78fc Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Thu, 21 Dec 2023 04:37:18 -0700 Subject: [PATCH] move cibuildwheel to toml --- .github/workflows/python-package.yml | 6 +++--- pyproject.toml | 30 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d269f82..1e8bf4b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,9 +45,9 @@ jobs: if: startsWith( github.ref, 'refs/tags/') name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} - env: - CIBW_BEFORE_ALL: bash {project}/bin/cibw_before_build.sh {project} - CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *-manylinux_i686 *_ppc64le *_s390x + # env: + # CIBW_BEFORE_ALL: bash {project}/bin/cibw_before_build.sh {project} + # CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *-manylinux_i686 *_ppc64le *_s390x strategy: matrix: os: [ubuntu-22.04, windows-2022, macos-11] diff --git a/pyproject.toml b/pyproject.toml index aeead02..5ace8bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,36 @@ homepage = "http://research.tetonedge.net" repository = "https://github.com/jdtuck/fdasrsf_python" documentation = "https://fdasrsf-python.readthedocs.io/en/latest/" +[tool.cibuildwheel] +# Note: the below skip command doesn't do much currently, the platforms to +# build wheels for in CI are controlled in `.github/workflows/wheels.yml` and +# `tools/ci/cirrus_wheels.yml`. +skip = "cp36-* cp37-* cp38-* cp312-* pp* *-manylinux_i686 *_ppc64le *_s390x" +build-verbosity = "3" +before-build = "bash {project}/bin/cibw_before_build.sh {project}" + +[tool.cibuildwheel.linux] +manylinux-x86_64-image = "manylinux2014" +manylinux-aarch64-image = "manylinux2014" +environment = {RUNNER_OS="Linux"} + +[tool.cibuildwheel.macos] +# For universal2 wheels, we will need to fuse them manually +# instead of going through cibuildwheel +# This is because cibuildwheel tries to make a fat wheel +# https://github.com/multi-build/multibuild/blame/devel/README.rst#L541-L565 +# for more info +archs = "x86_64 arm64" +test-skip = "*_universal2:arm64" +environment = {RUNNER_OS="macOS"} + +[tool.cibuildwheel.windows] +environment = {PKG_CONFIG_PATH="C:/opt/64/lib/pkgconfig"} + +[[tool.cibuildwheel.overrides]] +select = "*-win32" +environment = {PKG_CONFIG_PATH="/opt/32/lib/pkgconfig"} + [build-system] requires = ["setuptools>=46.0", "wheel", "cffi>=1.0.0", "Cython", "findblas", "oldest-supported-numpy"] # PEP 518 - what is required to build build-backend = "setuptools.build_meta"