Bug 2152674 - libnbd fails to build with Python 3.12: ModuleNotFoundError: No module named 'distutils'
Summary: libnbd fails to build with Python 3.12: ModuleNotFoundError: No module named ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libnbd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-12-12 16:18 UTC by Tomáš Hrnčiar
Modified: 2023-01-03 13:55 UTC (History)
4 users (show)

Fixed In Version: libnbd-1.15.8-3.fc38
Clone Of:
Environment:
Last Closed: 2023-01-03 13:55:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-12-12 16:18:17 UTC
libnbd fails to build with Python 3.12.0a3.

checking for Python site-packages path... Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils'

checking for Python extension suffix (PEP-3149)... Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils'

Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 “Deprecate distutils module”. For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. (Contributed by Victor Stinner in gh-92584.)

https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05119261-libnbd/

For all our attempts to build libnbd with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/libnbd/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Richard W.M. Jones 2022-12-12 16:21:23 UTC
Likely needs a similar change to the one we made in libguestfs:

https://github.com/libguestfs/libguestfs/commit/26940f64a740676103b0ee49bf0ca5ac4e297841

Comment 2 Richard W.M. Jones 2023-01-03 13:33:05 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=95738535

Comment 3 Richard W.M. Jones 2023-01-03 13:40:44 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=95738588

Comment 4 Fedora Update System 2023-01-03 13:48:24 UTC
FEDORA-2023-485e157f45 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-485e157f45

Comment 5 Fedora Update System 2023-01-03 13:55:30 UTC
FEDORA-2023-485e157f45 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.