From 328011f77a1cef00655a697cd2e503a97754b745 Mon Sep 17 00:00:00 2001 From: Andrew McNulty Date: Wed, 8 May 2024 19:05:47 +0200 Subject: Python: link correct limited API lib on mingw This commit fixes GH issue #13167 by linking to the correct library under MINGW when the 'limited_api' kwarg is specified. --- mesonbuild/dependencies/python.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mesonbuild/dependencies/python.py') diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index 56dddd932..a74423cb7 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -248,9 +248,15 @@ class _PythonDependencyBase(_Base): lib = Path(self.variables.get('base_prefix')) / libpath elif self.platform.startswith('mingw'): if self.static: - libname = self.variables.get('LIBRARY') + if limited_api: + libname = self.variables.get('ABI3DLLLIBRARY') + else: + libname = self.variables.get('LIBRARY') else: - libname = self.variables.get('LDLIBRARY') + if limited_api: + libname = self.variables.get('ABI3LDLIBRARY') + else: + libname = self.variables.get('LDLIBRARY') lib = Path(self.variables.get('LIBDIR')) / libname else: raise mesonlib.MesonBugException( -- cgit v1.2.3