Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922654 - dev-libs/glib-2.78.4: ModuleNotFoundError: No module named 'distutils'
Summary: dev-libs/glib-2.78.4: ModuleNotFoundError: No module named 'distutils'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 922696 922716 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-01-22 00:23 UTC by yongxiang
Modified: 2024-01-22 20:25 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,87.14 KB, text/x-log)
2024-01-22 00:24 UTC, yongxiang
Details
emerge --info (emerge-info,8.96 KB, text/plain)
2024-01-22 00:25 UTC, yongxiang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yongxiang 2024-01-22 00:23:54 UTC
[19/547] /tmp/portage/dev-libs/glib-2.78.4/temp/python3.12/bin/python3 gio/gdbus-2.0/codegen/gdbus-codegen --interface-prefix org.freedesktop.portal. --output-direc
tory gio --generate-c-code xdp-dbus --c-namespace GXdp ../glib-2.78.4/gio/org.freedesktop.portal.Documents.xml ../glib-2.78.4/gio/org.freedesktop.portal.OpenURI.xml
 ../glib-2.78.4/gio/org.freedesktop.portal.ProxyResolver.xml ../glib-2.78.4/gio/org.freedesktop.portal.Trash.xml
FAILED: gio/xdp-dbus.h gio/xdp-dbus.c
/tmp/portage/dev-libs/glib-2.78.4/temp/python3.12/bin/python3 gio/gdbus-2.0/codegen/gdbus-codegen --interface-prefix org.freedesktop.portal. --output-directory gio
--generate-c-code xdp-dbus --c-namespace GXdp ../glib-2.78.4/gio/org.freedesktop.portal.Documents.xml ../glib-2.78.4/gio/org.freedesktop.portal.OpenURI.xml ../glib-
2.78.4/gio/org.freedesktop.portal.ProxyResolver.xml ../glib-2.78.4/gio/org.freedesktop.portal.Trash.xml
Traceback (most recent call last):
  File "/tmp/portage/dev-libs/glib-2.78.4/work/glib-2.78.4-abi_x86_32.x86/gio/gdbus-2.0/codegen/gdbus-codegen", line 53, in <module>
    from codegen import codegen_main
  File "/tmp/portage/dev-libs/glib-2.78.4/work/glib-2.78.4-abi_x86_32.x86/gio/gdbus-2.0/codegen/codegen_main.py", line 29, in <module>
    from . import dbustypes
  File "/tmp/portage/dev-libs/glib-2.78.4/work/glib-2.78.4-abi_x86_32.x86/gio/gdbus-2.0/codegen/dbustypes.py", line 22, in <module>
    from . import utils
  File "/tmp/portage/dev-libs/glib-2.78.4/work/glib-2.78.4-abi_x86_32.x86/gio/gdbus-2.0/codegen/utils.py", line 22, in <module>
    import distutils.version
ModuleNotFoundError: No module named 'distutils'

Reproducible: Always
Comment 1 yongxiang 2024-01-22 00:24:41 UTC
Created attachment 882808 [details]
build.log
Comment 2 yongxiang 2024-01-22 00:25:22 UTC
Created attachment 882809 [details]
emerge --info
Comment 3 Gary E. Miller 2024-01-22 02:30:28 UTC Comment hidden (obsolete)
Comment 4 Patrice Levesque 2024-01-22 02:35:14 UTC
Distutils was removed from python-3.12: https://docs.python.org/3/whatsnew/3.12.html

I still use python-3.11 so I haven't experienced the issue, but you might want to temporarily `eselect` an older version of python to compile the package.
Comment 5 Gary E. Miller 2024-01-22 02:50:47 UTC
I'm in no rush to update my glib.  I'll just wait for the fix.
Comment 6 email200202 2024-01-22 03:08:58 UTC
Same here
Comment 7 matoro archtester 2024-01-22 03:54:41 UTC
This will still occur even if you have PYTHON_TARGETS=python3_11 PYTHON_SINGLE_TARGET=python3_11 unless you explicitly have 3.12 masked due to bug 702806
Comment 8 Nick Hadaway 2024-01-22 04:17:29 UTC
Confirmed uninstallation of python-3.12 allows for glib to build properly.
Comment 9 Larry the Git Cow gentoo-dev 2024-01-22 05:52:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11641c3d40b399e3eacef4cecf256b5f2b4b5aa3

commit 11641c3d40b399e3eacef4cecf256b5f2b4b5aa3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-22 05:51:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-22 05:51:57 +0000

    dev-libs/glib: fix Python 3.12 build w/o setuptools
    
    Closes: https://bugs.gentoo.org/922654
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/glib/files/glib-2.78.4-distutils.patch    | 36 ++++++++++++++++++++++
 .../{glib-2.78.4.ebuild => glib-2.78.4-r1.ebuild}  |  8 +++++
 2 files changed, 44 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2024-01-22 11:27:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2a3cfe3b625829a894f700da57795327a9cbe92

commit d2a3cfe3b625829a894f700da57795327a9cbe92
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-22 11:25:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-22 11:26:10 +0000

    dev-util/gdbus-codegen: patch out distutils use
    
    Just like the fix from bug #922654, but utils.py gets installed, so we need
    to make sure we both patch it here too & add dev-python/packaging to RDEPEND.
    
    Thanks to leio for pointing it out.
    
    Bug: https://bugs.gentoo.org/919904
    Bug: https://bugs.gentoo.org/922654
    Fixes: 214971a1af7edd43d423a590d17f8cff8f36526e
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/gdbus-codegen-2.78.4-distutils.patch     | 36 ++++++++++++++++++++++
 ....78.4.ebuild => gdbus-codegen-2.78.4-r1.ebuild} |  8 ++++-
 2 files changed, 43 insertions(+), 1 deletion(-)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-22 13:31:45 UTC
*** Bug 922696 has been marked as a duplicate of this bug. ***
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-22 18:49:46 UTC
*** Bug 922716 has been marked as a duplicate of this bug. ***
Comment 13 Gary E. Miller 2024-01-22 20:25:38 UTC
Works for me now.  Thanks Sam!