[DOC] How to find Windows compilers when using scikit-build with cibuildwheel
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 326
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 8
Description
First, thanks so much to the authors of this package. It's excellent, has amazing docs, and is helping to resolve a major pain point for me as a maintainer. 🚀
I have been working on getting cibuildwheel to work with scikit-build on Windows for a simulation analysis package I maintain, freud. While I'm still working on the build process for making cibuildwheel work with Windows, I wanted to make an issue that specifically documents one of the steps that was difficult for me.
Problem
scikit-build wasn't able to find a working compiler because I had not activated "vcvarsall" or an equivalent form of environment configuration.
Solution
I'm using GitHub actions and needed to add this step before the cibuildwheel step, so that scikit-build and CMake could find the correct compilers: https://github.com/ilammy/msvc-dev-cmd
# Configure compilers for Windows. Does nothing on Linux/Mac.
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
This is effectively equivalent to executing the "vcvarsall" script that sets environment variables for Visual C++ compilers, but persists between steps in GitHub Actions. This also circumvents the possible need for a CIBW_BUILD_WHEEL_COMMAND option as described in #151 because the environment variables persist without the need to call something immediately before pip wheel in the same step.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no target documentation file or test. Review the existing Windows and GitHub Actions build documentation, then document enabling the MSVC environment with ilammy/msvc-dev-cmd before the cibuildwheel step; done means maintainers can find and follow the compiler setup guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, github-actions, python
- Domain
- build-system, ci-cd, operating-systems
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100