Windows MSVC: do not set sdk version if installing sdk (#37930)
Note the win-sdk package is not installable and reports an error which instructs the user how to add it. Without this fix, a (more confusing) error occurs before this message can be generated.
This commit is contained in:
parent
2d91a79af3
commit
0b12a480eb
@ -151,7 +151,11 @@ def setup_custom_environment(self, pkg, env):
|
|||||||
arch = arch.replace("-", "_")
|
arch = arch.replace("-", "_")
|
||||||
# vcvars can target specific sdk versions, force it to pick up concretized sdk
|
# vcvars can target specific sdk versions, force it to pick up concretized sdk
|
||||||
# version, if needed by spec
|
# version, if needed by spec
|
||||||
sdk_ver = "" if "win-sdk" not in pkg.spec else pkg.spec["win-sdk"].version.string + ".0"
|
sdk_ver = (
|
||||||
|
""
|
||||||
|
if "win-sdk" not in pkg.spec or pkg.name == "win-sdk"
|
||||||
|
else pkg.spec["win-sdk"].version.string + ".0"
|
||||||
|
)
|
||||||
# provide vcvars with msvc version selected by concretization,
|
# provide vcvars with msvc version selected by concretization,
|
||||||
# not whatever it happens to pick up on the system (highest available version)
|
# not whatever it happens to pick up on the system (highest available version)
|
||||||
out = subprocess.check_output( # novermin
|
out = subprocess.check_output( # novermin
|
||||||
|
Loading…
Reference in New Issue
Block a user