Bug 2019069
| Summary: | pybluez: FTBFS in Fedora Rawhide, 2to3 removed in setuptools 58+ | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
| Component: | pybluez | Assignee: | Gwyn Ciesla <gwync> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | gwync, mhroncok, thrnciar |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-02 15:09:06 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1992484, 2016048, 2016051 | ||
|
Description
Tomáš Hrnčiar
2021-11-01 15:08:26 UTC
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 |