DRAFT catkin*.bbclass: ROS_USE_PYTHON3 -> ROS_PYTHON_VERSION

Also ensure PYTHON_DIR is set when only inherit-ing catkin_ros_prefix.bbclass
This commit is contained in:
Herb Kuta 2019-04-22 16:07:16 -07:00
parent 3aaff6fd6f
commit 809f165758
2 changed files with 6 additions and 3 deletions

View File

@ -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"

View File

@ -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}"