From 549040c75b0f24562222f44fc5290ef23ca257e4 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 18 Dec 2012 09:03:50 +0100 Subject: [PATCH] adding easyinstall class --- meta/classes/easyinstall.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 meta/classes/easyinstall.bbclass diff --git a/meta/classes/easyinstall.bbclass b/meta/classes/easyinstall.bbclass new file mode 100644 index 0000000..8ae975d --- /dev/null +++ b/meta/classes/easyinstall.bbclass @@ -0,0 +1,11 @@ + +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 +} +