File: 0003-Make-Python-version-variable-for-pybuild.patch

package info (click to toggle)
ros-image-common 1.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 736 kB
  • sloc: cpp: 3,310; xml: 186; python: 38; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 1,175 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
27
28
29
30
31
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Mon, 23 Dec 2019 10:35:44 +0100
Subject: Make Python version variable for pybuild

---
 camera_calibration_parsers/CMakeLists.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/camera_calibration_parsers/CMakeLists.txt b/camera_calibration_parsers/CMakeLists.txt
index 612b366..c86e036 100644
--- a/camera_calibration_parsers/CMakeLists.txt
+++ b/camera_calibration_parsers/CMakeLists.txt
@@ -4,7 +4,8 @@ project(camera_calibration_parsers)
 find_package(catkin REQUIRED sensor_msgs rosconsole roscpp roscpp_serialization)
 
 find_package(PythonLibs REQUIRED)
-find_package(Boost REQUIRED COMPONENTS filesystem python)
+string(REPLACE "." "" BOOSTPYVER "${PYVER}")
+find_package(Boost REQUIRED COMPONENTS filesystem python${BOOSTPYVER})
 include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
 
 catkin_python_setup()
@@ -62,7 +63,7 @@ install(
 )
 
 install(TARGETS ${PROJECT_NAME}_wrapper
-  DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}
+  DESTINATION lib/python${PYVER}/${PYTHON_PACKAGES_DIR}/${PROJECT_NAME}
 )
 
 if(CATKIN_ENABLE_TESTING)