File: 0004-Find-python-version-specific-boost.patch

package info (click to toggle)
pybdsf 1.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,188 kB
  • sloc: fortran: 40,850; python: 14,895; ansic: 4,347; cpp: 1,586; makefile: 131; sh: 46
file content (26 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Stuart Prescott <stuart@debian.org>
Date: Mon, 12 Jan 2026 17:31:52 +1100
Subject: Find python-version-specific boost

---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b580b4b..95cceda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,12 @@ project(PyBDSF C CXX Fortran)
 find_package(PythonExtensions REQUIRED)
 find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
 find_package(F2PY REQUIRED)
-find_package(Boost COMPONENTS python numpy REQUIRED)
+
+# find the boost compiled for the right version of Python
+set(BOOST_PYTHON_LIBRARY_NAME
+    python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}
+    CACHE STRING "python-version-specific boost library")
+find_package(Boost COMPONENTS ${BOOST_PYTHON_LIBRARY_NAME} numpy REQUIRED)
 set(F2PY_EXECUTABLE "${PYTHON_EXECUTABLE}" "-m" "numpy.f2py")
 
 if(SKBUILD)