From a56a8f9cb798eec1c023242db15a7b3e27c72911 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 14 Sep 2024 19:39:30 -0400 Subject: [PATCH 1/2] Fix cross-platform compilation using `distutils._msvccompiler.MSVCCompiler`. Actually use the `plat_name` param in `MSVCCompiler.initialize`. Selective cherry-pick of pypa/distutils@a0339c1. Closes pypa/setuptools#4648. --- newsfragments/4648.bugfix.rst | 1 + setuptools/_distutils/_msvccompiler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragments/4648.bugfix.rst 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: From 4c274911c59dd0161303d6cb991ec2a621ce1fb9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Sep 2024 10:44:04 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=2074.1.2=20=E2=86=92=2074.1?= =?UTF-8?q?.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- NEWS.rst | 9 +++++++++ newsfragments/4648.bugfix.rst | 1 - pyproject.toml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 newsfragments/4648.bugfix.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index cbb10b8211..5392694585 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 74.1.2 +current_version = 74.1.3 commit = True tag = True diff --git a/NEWS.rst b/NEWS.rst index 7b62a76e0c..94543403c6 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,12 @@ +v74.1.3 +======= + +Bugfixes +-------- + +- Fix cross-platform compilation using ``distutils._msvccompiler.MSVCCompiler`` -- by :user:`saschanaz` and :user:`Avasam` (#4648) + + v74.1.2 ======= diff --git a/newsfragments/4648.bugfix.rst b/newsfragments/4648.bugfix.rst deleted file mode 100644 index feb8edcc18..0000000000 --- a/newsfragments/4648.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix cross-platform compilation using ``distutils._msvccompiler.MSVCCompiler`` -- by :user:`saschanaz` and :user:`Avasam` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d0b709d9be..f0848e20cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ backend-path = ["."] [project] name = "setuptools" -version = "74.1.2" +version = "74.1.3" authors = [ { name = "Python Packaging Authority", email = "distutils-sig@python.org" }, ]