From 66136f87d1f3cebd26bf4705619a970afc186d2d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 21 Sep 2025 16:23:53 +0800 Subject: [PATCH] Add instructions for cibuildwheel to support Windows wheels I had trouble with building wheels ("Python executable could not be found") and fixed it by specifying the `vsenv` option for cibuildwheel. A similar flag is used by numpy as well, so this is probably indeed needed. Co-authored-by: Ralf Gommers --- docs/how-to-guides/meson-args.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/how-to-guides/meson-args.rst b/docs/how-to-guides/meson-args.rst index 901002fb..80a1e708 100644 --- a/docs/how-to-guides/meson-args.rst +++ b/docs/how-to-guides/meson-args.rst @@ -190,6 +190,14 @@ permanently in the project's ``pyproject.toml``: [tool.meson-python.args] setup = ['--vsenv'] +And in case you don't want to set ``--vsenv`` as the default, but do want to +build Windows wheels with MSVC in CI using cibuildwheel: + +.. code-block:: toml + + [tool.cibuildwheel.windows] + config-settings = { setup-args = ["--vsenv"] } + To set this option temporarily at build-time: .. tab-set::