When bluetooth is in DISTRO_FEATURES, Python should enable support for Bluetooth sockets in the socket library. To enable AF_BLUETOOTH socket family and its protocols, bluetooth.h header needs to be available at build-time.
With this change a Python application can open and use Bluetooth sockets natively without using 3rd party packages like pybluez. An example is the following line: sock = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) With this patch the code will not fail due to missing symbols. Signed-off-by: Guðni Már Gilbert <gudni....@gmail.com> --- meta/recipes-devtools/python/python3_3.13.0.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-devtools/python/python3_3.13.0.bb b/meta/recipes-devtools/python/python3_3.13.0.bb index 54742f5257..8a98386576 100644 --- a/meta/recipes-devtools/python/python3_3.13.0.bb +++ b/meta/recipes-devtools/python/python3_3.13.0.bb @@ -71,6 +71,9 @@ DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virt DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" +# Enable support for AF_BLUETOOTH socket family +DEPENDS:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5-native', '', d)}" + EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#206965): https://lists.openembedded.org/g/openembedded-core/message/206965 Mute This Topic: https://lists.openembedded.org/mt/109519521/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-