Locating the Visual Studio SDK for Python build

I am helping a Python project to switch to GitHub Actions, and for the first time we are able to perform CI builds on Windows.

Our setup.py script uses some logic to find Visual Studio depending on the Python version installed.

This detection does not work in the Windows build environment. Is there a better way to do this that will be compatible with GitHub Action’s environment?

We install the Visual Studio build tooling, so that you can use the compilers, linkers, etc.  However, we do not install the Windows SDK.

If you want to install one of the Windows SDKs, the easiest way to do that is to install it with chocolatey.  For example, you can install the https://chocolatey.org/packages/windows-sdk-10.0 package and I think that your build script will be able to locate it.

Thanks @ethomson . I see in the current GitHub Actions docs that these packages are installed:

  • Microsoft.VisualStudio.Component.VC.v141
  • Microsoft.VisualStudio.Component.Windows10SDK.16299

Do these correspond with the Visual C++ build tools version 14, and also the Windows 10 SDK? If so, is it still necessary to install these with Chocolatey still?