]> code.ossystems Code Review - openembedded-core.git/commitdiff
bluez5: switch to Python 3
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Thu, 2 Jun 2016 09:25:45 +0000 (12:25 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jun 2016 10:45:25 +0000 (11:45 +0100)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/bluez5/bluez5.inc

index b3cd8ed5ca510ec230ad66238588f82602d36c3c..92e360ae1688237ac17ce9f0c2b192ecac43585f 100644 (file)
@@ -69,6 +69,10 @@ do_install_append() {
         for f in ${NOINST_TOOLS} ; do
            install -m 755 ${B}/$f ${D}/${bindir}
        done
+
+        # Patch python tools to use Python 3; they should be source compatible, but
+        # still refer to Python 2 in the shebang
+        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/*
 }
 
 ALLOW_EMPTY_libasound-module-bluez = "1"
@@ -99,7 +103,7 @@ def get_noinst_tools_paths (d, bb, tools):
 
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
 
-RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
 
 SYSTEMD_SERVICE_${PN} = "bluetooth.service"
 INITSCRIPT_PACKAGES = "${PN}"