Closed jaraco closed 2 years ago
This issue is also affecting Setuptools build suite.
Looks like tox is not passing through PROGRAMFILES(x86)
env variable and because of that distutils falls back to a vs2015 style registry key lookup and this registry key is not set in windows-2022 image.
Hi @isuruf, thank you very much for the tip.
I tried explicitly passing PROGRAMFILES
and PROGRAMFILES(x86)
via passenv
configuration in tox.ini
, but that does not seem to solve the problem: https://github.com/pypa/setuptools/pull/3168/commits/89581b4b23fc74faa721843372c0fc320dcff60d
Looks like vswhere.exe
needs PROGRAMDATA
env variable passed through.
This workaround is great. Thanks for making it. I'm hoping that https://github.com/tox-dev/tox/issues/2382 will help fix the issue at its core (rather than requiring every windows compiled package to patch tox config). If tox doesn't accept a solution, it might be necessary for Setuptools to work around the broken environment by digging into the registry and reconstructing the system environment.
The error in the CI seems to be unrelated to the change:
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
.Maybe this error is also related to GitHub's update to
windows-2022
?Refs:
Originally posted by @abravalheri in https://github.com/pypa/distutils/issues/116#issuecomment-1048697265