python3: enable bluetooth support by default
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Sat, 25 Sep 2021 08:18:51 +0000 (11:18 +0300)
committerRosen Penev <rosenp@gmail.com>
Mon, 27 Sep 2021 18:01:07 +0000 (11:01 -0700)
commita1d32499ca164fb7deee268d5b983dffb636c21b
tree3d956e3a922fc091bd5f71487b0265243eaa2fb5
parent12c5ed9a4c971a5cf314831a1a01d851be976120
python3: enable bluetooth support by default

Bluetooth support requires bluez-libs present, but they are only required
for the build, and don't seem to be needed to be present on the target.

There isn't any linking required to libbluetooth. It's only the bluetooth.h
header that is required for building BT support into Python.

For testing, this snippet was used from `Lib/test/test_socket.py` (inside
cpython):
```
def _have_socket_bluetooth():
    """Check whether AF_BLUETOOTH sockets are supported on this host."""
    try:
        # RFCOMM is supported by all platforms with bluetooth support. Windows
        # does not support omitting the protocol.
        s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)
    except (AttributeError, OSError):
        return False
    else:
        s.close()
    return True
```

Fixes: https://github.com/openwrt/packages/issues/16544
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python3/Config-python3-light.in
lang/python/python3/Makefile