Since Setuptools 58+ upstream removed support for 2to3 during builds. This is breaking change and thus package is FTBFS. For more info see this change: https://fedoraproject.org/wiki/Changes/Setuptools_58%2B
This package doesn't use 2to3 to build, and builds in rawhide for me.
It seems to me it uses it: https://github.com/pybluez/pybluez/blob/0.23/setup.py#L127 And a build fails: Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.zeRqdV + umask 022 + cd /builddir/build/BUILD + cd pybluez-0.23 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' error in PyBluez setup command: use_2to3 is invalid. error: Bad exit status from /var/tmp/rpm-tmp.zeRqdV (%build) Bad exit status from /var/tmp/rpm-tmp.zeRqdV (%build) A scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=78220516
Ah, I see. Fixed.
I wonder why was this option used in the first place. The difference without it in code is only minor: --- python3-bluez-0.23-4.fc35.x86_64/usr/lib64/python3.10/site-packages/bluetooth/bluez.py 2021-07-23 07:07:42.000000000 +0200 +++ python3-bluez-0.23-5.fc36.x86_64/usr/lib64/python3.10/site-packages/bluetooth/bluez.py 2019-12-28 01:53:51.000000000 +0100 @@ -151,9 +151,9 @@ def _get_available_ports(protocol): if protocol == RFCOMM: - return list(range(1, 31)) + return range (1, 31) elif protocol == L2CAP: - return list(range(0x1001, 0x8000, 2)) + return range (0x1001, 0x8000, 2) else: return [0] (and _get_available_ports is only sued ina for loop, so the explicit cast to list() odes not add any value)
Already done in upstream, so we should be safe: https://github.com/pybluez/pybluez/commit/37d78880179b2a83e7052e0c2b9393499dd3b857