roslib: use Python provided by environment in environment hook

This commit is contained in:
Dominique Hunziker 2017-06-02 11:57:54 +02:00 committed by Lukas Bulwahn
parent 78015372a5
commit 63e8d471f1
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,21 @@
diff -u -r new/env-hooks/10.ros.sh.em old/env-hooks/10.ros.sh.em
--- old/env-hooks/10.ros.sh.em 2016-03-04 23:20:35.255706716 +0100
+++ new/env-hooks/10.ros.sh.em 2016-03-04 23:19:24.727707608 +0100
@@ -1,7 +1,7 @@
# generated from ros/env-hooks/10.ros.sh.em
# scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
-export PATH="`@(PYTHON_EXECUTABLE) -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`"
+export PATH="`/usr/bin/env python -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`"
if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "indigo" ]; then
echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions."
@@ -30,7 +30,7 @@
print(os.pathsep.join(paths))
EOF
)
-export ROS_PACKAGE_PATH="`@(PYTHON_EXECUTABLE) -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
+export ROS_PACKAGE_PATH="`/usr/bin/env python -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
@[if DEVELSPACE]@
# env variables in develspace

View File

@ -9,4 +9,6 @@ require ros.inc
ROS_PKG_SUBDIR = "core" ROS_PKG_SUBDIR = "core"
SRC_URI += "file://0001-use-env-to-get-python-exec.patch"
RDEPENDS_${PN} = "${PYTHON_PN}-rospkg catkin-runtime" RDEPENDS_${PN} = "${PYTHON_PN}-rospkg catkin-runtime"