Bug 2137442

Summary: Packages using /usr/bin/gdbus-codegen will fail to build without distutils
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: glib2Assignee: Matthias Clasen <mclasen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: amigadave, caillon+fedoraproject, gnome-sig, mclasen, mhroncok, rhughes, rstrode, sandmann, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glib2-2.76.1-2.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-10 09:01:40 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: 2135404    

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.