From 92692cbaa2767b6c45130c0ce704da7e120b0579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Kolarovszki?= Date: Wed, 6 Nov 2024 09:14:36 +0100 Subject: [PATCH] WIP: FIX(build.yml): Add Windows wheel repairing 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 --- .github/workflows/build.yml | 7 ++++++- piquasso/_math/CMakeLists.txt | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40c13a53..10d5ec33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - kz-release paths: - '**.cpp' - '**.hpp' @@ -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 @@ -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: diff --git a/piquasso/_math/CMakeLists.txt b/piquasso/_math/CMakeLists.txt index 40dd8b34..2bbee79e 100644 --- a/piquasso/_math/CMakeLists.txt +++ b/piquasso/_math/CMakeLists.txt @@ -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 +)