mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
scons: inherit python3native
scons tries to get build time vars by loading sysconfigdata. Inherit python3native instead of using host python and unset _PYTHON_SYSCONFIGDATA_NAME to avoid the need to depend on target python3 for sysconfigdata when using scons to build. Avoids build errors on still supported CentOS 7: | DEBUG: Executing shell function do_compile | scons: *** SCons version 3.0.5 does not run under Python version 3.4.8. | Python 2.7 or >= 3.5 is required. (From OE-Core rev: 44f303ba9fb193a985e8e4b7c6962883ae3970d1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b168b3ac94
commit
53099ced25
@@ -1,8 +1,11 @@
|
|||||||
|
inherit python3native
|
||||||
|
|
||||||
DEPENDS += "python3-scons-native"
|
DEPENDS += "python3-scons-native"
|
||||||
|
|
||||||
EXTRA_OESCONS ?= ""
|
EXTRA_OESCONS ?= ""
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
unset _PYTHON_SYSCONFIGDATA_NAME
|
||||||
if [ -n "${CONFIGURESTAMPFILE}" ]; then
|
if [ -n "${CONFIGURESTAMPFILE}" ]; then
|
||||||
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
|
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
|
||||||
${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
|
${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
|
||||||
@@ -14,11 +17,13 @@ do_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
scons_do_compile() {
|
scons_do_compile() {
|
||||||
|
unset _PYTHON_SYSCONFIGDATA_NAME
|
||||||
${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
|
${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
|
||||||
die "scons build execution failed."
|
die "scons build execution failed."
|
||||||
}
|
}
|
||||||
|
|
||||||
scons_do_install() {
|
scons_do_install() {
|
||||||
|
unset _PYTHON_SYSCONFIGDATA_NAME
|
||||||
${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
|
${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
|
||||||
die "scons install execution failed."
|
die "scons install execution failed."
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user