#69036 closed defect (fixed)
glib2 @2.78.3_1: gdbus-codegen fails with python3.12 due to distutils use
Reported by: | tenzap | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), jmroot (Joshua Root) | |
Port: | glib2 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I was trying to build gtk3 and was facing this build error.
ModuleNotFoundError: No module named 'distutils'
I had to install py-setuptools to make it build
Attachments (1)
Change History (11)
comment:1 Changed 11 months ago by jmroot (Joshua Root)
Owner: | set to mascguy |
---|---|
Status: | new → assigned |
Changed 11 months ago by tenzap
Attachment: | main.log.gz added |
---|
comment:3 Changed 11 months ago by jmroot (Joshua Root)
Cc: | ryandesign added |
---|---|
Port: | glib2 added; gtk3 removed |
Summary: | gtk3 @3.24.38_0+x11: with python3.12 it now requires setuptools module to build → glib2 @2.78.3_1: gdbus-codegen fails with python3.12 due to distutils use |
OK, so it's gdbus-codegen which is part of glib2.
comment:4 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
So what is the solution? Add py312-setuputils as a runtime dependency to glib2 and glib2-devel?
comment:5 Changed 11 months ago by jmroot (Joshua Root)
Upstream's fix was apparently to switch to packaging
. https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291
comment:6 follow-up: 7 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
So for glib2 we could do any of these:
- add a patch for that change and add py312-packaging dependency
- add py312-setuputils dependency
- revert to python311
That commit was included 2.79.0 so for glib2-devel we have a fourth option:
- update to 2.79.0 and add py312-packaging dependency
Chris, what do you want to do?
comment:7 follow-up: 8 Changed 11 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
So for glib2 we could do any of these:
- add a patch for that change and add py312-packaging dependency
- add py312-setuputils dependency
- revert to python311
That commit was included 2.79.0 so for glib2-devel we have a fourth option:
- update to 2.79.0 and add py312-packaging dependency
Chris, what do you want to do?
Still buried with work for my day job, so may not be able to look at this right away. But option 1 would be my preference.
More generally, we need to be cautious about switching to Python 3.12, particularly for foundational ports like this. (Just a general suggestion, to avoid having to scramble to fix issues.)
comment:8 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
Replying to mascguy:
Replying to ryandesign:
- add a patch for that change and add py312-packaging dependency
But option 1 would be my preference.
Ok. I may look into this in the next days if nobody else beats me to it.
More generally, we need to be cautious about switching to Python 3.12, particularly for foundational ports like this. (Just a general suggestion, to avoid having to scramble to fix issues.)
Evidently! This distutils thing seems like one big easy-to-overlook problem (it occurs with gobject-introspection too in #69105), and syntax warnings due to lack of use of raw strings is another big one I've seen several times already in other ports. I was trying to be helpful but I should have remembered that I don't understand Python so I've discontinued my effort to switch ports to Python 3.12 and will leave it for those more knowledgeable.
comment:9 Changed 10 months ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:10 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jmroot added |
---|
Thank you!
The same change (or an update to version 2.79.0 or later) is still needed in glib2-devel.
Distutils was of course removed from the Python stdlib in 3.12. But gtk3 doesn't directly depend on Python, so a log would be useful to see what is actually using this.