ITADN

Feature request: use Wine-in-Docker to build Windows wheels from Linux hosts

#2748Opencgranade 创建于 2026-02-17
C
cgranadecommented
### Description Outside of GitHub services, standing up Windows-platform runners in CI is a bit more tricky and expensive as compared to GitHub-subsidized runners. In particular, for users running cibuildwheel locally or on Woodpecker, having access to Windows runners may be prohibitive. In principle, it should be possible to run cibuildwheel from a Wine prefix, such that a Linux host can produce Windows-platform wheels by running Wine in a Docker environment. I put together a small proof-of-concept at https://codeberg.org/rereading/pyreading/src/branch/cgranade/wine-env/ci-environment/wine, which gets as far as using Wine-in-Docker to provision uv and PDM, populating development environments, and calling out to cibuildwheel. That build in turn is able to download and run Cargo-in-Wine, but fails when trying to call `link.exe`, as the Windows SDK build tools are missing in that environment. The winetricks project has an explicit recipe for installing these build tools, but I was unable to get that recipe working without a virtual framebuffer for Wine to draw progress dialog boxes to — still, even with that caveat, it's enough progress to suggest to me that such an approach *might* be workable. I definitely recognize this is a bit of a wild feature request, and quite possibly not in line with PyPA's goals here. However, I wanted to ask anyway rather than making an assumption, as this would be a wonderful tool for helping to build Python wheels without depending on GitHub services. Thanks for an awesome project, and for taking the time to read this (admittedly unhinged) feature request! ♥ ### Build log _No response_ ### CI config _No response_
1 条评论