Skip to content
Snippets Groups Projects
Commit 93b03b62 authored by Lukas Bulwahn's avatar Lukas Bulwahn
Browse files

experimenting to install the correct easy_install.pth automagically

parent 56116c32
No related branches found
No related tags found
No related merge requests found
......@@ -17,17 +17,11 @@ augment_hosts_setting_file () {
# 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 ; 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 ros"
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"
......@@ -11,3 +11,21 @@ SRC_URI[sha256sum] = "f8be5a9d74f7e656d38b2c3b44b7e367fce4001d613ca3fbfcbb87c493
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils
# Must inherit package first before changing PACKAGEFUNCS
inherit package
PACKAGEFUNCS += "add_easyinstall_pth"
add_easyinstall_pth () {
echo "rospkg add_easyinstall_pth..."
}
pkg_postinst_python-rospkg () {
if test -e ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth; then
echo insert >> ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
else
echo create >> ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
fi
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment