distutils: correct path to python for nativesdk
cover distutils: correct path to python for nativesdk
Hi,
Here is another small set of similar changes.
While for target path to python interpreter is fixed a while ago, for nativesdk it points to env(1) utility with absolute path in SDK where it might not be present.
Also this absolute path might be too long.
Use ${USRBINPATH} instead of ${bindir} to correctly configure path to env(1).
Please review.
Thanks.
Cc: XE-Linux <[email protected]> Serhii Popovych (2):
distutils.bbclass: Fix path to python for scripts distutils3.bbclass: Fix path to python for scripts
meta/classes/distutils.bbclass | 4 ++-- meta/classes/distutils3.bbclass | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image.
However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk.
On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case.
--- meta/classes/distutils.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils.bbclass +2 -2
@@ -44,7 +44,7 @@ distutils_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done
@@ -53,7 +53,7 @@ distutils_do_install() { if test -e ${D}${sbindir}; then for i in ${D}${sbindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done
Signature · 1 line
2.7.4
PATCH 2/2 distutils3.bbclass: Fix path to python for scripts
In reply to Serhii PopovychThis change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds.
--- meta/classes/distutils3.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils3.bbclass +2 -2
@@ -47,14 +47,14 @@ distutils3_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}: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}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi
Signature · 1 line
2.7.4
✗ patchtest: failure for distutils: correct path to python for nativesdk
In reply to Serhii Popovych== Series Details ==
Series: distutils: correct path to python for nativesdk
Revision: 1
URL : https://patchwork.openembedded.org/series/6029/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at d68a86d87a)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
v2 cover distutils: correct path to python for nativesdk
Hi,
Here is another small set of similar changes.
While for target path to python interpreter is fixed a while ago, for nativesdk it points to env(1) utility with absolute path in SDK where it might not be present.
Also this absolute path might be too long.
Use ${USRBINPATH} instead of ${bindir} to correctly configure path to env(1).
Please review.
Thanks.
Cc: XE-Linux <[email protected]> Serhii Popovych (2):
distutils.bbclass: Fix path to python for scripts distutils3.bbclass: Fix path to python for scripts
meta/classes/distutils.bbclass | 4 ++-- meta/classes/distutils3.bbclass | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/2 distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image.
However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk.
On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case.
v2: Rebased on top of new head.
--- meta/classes/distutils.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils.bbclass +2 -2
@@ -44,7 +44,7 @@ distutils_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done
@@ -53,7 +53,7 @@ distutils_do_install() { if [ -e ${D}${sbindir} ]; then for i in ${D}${sbindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done
Signature · 1 line
2.7.4
PATCH v2 2/2 distutils3.bbclass: Fix path to python for scripts
In reply to Serhii PopovychThis change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds.
v2: Rebased on top of new head.
--- meta/classes/distutils3.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils3.bbclass +2 -2
@@ -47,14 +47,14 @@ distutils3_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}: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}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi
Signature · 1 line
2.7.4