distutils: set PYTHONPATH and always create the site-packages directory to improve...
authorMichael Lauer <mickey@vanille-media.de>
Tue, 24 Jul 2007 01:04:50 +0000 (01:04 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Tue, 24 Jul 2007 01:04:50 +0000 (01:04 +0000)
classes/distutils-base.bbclass
classes/distutils.bbclass

index a66d845..c3f3257 100644 (file)
@@ -12,6 +12,7 @@ def python_dir(d):
 
 PYTHON_DIR = "${@python_dir(d)}"
 FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
-FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/*/.debug \
-                   ${libdir}/${PYTHON_DIR}/site-packages/.debug"
+FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/.debug \
+                   ${libdir}/${PYTHON_DIR}/site-packages/./*/debug \
+                   ${libdir}/${PYTHON_DIR}/site-packages/*/*/.debug"
 
index db15ceb..a7efad2 100644 (file)
@@ -1,15 +1,17 @@
 inherit distutils-base
 
 distutils_do_compile() {
-       BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-       ${STAGING_BINDIR_NATIVE}/python setup.py build || \
-       oefatal "python setup.py build execution failed."
+         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+         ${STAGING_BINDIR_NATIVE}/python setup.py build || \
+         oefatal "python setup.py build execution failed."
 }
 
 distutils_do_install() {
-       BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-       ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \
-       oefatal "python setup.py install execution failed."
+        install -d ${D}${libdir}/${PYTHON_DIR}/site-packages
+        PYTHONPATH=${D}/${libdir}/${PYTHON_DIR}/site-packages \
+        BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+        ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \
+        oefatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
             sed -i -e s:${D}::g $i