From 205d9f31d962931bd33f03f78790fd60b8428b13 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 29 Apr 2022 14:43:42 -0500 Subject: Fix python issues in mLinux --- recipes-devtools/python/python3_%.bbappend | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 recipes-devtools/python/python3_%.bbappend (limited to 'recipes-devtools') diff --git a/recipes-devtools/python/python3_%.bbappend b/recipes-devtools/python/python3_%.bbappend new file mode 100644 index 0000000..70b4561 --- /dev/null +++ b/recipes-devtools/python/python3_%.bbappend @@ -0,0 +1,17 @@ +# Make python3 the default +# Remove this stuff if there is ever a python4. + +# Debian and Ubuntu have this (prior levels linked to python2) +PACKAGES_append = " python-is-python3" +ALLOW_EMPTY_python-is-python3 = "1" +pkg_postinst_python-is-python3_append() { + ln -sf python3 $D/usr/bin/python +} + +pkg_prerm_python-is-python3_append() { + if [ -L "$D/usr/bin/python" ] ; then + if [ "$(basename $(readlink $D/usr/bin/python))" == "python3" ] ; then + rm $D/usr/bin/python + fi + fi +} -- cgit v1.2.3