Skip to contentSkip to conversation

autotools.bbclass: fix py3 SyntaxError in cfgscript print()

PATCH New Richard Purdie 1 participant 1 message May 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autotools.bbclass: fix py3 SyntaxError in cfgscript print()

From: Tim Orling <[email protected]>

Update so this works with python3.

meta/classes/autotools.bbclass +1 -1
index c92ca78..03a61c3 100644
@@ -87,7 +87,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=`python -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