All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: Need advise with providing native Bluetooth sockets for Python
@ 2024-11-09 13:48 Guðni Már Gilbert
  2024-11-09 14:49 ` Guðni Már Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Guðni Már Gilbert @ 2024-11-09 13:48 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

Hi everyone,

I am upgrading a project from Scarthgap to Styhead and am facing a problem again which I somewhat solved before though not properly. And now I want to fix it for good and hopefully have the solution upstream too.

The problem: I have a Python application which needs bluetooth.h header from BlueZ (https://github.com/bluez/bluez/tree/master/lib) at compile time. This is needed by Python's configure script (https://github.com/python/cpython/blob/6293d00e7201f3f28b1f4512e57dc4f03855cabd/configure#L10937) at such that the Python installation includes support for sockets like AF_BLUETOOTH and BTPROTO_RFCOMM.

Without this, a line like the following will simply fail: sock = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)

On Scarthgap I could do this by adding bbappend for Python with: DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)}". This however is prone to creating dependency loops.

To fix this properly, I need to somehow provide only the contents of this folder: https://github.com/bluez/bluez/tree/master/lib ( https://github.com/bluez/bluez/tree/master/lib ) to Python at build-time while not depending on building BlueZ package and its dependencies. To my knowledge there is no way to use the current BlueZ recipe to do this, though I may be wrong. I am curious how others would solve this problem. Is a new recipe the best way?

[-- Attachment #2: Type: text/html, Size: 1626 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-11 17:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 13:48 Question: Need advise with providing native Bluetooth sockets for Python Guðni Már Gilbert
2024-11-09 14:49 ` Guðni Már Gilbert
2024-11-09 17:09   ` Guðni Már Gilbert
2024-11-11 13:13     ` [OE-core] " Ross Burton
2024-11-11 17:36       ` Guðni Már Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.