Not sure exactly what version or package this starts happening in. somewhere in the setuptools / distutils chain. When compiling in ~amd64, I get the following error: File "/var/tmp/portage/dev-libs/gobject-introspection-1.82.0-r2/work/gobject-introspection-1.82.0-build/giscanner/ccompiler.py", line 175, in __init__ compiler_name = distutils.ccompiler.get_default_compiler() ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'distutils' has no attribute 'ccompiler'. Did you mean: 'compilers'? According to a comment here: https://github.com/pypa/setuptools/issues/3583#issuecomment-1245323430 -------- The distutils module is not a submodule of setuptools, but rather a top-level module exposed by the setuptools distribution. You need to import setuptools first, to ensure the latest version of distutils is being used instead of the one in the standard library. If in the past the statement from setuptools import distutils... used to work, this was due a non-reliable side effect: in Python if a module imports another one it will "pollute" the importer's global variable scope. By expecting that setuptools module exposes setuptools.distutils.ccompiler you are requiring that the setuptools module contains an import disutils.ccompiler statement, which is an implementation detail that can vary between versions. -------- I was able to fix the compile by doing as the above post suggested and adding: import setuptools import distutils import distutils.ccompiler to giscanner/ccompiler.py This could probably be fixed by a patch, but I'm not sure if it would break compiles on systems with different versions of python or setuputils. Reproducible: Always Versions installed on my system, being used in the compile: dev-lang/python-3.13 (compiling with 3.12 gave the same result) dev-python/setuptools-75.9.0
Created attachment 920445 [details] emerge --info output
Please emerge --sync. The new version of setuptools is masked, but I think you're probably right on the actual issue (https://github.com/pypa/setuptools/issues/4871).
Confirmed that downgrading fixed the issue. I also realized that I put the wrong package name in the title. The problem was caused by code in gobject-introspection, but that package has no problem compiling with the updated setuptools. It was actually libsoup that threw the error when it tried to run the script in gobject-introspection. So I will update the ticket title just in case someone from the future comes across it.
*** This bug has been marked as a duplicate of bug 950978 ***