aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-03-19 12:34:26 +0000
committerPetr Štetiar <ynezz@true.cz>2019-07-26 08:09:16 +0200
commit316c8b5503e54cdb3ee5bd3b5d81a3b7dd139294 (patch)
tree1883f250c7cc0e8b1dbfd6ce4e629fbfe6f85388
parent57bb89b57fe6cc14f299dab8afcad33d9b948a3c (diff)
downloadupstream-316c8b5503e54cdb3ee5bd3b5d81a3b7dd139294.tar.gz
upstream-316c8b5503e54cdb3ee5bd3b5d81a3b7dd139294.tar.bz2
upstream-316c8b5503e54cdb3ee5bd3b5d81a3b7dd139294.zip
tools/scons: switch to Python 3
Build tested on ath79 with following packages from packages feed which build depends on scons. None of them build anymore as it seems, that the SConscripts are written for Python2. * packages/net/iotivity (KO, doesn't build even with latest 1.3.1 release) SyntaxError: invalid syntax File "/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.2.1/build_common/SConscript", line 40 print "\nError: Current system (%s) isn't supported\n" % host LookupError: unknown encoding: string_escape: File "/home/petr/testing/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.3.1/SConstruct", line 28: SConscript('build_common/SConscript') * packages/net/smartsnmpd (KO, seems dead, no commit since 2015): SyntaxError: Missing parentheses in call to 'print' File "/openwrt/build_dir/target-mips_24kc_musl/smartsnmpd-2014-08-13/SConstruct", line 156 print "Can't find liblua or liblua5.1!" * packages/utils/gpsd (KO, doesn't build even with latest 3.18.1 release): AttributeError: 'list' object has no attribute 'keys': File "/openwrt/build_dir/target-mips_24kc_musl/gpsd-3.18.1/SConstruct", line 1758: all_manpages = list(base_manpages.keys()) + list(python_manpages.keys()) Signed-off-by: Petr Štetiar <ynezz@true.cz>
-rwxr-xr-xtools/scons/files/pywrap.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/scons/files/pywrap.sh b/tools/scons/files/pywrap.sh
index f62f590e0b..53910e9472 100755
--- a/tools/scons/files/pywrap.sh
+++ b/tools/scons/files/pywrap.sh
@@ -5,11 +5,11 @@ case "${0##*/}" in
*) arg1="$0.py" ;;
esac
-for bin in python python2 python2.7 python2.6 python2.5 python2.4; do
+for bin in python python3; do
case "$($bin -V 2>&1)" in
- "Python 2"*) exec $bin $arg1 "$@" ;;
+ "Python 3"*) exec $bin $arg1 "$@" ;;
esac
done
-echo "Unable to find a Python 2.x interpreter for executing ${arg1:+$arg1 }$@ !" >&2
+echo "Unable to find a Python 3.x interpreter for executing ${arg1:+$arg1 }$@ !" >&2
exit 1