mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup
When using distutils for a python package based on a python-setuptools installation script that sets up a console script, the header of the console script created by setuptools points to the python-native path. The console scripts are commonly executed in the image, but not in the sysroot environment. Therefore, the header of the console scripts should point to the python interpreter in the image. Setuptools does not allow to set the path of the python interpreter via some command-line argument. Hence after the installation script ran, the distutils class replaces the path in the console script files created by the installation. (From OE-Core rev: 55c6f1318fe62f7cec37776853cf8bef82a55f89) Signed-off-by: Lukas Bulwahn <Lukas.Bulwahn@oss.bmw-carit.de> sgw - added \ to protect the space. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
651658eac7
commit
88de87eb4e
|
|
@ -47,12 +47,14 @@ distutils_do_install() {
|
|||
|
||||
if test -e ${D}${bindir} ; then
|
||||
for i in ${D}${bindir}/* ; do \
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
|
||||
done
|
||||
fi
|
||||
|
||||
if test -e ${D}${sbindir}; then
|
||||
for i in ${D}${sbindir}/* ; do \
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
|
||||
done
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user