merge of 'ebb880278ddb813fb7b527d822caeb57adc81179'
[openembedded.git] / classes / distutils.bbclass
blobdb15cebdd7364202c826183ce075e7ccc2349640
1 inherit distutils-base
3 distutils_do_compile() {
4         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
5         ${STAGING_BINDIR_NATIVE}/python setup.py build || \
6         oefatal "python setup.py build execution failed."
9 distutils_do_install() {
10         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
11         ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \
12         oefatal "python setup.py install execution failed."
14         for i in `find ${D} -name "*.py"` ; do \
15             sed -i -e s:${D}::g $i
16         done
18         if test -e ${D}${bindir} ; then 
19             for i in ${D}${bindir}/* ; do \
20                 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
21             done
22         fi
24         if test -e ${D}${sbindir} ; then
25             for i in ${D}${sbindir}/* ; do \
26                 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
27             done
28         fi
32 EXPORT_FUNCTIONS do_compile do_install