Skip to content

CI: build Windows wheels - #4

Merged
thervier merged 10 commits into
masterfrom
ci/windows-wheels
Oct 12, 2026
Merged

thervier merged 10 commits into
masterfrom
ci/windows-wheels

Conversation

@thervier

@thervier thervier commented Oct 12, 2026 •

Copy link
Copy Markdown

Adds Windows x64 to the wheels built by CI, so wheels now cover CPython 3.10 → 3.15 on Linux x86_64, macOS arm64 and Windows x64.

CI changes:

  • Windows job: a windows-2025 job runs ci/conan_deps.sh through Git Bash to build the dependencies with MSVC (cppstd=17, since MSVC has no GNU extensions).
  • Repair: ci/repair_wheel_windows.py repairs the wheels with delvewheel. It bundles the dependency DLLs and the MSVC C++ runtime (msvcp140.dll), taken from the Visual Studio used for the build (14.51). The system's copy (14.40) is older than the compiler and could make the module crash.
  • Release only: CMake now generates only the Release configuration (CMAKE_CONFIGURATION_TYPES). With Visual Studio, CMake used to report errors for the Debug/MinSizeRel/RelWithDebInfo configurations, for which Conan provides no dependencies.
  • Conan cache: now also kept on Windows. It's saved even when the build fails, so a failing run doesn't rebuild boost and openssl (~35 min on Windows).
  • QI_REF: ci/conan_deps.sh can build a libqi branch or tag, which makes it easier to test libqi changes.

Fixes needed for Windows:

  • libqi: 4 fixes, released in libqi 4.0.7, which this PR now uses.
  • Bindings: ssize_t → Py_ssize_t in src/pytypes.cpp.

Warnings: fixes the compiler warnings in the bindings: an unused variable, a redundant std::move, and implicit size_t conversions on MSVC. The remaining warnings come from libqi headers (std::result_of is deprecated) and will be handled separately in libqi.

README: lists the Windows wheels and adds Windows build instructions (with cibuildwheel).

Tested: all 18 wheels build and pass the smoke test in CI. The Windows wheels need nothing beyond a 64-bit Python on Windows 10/11: the dependency DLLs and msvcp140 are bundled, and vcruntime140 comes with Python.

🤖 Generated with Claude Code

@thervier thervier changed the title CI: experimental Windows wheels CI: build Windows wheels Oct 12, 2026
thervier and others added 7 commits October 12, 2026 12:33
- Build the Conan dependencies with MSVC (C++17, without GNU extensions).
- Repair the wheels with delvewheel, using the dependencies DLLs.
- Make sure cibuildwheel uses Git Bash, not WSL, to run ci/conan_deps.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
So that a failing build (e.g. while fixing libqi) does not rebuild all the
dependencies on the next run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h MSVC)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wheels are built with the latest MSVC (toolset 14.51), which requires an
MSVC runtime at least as recent: an older msvcp140.dll on the user machine
may make the module crash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eels

- Build the released libqi 4.0.7 (with the MSVC fixes) instead of the
  temporary libqi branch.
- README: list the Windows wheels, and add the Windows build instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thervier and others added 3 commits October 12, 2026 13:24
- pysession: `category` is unused when debug logs are compiled out.
- pystrand: redundant std::move in return statement.
- pyapplication, pytypes: implicit size_t conversions (MSVC C4267).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
delvewheel bundled the msvcp140.dll of the system (14.40), older than the
compiler (14.51), which does not fix the compatibility issue. Bundle the one
redistributed with the Visual Studio used to build the wheel instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Conan dependencies are only available in Release: with the Visual Studio
(multi-config) generator, CMake reported errors for the imported targets in
the other configurations (Debug, MinSizeRel, RelWithDebInfo).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thervier
thervier marked this pull request as ready for review October 12, 2026 12:38
@thervier
thervier merged commit c11ebc8 into master Oct 12, 2026
7 of 8 checks passed
@thervier
thervier deleted the ci/windows-wheels branch October 12, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant