mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
distutils: Tidy and simplify for readability
Line lengths, remove duplication, and use the PYTHON variable provided by pythonnative.bbclass. Coincidentally fixes a dormant defect in distutils3.bbclass in which we were sedding for STAGING_BINDIR_NATIVE/python-python3/python3. (From OE-Core rev: 7b8dd17c65e2d7d163f452833f21469918bf222e) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2537269bf5
commit
3de77b33ee
@@ -56,24 +56,18 @@ distutils3_do_install() {
|
||||
bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
|
||||
|
||||
# support filenames with *spaces*
|
||||
find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \;
|
||||
find ${D} -name "*.py" -exec grep -q ${D} {} \; \
|
||||
-exec sed -i -e s:${D}::g {} \;
|
||||
|
||||
if test -e ${D}${bindir} ; then
|
||||
for i in ${D}${bindir}/* ; do \
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i
|
||||
for i in ${D}${bindir}/* ${D}${sbindir}/*; do
|
||||
if [ -f "$i" ]; then
|
||||
sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${DISTUTILS_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-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i
|
||||
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
|
||||
|
||||
|
||||
#
|
||||
# FIXME: Bandaid against wrong datadir computation
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user