moving the easyinstall routine into the distutils class

This commit is contained in:
Lukas Bulwahn 2012-12-17 16:21:20 +01:00
parent 443bbf6661
commit 8a34fa39ff
2 changed files with 10 additions and 10 deletions

View File

@ -69,6 +69,16 @@ distutils_do_install() {
fi
}
pkg_postinst_${PN} () {
if test ! -e ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth; then
cat > ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth << EOF
import sys; sys.__plen = len(sys.path)
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
fi
sed -i '$ i ${EASYINSTALL_${PN}}' ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
}
EXPORT_FUNCTIONS do_compile do_install
export LDSHARED="${CCLD} -shared"

View File

@ -21,13 +21,3 @@ add_easyinstall_pth () {
}
EASYINSTALL_python-rospkg = "rospkg-1.0.15-py2.7.egg"
pkg_postinst_${PN} () {
if test ! -e ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth; then
cat > ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth << EOF
import sys; sys.__plen = len(sys.path)
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
fi
sed -i '$ i ${EASYINSTALL_${PN}}' ${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
}