diff --git a/classes/catkin.bbclass b/classes/catkin.bbclass index 397784f..1c477b3 100644 --- a/classes/catkin.bbclass +++ b/classes/catkin.bbclass @@ -3,9 +3,9 @@ # Copyright (c) 2019 LG Electronics, Inc. # -ROS_USE_PYTHON3 ??= "no" - -inherit cmake ${@'distutils3-base' if bb.utils.to_boolean(d.getVar('ROS_USE_PYTHON3', True)) else 'distutils-base'} catkin_ros_prefix faulty-solibs +inherit catkin_ros_prefix +# ROS_PYTHON_VERSION is set in generated-ros-distro.inc, ie, it will never be unset here. +inherit cmake ${@'distutils3-base' if d.getVar('ROS_PYTHON_VERSION', True) == '3' else 'distutils-base'} faulty-solibs # Prepend build dependency on "catkin-runtime" and "catkin-native" # if the package is not "catkin" or "catkin-runtime" diff --git a/classes/catkin_ros_prefix.bbclass b/classes/catkin_ros_prefix.bbclass index 99ac146..c6ff553 100644 --- a/classes/catkin_ros_prefix.bbclass +++ b/classes/catkin_ros_prefix.bbclass @@ -23,6 +23,9 @@ PREPROCESS_RELOCATE_DIRS += " \ ${ros_libdir} \ " +# ROS_PYTHON_VERSION is set in generated-ros-distro.inc, ie, it will never be unset here. +inherit ${@'python3-dir' if d.getVar('ROS_PYTHON_VERSION', True) == '3' else 'python-dir'} + PKG_CONFIG_PATH .= ":${PKG_CONFIG_DIR}:${STAGING_DIR_HOST}${ros_libdir}/pkgconfig:${STAGING_DATADIR}/pkgconfig" PYTHON_SITEPACKAGES_DIR = "${ros_libdir}/${PYTHON_DIR}/site-packages" export PYTHONPATH = "${STAGING_DIR_NATIVE}${PYTHON_SITEPACKAGES_DIR}"