diff --git a/newsfragments/4648.bugfix.rst b/newsfragments/4648.bugfix.rst new file mode 100644 index 0000000000..feb8edcc18 --- /dev/null +++ b/newsfragments/4648.bugfix.rst @@ -0,0 +1 @@ +Fix cross-platform compilation using ``distutils._msvccompiler.MSVCCompiler`` -- by :user:`saschanaz` and :user:`Avasam` \ No newline at end of file diff --git a/setuptools/_distutils/_msvccompiler.py b/setuptools/_distutils/_msvccompiler.py index 03653929a8..bf10ae2365 100644 --- a/setuptools/_distutils/_msvccompiler.py +++ b/setuptools/_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: