Description
While py_version
is set to build for different Python versions, the value isn't used to set up the runners accordingly. Instead, Python 3.11 is installed on windows-2022
runners by default and as a result wheels get build for Python 3.11, even though py_version
is set to cp310-cp310
, see https://github.com/llvm/torch-mlir-release/actions/runs/12927777177/job/36053656593#step:5:101. To fix this, the correct Python version needs to be installed, based on what py_version
is set to. As an example, IREE does this via its build_tools/python_deploy/install_windows_deps.ps1 script. Furthermore, the Python version should be checked before kicking off the build, see for example how this is handled in IREE in build_tools/python_deploy/build_windows_packages.ps1#L33-L46.