diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index e7652218..97b067c6 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -284,7 +284,7 @@ def initialize(self, plat_name=None): f"--plat-name must be one of {tuple(_vcvars_names)}" ) - plat_spec = _get_vcvars_spec(get_host_platform(), get_platform()) + plat_spec = _get_vcvars_spec(get_host_platform(), plat_name) vc_env = _get_vc_env(plat_spec) if not vc_env: diff --git a/newsfragments/xxxx.bugfix.rst b/newsfragments/xxxx.bugfix.rst new file mode 100644 index 00000000..eeb10466 --- /dev/null +++ b/newsfragments/xxxx.bugfix.rst @@ -0,0 +1 @@ +Fix cross-platform compilation using `distutils._msvccompiler.MSVCCompiler` -- by :user:`saschanaz` and :user:`Avasam`