From 1df51ebf5a1f053034d8424e12e238681a832fef Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 18 Dec 2012 08:57:27 +0100 Subject: [PATCH] a stable version for the easyinstall issue, but it could be automated more --- meta/classes/distutils.bbclass | 10 ----- .../python/python-rospkg_1.0.15.bb | 10 +---- .../python/python-setuptools_0.6c11.bb | 37 +++++++++++++++++++ 3 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 meta/recipes-devtools/python/python-setuptools_0.6c11.bb diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 537f2ba..8230c6d 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -72,16 +72,6 @@ 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" diff --git a/meta/recipes-devtools/python/python-rospkg_1.0.15.bb b/meta/recipes-devtools/python/python-rospkg_1.0.15.bb index c6d1495..2d71bbf 100644 --- a/meta/recipes-devtools/python/python-rospkg_1.0.15.bb +++ b/meta/recipes-devtools/python/python-rospkg_1.0.15.bb @@ -12,12 +12,6 @@ S = "${WORKDIR}/${SRCNAME}-${PV}" inherit distutils -# Must inherit package first before changing PACKAGEFUNCS -inherit package -PACKAGEFUNCS += "add_easyinstall_pth" +EASYINSTALL_python-rospkg = "./rospkg-1.0.15-py2.7.egg" -add_easyinstall_pth () { - echo "rospkg add_easyinstall_pth..." -} - -EASYINSTALL_python-rospkg = "rospkg-1.0.15-py2.7.egg" +inherit easyinstall \ No newline at end of file diff --git a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb new file mode 100644 index 0000000..3575b59 --- /dev/null +++ b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Download, build, install, upgrade, and uninstall Python packages" +HOMEPAGE = "http://cheeseshop.python.org/pypi/setuptools" +SECTION = "devel/python" +LICENSE = "PSF" +LIC_FILES_CHKSUM = "file://setup.py;beginline=23;endline=23;md5=8a314270dd7a8dbca741775415f1716e" + +SRCNAME = "setuptools" +PR = "ml5" +DEPENDS += "python" +DEPENDS_virtclass-native += "python-native" + +SRC_URI = "\ + http://cheeseshop.python.org/packages/source/s/setuptools/${SRCNAME}-${PV}.tar.gz\ +" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils + +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" + +do_install_prepend() { + install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages +} + +RDEPENDS_${PN} = "\ + python-distutils \ + python-compression \ +" + +SRC_URI[md5sum] = "7df2a529a074f613b509fb44feefe74e" +SRC_URI[sha256sum] = "630fea9b726320b73ee3ca6ff61732cb32675b0389be658080fe46383b87a1d3" + +EASYINSTALL_${PN} = "./setuptools-0.6c11-py2.7.egg" + +inherit easyinstall + +BBCLASSEXTEND = "native"