Bug 2137442 - Packages using /usr/bin/gdbus-codegen will fail to build without distutils
Summary: Packages using /usr/bin/gdbus-codegen will fail to build without distutils
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 38
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-10-24 23:15 UTC by Robert Scheck
Modified: 2023-04-10 09:01 UTC (History)
9 users (show)

Fixed In Version: glib2-2.76.1-2.fc39
Clone Of:
Environment:
Last Closed: 2023-04-10 09:01:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert Scheck 2022-10-24 23:15:29 UTC
Description of problem:
The Python standard library distutils module will be removed from Python 3.12+

https://peps.python.org/pep-0632/

As preparatory work, the Python SIG builds all python packages in a Copr repository with Python 3.11 sans distutils.

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/

Packages, such as baresip, will fail to build due to:

cd /builddir/build/BUILD/baresip-2.8.2/redhat-linux-build/modules/ctrl_dbus && gdbus-codegen --generate-c-code baresipbus --c-namespace DBus --interface-prefix com.github. /builddir/build/BUILD/baresip-2.8.2/modules/ctrl_dbus/com.github.Baresip.xml
Traceback (most recent call last):
  File "/usr/bin/gdbus-codegen", line 53, in <module>
    from codegen import codegen_main
  File "/usr/share/glib-2.0/codegen/codegen_main.py", line 29, in <module>
    from . import dbustypes
  File "/usr/share/glib-2.0/codegen/dbustypes.py", line 22, in <module>
    from . import utils
  File "/usr/share/glib-2.0/codegen/utils.py", line 22, in <module>
    import distutils.version
ModuleNotFoundError: No module named 'distutils'

Version-Release number of selected component:
glib2-devel-2.74.0-3.fc38

How reproducible:
Build baresip without distutils

Steps to Reproduce:
1. fedpkg clone baresip && cd baresip
2. mock -r fedora-rawhide-x86_64 init
3. mock -r fedora-rawhide-x86_64 install python3-devel
4. sudo rm -rf /var/lib/mock/fedora-rawhide-x86_64/root/usr/lib64/python3.11/distutils/
4. fedpkg mockbuild -N

Actual results:
baresip fails to build, ModuleNotFoundError: No module named 'distutils'

Expected results:
baresip builds fine

Comment 1 Ben Cotton 2023-02-07 14:57:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.


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