File: Use-system-provided-pybind11.patch

package info (click to toggle)
wsclean 3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,296 kB
  • sloc: cpp: 129,246; python: 22,066; sh: 360; ansic: 230; makefile: 185
file content (65 lines) | stat: -rw-r--r-- 2,341 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Ole Streicher <olebole@debian.org>
Date: Thu, 5 Jan 2023 12:45:36 +0100
Subject: Use system provided pybind11

The one provided with the sources is not compatible to Python 3.11
---
 CMakeLists.txt                 | 8 ++------
 external/radler/CMakeLists.txt | 4 ++--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1de7f9f..de5020e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,7 +36,7 @@ set(RADLER_CXX_FLAGS
     " "
     CACHE STRING "Extra C++ flags used for compiling Radler")
 
-set(ExternalSubmoduleDirectories aocommon pybind11 radler schaapcommon)
+set(ExternalSubmoduleDirectories aocommon radler schaapcommon)
 foreach(ExternalSubmodule ${ExternalSubmoduleDirectories})
   if(NOT EXISTS ${CMAKE_SOURCE_DIR}/external/${ExternalSubmodule})
     message(
@@ -117,10 +117,6 @@ find_package(
   COMPONENTS Interpreter Development
   REQUIRED)
 
-# Include pybind11
-add_subdirectory("${CMAKE_SOURCE_DIR}/external/pybind11")
-include_directories(SYSTEM ${pybind11_INCLUDE_DIRS})
-
 #Prevent accidentally finding old BoostConfig.cmake file from casapy
 set(Boost_NO_BOOST_CMAKE ON)
 if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
@@ -421,7 +417,7 @@ set(EXTERNAL_LIBRARIES
     ${MPI_LIBRARIES}
     ${EVERYBEAM_LIB}
     schaapcommon
-    pybind11::embed)
+    ${Python3_LIBRARIES})
 
 # Perform the BLAS check from aocommon
 include("${CMAKE_CURRENT_LIST_DIR}/external/aocommon/CMake/CheckBLAS.cmake")
diff --git a/external/radler/CMakeLists.txt b/external/radler/CMakeLists.txt
index f82009e..5a00c99 100644
--- a/external/radler/CMakeLists.txt
+++ b/external/radler/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
 
 if(NOT COMPILE_AS_EXTERNAL_PROJECT)
   # Include submodules
-  set(ExternalSubmoduleDirectories aocommon pybind11 schaapcommon)
+  set(ExternalSubmoduleDirectories aocommon schaapcommon)
   foreach(ExternalSubmodule ${ExternalSubmoduleDirectories})
     if(NOT EXISTS ${CMAKE_SOURCE_DIR}/external/${ExternalSubmodule})
       message(
@@ -201,7 +201,7 @@ set(RADLER_TARGET_INCLUDE_DIRS
 
 set(RADLER_TARGET_LIBS
     ${Boost_DATE_TIME_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${CASACORE_LIBRARIES}
-    ${CFITSIO_LIBRARY} pybind11::embed schaapcommon)
+    ${CFITSIO_LIBRARY} ${Python3_LIBRARIES} schaapcommon)
 
 # Source directories
 add_subdirectory(cpp)