Skip to content

Commit

Permalink
ci: move some cibw options into pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
janden committed Jul 15, 2024
1 parent 982f09f commit 584c544
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/python_skbuild_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
# Not building for PyPy and musllinux for now.
CIBW_SKIP: "pp* *musllinux*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_BEFORE_ALL_LINUX: yum install -y fftw3-devel
CIBW_BEFORE_ALL_MACOS: brew install gcc@14 fftw
# Need following versions of GCC for compatibility with fftw
# installed by homebrew. Similarly, we set the macOS version
Expand All @@ -29,8 +24,6 @@ jobs:
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=13
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
- uses: actions/upload-artifact@v4
with:
Expand All @@ -47,9 +40,6 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_SKIP: "pp*"
CIBW_ARCHS_MACOS: "arm64"
# Make sure to install the ARM64-specific versions of FFTW and GCC.
# Perhaps this is done automatically on the macos-14 image. We should
# look into this further.
Expand All @@ -62,8 +52,6 @@ jobs:
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=14
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
- uses: actions/upload-artifact@v4
with:
Expand All @@ -90,20 +78,10 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: AMD64
# This is required to force cmake to avoid using MSVC (the default).
# By setting the generator to Ninja, cmake will pick gcc (mingw64)
# as the compiler.
CIBW_CONFIG_SETTINGS: "cmake.args='-G Ninja'"
# CIBW doesn't do vendoring of DLLs on Windows by default, so we
# have to install delvewheel and run it.
CIBW_BEFORE_BUILD: pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair -v --analyze-existing -w {dest_dir} {wheel}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
# PyPy doesn't seem to work under windows, for some reason.
CIBW_TEST_SKIP: "pp*-win*"

- uses: actions/upload-artifact@v4
with:
Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,21 @@ input = "python/finufft/finufft/__init__.py"
[tool.cibuildwheel]
# Necessary to see build output from the actual compilation
build-verbosity = 1
# Not building for PyPy and musllinux for now.
skip = "pp* *musllinux"
test-requires = "pytest"
test-command = "pytest {project}/python/finufft/test"

[tool.cibuildwheel.linux]
archs = "x86_64"
before-all = "yum install -y fftw3-devel"

[tool.cibuildwheel.macos]
archs = "arm64"

[tool.cibuildwheel.windows]
archs = "amd64"
before-build = "pip install delvewheel"
# CIBW doesn't do vendoring of DLLs on Windows by default, so we have to
# install delvewheel and run it.
repair-wheel-command = "delvewheel repair -v --analyze-existing -w {dest_dir} {wheel}

0 comments on commit 584c544

Please sign in to comment.