From a9f18af2bb5d6ce4240bd50b11138e5006818c0c Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 6 Jul 2026 20:48:57 +0300 Subject: [PATCH] Link against the latest Boost Python version. --- mesonbuild/dependencies/boost.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index fe3fade03a2c..f97605292132 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -636,6 +636,19 @@ def filter_libraries(self, libs: T.List[BoostLibraryFile], lib_vers: str) -> T.L abitag = libs[0].abitag libs = [x for x in libs if x.abitag == abitag] + # Assume that we are building against the latest Python version + # and that the other ones are only there for backwards compatibility. + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141440 + no_python_libs = [] + python_libs = [] + for l in libs: + if l.is_python_lib(): + python_libs.append(l) + else: + no_python_libs.append(l) + sorted_pylibs = sorted(python_libs, key=lambda l: l.name, reverse=True) + libs = no_python_libs + sorted_pylibs[:1] + return libs def detect_libraries(self, libdir: Path) -> T.List[BoostLibraryFile]: