Skip to contentSkip to conversation

Reduce dependency on Python v2

PATCH New Markus Lehtonen 1 participant 3 messages Sep 26, 2016

lore
Share & tools
lore
#0 lore raw

cover Reduce dependency on Python v2

Two simple patches to reduce our dependency on python2.

Markus Lehtonen (2):
autotools.bbclass: use python3 instead of python (v2)
glibc-initial: use python3 instead of python (v2)

 meta/classes/autotools.bbclass            | 2 +-
 meta/recipes-core/glibc/glibc-initial.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.6.6
#1 lore raw

PATCH 1/2 autotools.bbclass: use python3 instead of python (v2)

---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index e5f527e..ecbba9f 100644
@@ -85,7 +85,7 @@ AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
 oe_runconf () {
 	# Use relative path to avoid buildpaths in files
 	cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
-	cfgscript=`python -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
+	cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
 		if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
Signature · 1 line
2.6.6
#2 lore raw

PATCH 2/2 glibc-initial: use python3 instead of python (v2)

In reply to Markus Lehtonen
---
 meta/recipes-core/glibc/glibc-initial.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-initial.inc +1 -1
index 0c8bd64..ec21f10 100644
@@ -11,7 +11,7 @@ TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
 do_configure () {
 	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
 	find ${S} -name "configure" | xargs touch
-	cfgscript=`python -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
+	cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
 	$cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
 		--prefix=/usr \
 		--without-cvs --disable-sanity-checks \
Signature · 1 line
2.6.6