Skip to content

Commit

Permalink
WIP: FIX(build.yml): Add Windows wheel repairing
Browse files Browse the repository at this point in the history
The Windows wheels have not been repaired by `cibuildwheel` by default, see
https://cibuildwheel.pypa.io/en/1.x/options/#repair-wheel-command

According to the `cibuildwheel` documentation, this could be fixed by enabling
`delvewheel`.

Fixes #389
  • Loading branch information
Kolarovszki committed Nov 6, 2024
1 parent 5aaa8f3 commit 92692cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- kz-release
paths:
- '**.cpp'
- '**.hpp'
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [windows-latest]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -81,6 +82,10 @@ jobs:
## NOTE: --import-mode=importlib prevents pytest to import piquasso from
## directory
# CIBW_TEST_COMMAND: "pytest -v --import-mode=importlib {project}/tests"
env:
CIBW_BUILD: "cp38-win*"
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"

- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 5 additions & 1 deletion piquasso/_math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ pybind11_add_module(torontonian SHARED ${CMAKE_CURRENT_SOURCE_DIR}/torontonian.c

target_link_libraries(torontonian PUBLIC torontonianboost looptorontonianboost)

install(TARGETS torontonian LIBRARY DESTINATION piquasso/_math)
install(
TARGETS torontonian
RUNTIME DESTINATION piquasso/_math
LIBRARY DESTINATION piquasso/_math
)

0 comments on commit 92692cb

Please sign in to comment.