-
Notifications
You must be signed in to change notification settings - Fork 5
/
dd4hep-python.patch
62 lines (58 loc) · 2.72 KB
/
dd4hep-python.patch
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e282c31a..c093c769 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,11 @@ SET( DD4hep_VERSION_PATCH 1 )
# Basic project setup #
#######################
+# Unbreak the python finding process
+message(STATUS "Input: ${Python_EXECUTABLE}")
+FIND_PACKAGE(Python REQUIRED COMPONENTS Interpreter Development)
+message(STATUS "Resolved to: ${Python_VERSION}")
+
set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake )
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index bcd3407f..ba14f84e 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -671,6 +671,11 @@ function(dd4hep_add_plugin binary)
endif()
endfunction(dd4hep_add_plugin)
+# Unbreak the python finding process
+message(STATUS "Input: ${Python_EXECUTABLE}")
+FIND_PACKAGE(Python REQUIRED COMPONENTS Interpreter Development)
+message(STATUS "Resolved to: ${Python_VERSION}")
+
#
# Macro to set up ROOT:: targets so that we can use the same code for root 6.8 and for root 6.10 and beyond
@@ -688,13 +693,13 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
SET(REQUIRE_PYTHON_VERSION ${ROOT_PYTHON_VERSION})
ENDIF()
dd4hep_debug("D++> Python version used for building ROOT ${ROOT_PYTHON_VERSION}" )
- if (NOT DD4HEP_RELAX_PYVER)
- dd4hep_debug("D++> Required python version ${REQUIRE_PYTHON_VERSION}")
- FIND_PACKAGE(Python ${REQUIRE_PYTHON_VERSION} EXACT REQUIRED COMPONENTS Development)
- FIND_PACKAGE(Python ${REQUIRE_PYTHON_VERSION} EXACT QUIET COMPONENTS Interpreter)
- else()
- FIND_PACKAGE(Python REQUIRED COMPONENTS Development)
- FIND_PACKAGE(Python QUIET COMPONENTS Interpreter)
+ # if (NOT DD4HEP_RELAX_PYVER)
+ # dd4hep_debug("D++> Required python version ${REQUIRE_PYTHON_VERSION}")
+ # FIND_PACKAGE(Python ${REQUIRE_PYTHON_VERSION} EXACT REQUIRED COMPONENTS Development)
+ # FIND_PACKAGE(Python ${REQUIRE_PYTHON_VERSION} EXACT QUIET COMPONENTS Interpreter)
+ # else()
+ # FIND_PACKAGE(Python REQUIRED COMPONENTS Development)
+ # FIND_PACKAGE(Python QUIET COMPONENTS Interpreter)
dd4hep_debug("D++> Found python version ${Python_VERSION}")
string(REPLACE "." ";" _root_pyver_tuple ${REQUIRE_PYTHON_VERSION})
list(GET _root_pyver_tuple 0 _root_pyver_major)
@@ -703,7 +708,7 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
dd4hep_print("WARNING: Mismatch in Python version: ${Python_VERSION} vs. ${REQUIRE_PYTHON_VERSION}")
dd4hep_print(" ABI compatibility should not be assumed!")
endif()
- endif()
+ # endif()
ELSE()
FIND_PACKAGE(Python COMPONENTS Development)
FIND_PACKAGE(Python QUIET COMPONENTS Interpreter)