From ca8a7c2727021df1dd3f812eb483dd31eedaea2f Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Wed, 12 Dec 2012 13:43:54 +0100 Subject: [PATCH] no need to install rospkg natively anymore --- install.sh | 4 -- meta/recipes-core/images/core-image-bmw.bb | 15 ++++++- .../python/python-nose-native_1.2.1.bb | 4 ++ .../python/python-pyyaml-native_3.10.bb | 4 ++ meta/recipes-extended/ros/ros.bb | 40 +++++++++++++++++++ 5 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 meta/recipes-devtools/python/python-nose-native_1.2.1.bb create mode 100644 meta/recipes-devtools/python/python-pyyaml-native_3.10.bb create mode 100644 meta/recipes-extended/ros/ros.bb diff --git a/install.sh b/install.sh index 79958a4..075e8a4 100644 --- a/install.sh +++ b/install.sh @@ -6,10 +6,6 @@ scp lukas@192.168.7.1:/home/lukas/ros_server/fuerte-ros-base.rosinstall . # run rosinstall mkdir ~/ros rosinstall --catkin ~/ros fuerte-ros-base.rosinstall -# install rospkg manually -## git clone ssh://lukas@192.168.7.1//home/lukas/ros_server/rospkg -## cd ~/rospkg -## python setup.py install # apply patch cd ~/ros/ros_comm patch -p1 << EOF diff --git a/meta/recipes-core/images/core-image-bmw.bb b/meta/recipes-core/images/core-image-bmw.bb index 0e9e58d..c85c9ea 100644 --- a/meta/recipes-core/images/core-image-bmw.bb +++ b/meta/recipes-core/images/core-image-bmw.bb @@ -15,8 +15,19 @@ augment_hosts_setting_file () { echo '127.0.0.1\tqemux86-64.localdomain\t\tqemux86-64' >> ${IMAGE_ROOTFS}/etc/hosts } +# installs the easy_install_pth_file that we need +create_python_easy_install_pth_file () { + cat > ${IMAGE_ROOTFS}/usr/lib/python2.7/site-packages/easy-install.pth << EOF +import sys; sys.__plen = len(sys.path) +./setuptools-0.6c11-py2.7.egg +./rospkg-1.0.15-py2.7.egg +import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) +EOF + +} + # remove not needed ipkg informations # create a custom hosts file -ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; augment_hosts_setting_file ; " +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; augment_hosts_setting_file ; create_python_easy_install_pth_file ; " -IMAGE_INSTALL += "boost boost-dev packagegroup-core-ssh-openssh dhcp-client file ldd python-modules python-setuptools python-rospkg python-rosinstall git cmake python-empy python-pyyaml python-nose log4cxx log4cxx-dev libbz2-dev" +IMAGE_INSTALL += "boost boost-dev packagegroup-core-ssh-openssh dhcp-client file ldd python-modules python-setuptools python-rospkg python-rosinstall git cmake python-empy python-pyyaml python-nose log4cxx log4cxx-dev libbz2-dev ros" diff --git a/meta/recipes-devtools/python/python-nose-native_1.2.1.bb b/meta/recipes-devtools/python/python-nose-native_1.2.1.bb new file mode 100644 index 0000000..05cfd42 --- /dev/null +++ b/meta/recipes-devtools/python/python-nose-native_1.2.1.bb @@ -0,0 +1,4 @@ +require python-nose_${PV}.bb +inherit native pythonnative +DEPENDS = "python-native" +RDEPENDS_${PN} = "" diff --git a/meta/recipes-devtools/python/python-pyyaml-native_3.10.bb b/meta/recipes-devtools/python/python-pyyaml-native_3.10.bb new file mode 100644 index 0000000..5ddefc4 --- /dev/null +++ b/meta/recipes-devtools/python/python-pyyaml-native_3.10.bb @@ -0,0 +1,4 @@ +require python-pyyaml_${PV}.bb +inherit native pythonnative +DEPENDS = "python-native" +RDEPENDS_${PN} = "" diff --git a/meta/recipes-extended/ros/ros.bb b/meta/recipes-extended/ros/ros.bb new file mode 100644 index 0000000..3b496cf --- /dev/null +++ b/meta/recipes-extended/ros/ros.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "ROS" +HOMEPAGE = "http://ros.org" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" + +DEPENDS = "python-empy-native python-rospkg-native python-native python-pyyaml-native python-nose-native" + +PR = "r0" + +SRC_URI = "file://catkin \ +file://CMakeLists.txt \ +file://common_msgs \ +file://gencpp \ +file://genlisp \ +file://genmsg \ +file://genpy \ +file://ros \ +file://ros_comm \ +file://roscpp_core \ +file://rospack \ +file://std_msgs" + +S = "${WORKDIR}" + +EXTRA_OECMAKE = "-DSETUPTOOLS_DEB_LAYOUT=OFF" + +do_configure_prepend () { +cat > /home/lukas/af_yocto/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/easy-install.pth << EOF +import sys; sys.__plen = len(sys.path) +./setuptools-0.6c11-py2.7.egg +./rospkg-1.0.15-py2.7.egg +import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) +EOF + +} + +inherit cmake pythonnative + +