From 8b757b1f2d6f81d907f9d2bc60182185266a4aaa Mon Sep 17 00:00:00 2001 From: Andrew McNulty Date: Tue, 2 Jul 2024 22:57:25 +0200 Subject: Python: fix limited API logic under GCC on Windows When building a limited API module on Windows the library to link with should be python3.dll, not python3X.dll. This was already the case for non-GCC, but should have been the case unconditionally. --- mesonbuild/dependencies/python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/dependencies/python.py') diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index db4944bab..883a29ad9 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -218,6 +218,8 @@ class _PythonDependencyBase(_Base): if self.static: libpath = Path('libs') / f'libpython{vernum}.a' else: + if limited_api: + vernum = vernum[0] comp = self.get_compiler() if comp.id == "gcc": if imp_lower == 'pypy' and verdot == '3.8': @@ -228,8 +230,6 @@ class _PythonDependencyBase(_Base): else: libpath = Path(f'python{vernum}.dll') else: - if limited_api: - vernum = vernum[0] if self.is_freethreaded: libpath = Path('libs') / f'python{vernum}t.lib' else: -- cgit v1.2.3