summaryrefslogtreecommitdiff
path: root/recipes-devtools/python/python3_%.bbappend
diff options
context:
space:
mode:
authorMykola Salomatin <mykola.salomatin@globallogic.com>2022-05-05 12:28:37 +0300
committerMykola Salomatin <mykola.salomatin@globallogic.com>2022-05-05 12:28:37 +0300
commit76bdabe5709107f664a3d851ac2d3eb7a7073dd3 (patch)
tree43cff2ae4c3c8f104f5dd0623dbf064c6d4c1838 /recipes-devtools/python/python3_%.bbappend
parenteeb29ee4deaa89e4f10bc193fb9e6714e420aece (diff)
parentca1aadba53b3683386bc034451212b8317492a83 (diff)
downloadmeta-mlinux-76bdabe5709107f664a3d851ac2d3eb7a7073dd3.tar.gz
meta-mlinux-76bdabe5709107f664a3d851ac2d3eb7a7073dd3.tar.bz2
meta-mlinux-76bdabe5709107f664a3d851ac2d3eb7a7073dd3.zip
Merge remote-tracking branch 'origin/6' into mpower-dev-nxp
Diffstat (limited to 'recipes-devtools/python/python3_%.bbappend')
-rw-r--r--recipes-devtools/python/python3_%.bbappend17
1 files changed, 17 insertions, 0 deletions
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
+}