Package: src:gobject-introspection
Version: 1.86.0-6
User: [email protected]
Usertags: python3.15-default
Tags: patch, ftbfs, forky, sid
Severity: important
Hi!
While rebuilding the python related packages against the Python 3.15rc2
default version we found that gobject-introspection fails to build from
source [1].
It fails with this error in the test_ccompiler.py test:
Ex86_64-linux-gnu-gcc: fatal error: cannot execute 'cc1': posix_spawnp: No such
file or directory
Apparently this is due to a deprecation in setuptools. I've solved it
with a patch that uses CCompiler.call instead of spawn.
I've applied this fix in the sandbox [2] to verify that it builds
successfully, please consider applying the patch to support the upcoming
3.15 version.
Setting the severity to important for now. Once Python 3.15 becomes the
default version this bug will become release critical.
Happy hacking,
[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4716542/
[2]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: tests: Mock CCompiler.call if available
In newer setuptools distutils, CCompiler.spawn is deprecated and preprocess /
compile methods invoke CCompiler.call directly. Mock 'call' when available
so test commands are captured without attempting to run missing compilers/files.
Forwarded: no
--- a/tests/scanner/test_ccompiler.py
+++ b/tests/scanner/test_ccompiler.py
@@ -82,7 +82,8 @@
except ImportError as e:
raise unittest.SkipTest(e)
- with patch.object(distutils.ccompiler.CCompiler, 'spawn') as spawn:
+ target = 'call' if hasattr(distutils.ccompiler.CCompiler, 'call') else 'spawn'
+ with patch.object(distutils.ccompiler.CCompiler, target) as spawn:
with Environ(environ):
cc = CCompiler(compiler_name=compiler_name)
# Avoid check if target is newer from source.
@@ -103,7 +104,8 @@
except ImportError as e:
raise unittest.SkipTest(e)
- with patch.object(distutils.ccompiler.CCompiler, 'spawn') as spawn:
+ target = 'call' if hasattr(distutils.ccompiler.CCompiler, 'call') else 'spawn'
+ with patch.object(distutils.ccompiler.CCompiler, target) as spawn:
with Environ(environ):
cc = CCompiler(compiler_name=compiler_name)
# Avoid check if target is newer from source.