Package: src:meson-python
Version: meson-python 0.13.2-1
Severity: important
Tags: sid trixie
User: debian-pyt...@lists.debian.org
Usertags: python3.12
meson-python fails tests with Python 3.12. Log attached.
Updating to 0.15.0 doesn't help with this issue.
[...]
+ meson setup
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple/build/cp312
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple/build/cp312/meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple
Build dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple/build/cp312
Build type: native build
Project name: simple
Project version: 1.0.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (/usr/bin/python3.12)
Build targets in project: 0
simple 1.0.0
User defined options
Native files:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/simple/build/cp312/meson-python-native-file.ini
buildtype : release
b_ndebug : if-release
b_vscrt : md
Found ninja-1.11.1 at /usr/bin/ninja
+ /usr/bin/ninja
ninja: no work to do.
The virtual environment was not created successfully because ensurepip
is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.12-venv
You may need to use sudo with that command. After installing the
python3-venv
package, recreate your virtual environment.
Failing command:
/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv0/bin/python3.12
___________________ ERROR at setup of test_editble_reentrant
___________________
self = <tests.conftest.VEnv object at 0x7f0d4b125820>
context =
namespace(env_dir='/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1',
env_name='mesonpy-test-venv1',
prompt='(mesonpy...d/pytest-0/mesonpy-test-venv1/bin/python3.12',
cfg_path='/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/pyvenv.cfg')
def _setup_pip(self, context):
"""Installs or upgrades pip in a virtual environment"""
try:
> self._call_new_python(context, '-m', 'ensurepip', '--upgrade',
'--default-pip',
stderr=subprocess.STDOUT)
/usr/lib/python3.12/venv/__init__.py:360:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3.12/venv/__init__.py:355: in _call_new_python
subprocess.check_output(args, **kwargs)
/usr/lib/python3.12/subprocess.py:466: in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs =
(['/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/bin/python3.12',
'-m', 'ensurepip', '--upgrade', '--default-pip'],)
kwargs = {'cwd': '/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1',
'env': {'APT_CONFIG': '/var/lib/sbuild/apt.conf', 'ASFLAG...ild/ccache',
...}, 'executable':
'/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/bin/python3.12',
'stderr': -2, ...}
process = <Popen: returncode: 1 args:
['/tmp/pytest-of-buildd/pytest-0/mesonpy-test-ve...>
stdout =
b'/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/bin/python3.12: No
module named ensurepip\n'
stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None,
check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess
instance.
The returned instance will have attributes args, returncode,
stdout and
stderr. By default, stdout and stderr are not captured, and
those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to
capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the
return code
in the returncode attribute, and output & stderr attributes if
those streams
were captured.
If timeout is given, and the process takes too long, a
TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use
this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any
"input" should
be bytes, and the stdout and stderr will be bytes. If in text
mode, any
"input" should be a string, and stdout and stderr will be
strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or
universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not
both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr')
is not None:
raise ValueError('stdout and stderr arguments may not
be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input,
timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads.
communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled
that.
process.kill()
# We don't call process.wait() as .__exit__ does that
for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command
'['/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/bin/python3.12',
'-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit
status 1.
/usr/lib/python3.12/subprocess.py:571: CalledProcessError
During handling of the above exception, another exception occurred:
tmp_path_factory = TempPathFactory(_given_basetemp=None,
_trace=<pluggy._tracing.TagTracerSub object at 0x7f0d4b629d60>,
_basetemp=PosixPath('/tmp/pytest-of-buildd/pytest-0'),
_retention_count=3, _retention_policy='all')
@pytest.fixture()
def venv(tmp_path_factory):
path = pathlib.Path(tmp_path_factory.mktemp('mesonpy-test-venv'))
> return VEnv(path)
tests/conftest.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
tests/conftest.py:85: in __init__
self.create(env_dir)
/usr/lib/python3.12/venv/__init__.py:76: in create
self._setup_pip(context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
self = <tests.conftest.VEnv object at 0x7f0d4b125820>
context =
namespace(env_dir='/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1',
env_name='mesonpy-test-venv1',
prompt='(mesonpy...d/pytest-0/mesonpy-test-venv1/bin/python3.12',
cfg_path='/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/pyvenv.cfg')
def _setup_pip(self, context):
"""Installs or upgrades pip in a virtual environment"""
try:
self._call_new_python(context, '-m', 'ensurepip',
'--upgrade',
'--default-pip',
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as err:
stdlib = sysconfig.get_path('stdlib')
if not os.path.exists(f'{stdlib}/ensurepip/__main__.py'):
print("""\
The virtual environment was not created successfully because
ensurepip is not
available. On Debian/Ubuntu systems, you need to install the
python3-venv
package using the following command.
apt install python{}-venv
You may need to use sudo with that command. After installing the
python3-venv
package, recreate your virtual environment.
Failing command: {}
""".format(sysconfig.get_python_version(), context.env_exec_cmd))
> sys.exit(1)
E SystemExit: 1
/usr/lib/python3.12/venv/__init__.py:377: SystemExit
---------------------------- Captured stdout setup
-----------------------------
Initialized empty Git repository in
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build/.git/
+ meson setup
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build/build/cp312
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build/build/cp312/meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build
Build dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build/build/cp312
Build type: native build
Project name: imports-itself-during-build
Project version: 1.0.0
C compiler for the host machine: cc (gcc 13.2.0 "cc (Ubuntu
13.2.0-6ubuntu1) 13.2.0")
C linker for the host machine: cc ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (/usr/bin/python3.12)
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency python found: YES 3.12
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
Build targets in project: 1
imports-itself-during-build 1.0.0
User defined options
Native files:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/imports-itself-during-build/build/cp312/meson-python-native-file.ini
buildtype : release
b_ndebug : if-release
b_vscrt : md
Found ninja-1.11.1 at /usr/bin/ninja
+ /usr/bin/ninja
[1/2] Compiling C object plat.cpython-312-x86_64-linux-gnu.so.p/plat.c.o
[2/2] Linking target plat.cpython-312-x86_64-linux-gnu.so
The virtual environment was not created successfully because ensurepip
is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.12-venv
You may need to use sudo with that command. After installing the
python3-venv
package, recreate your virtual environment.
Failing command:
/tmp/pytest-of-buildd/pytest-0/mesonpy-test-venv1/bin/python3.12
=========================== short test summary info
============================
SKIPPED [1] tests/test_consistency.py:17: Fails when source is copied
into a build directory by pybuild
SKIPPED [1] tests/test_project.py:225: Requires MSVC
SKIPPED [1] tests/test_tags.py:36: macOS specific test
SKIPPED [1] tests/test_tags.py:47: macOS specific test
SKIPPED [1] tests/test_wheel.py:145: FIXME: Needs more investigation to
pass in Debian
SKIPPED [2] tests/test_wheel.py:245: macOS specific test
XFAIL tests/test_examples.py::test_spam - FIXME: Needs more
investigation to pass in Debian
XFAIL
tests/test_pep518.py::test_pep518[sdist_to_wheel-purelib-and-platlib] -
FIXME: Needs more investigation to pass in Debian
XFAIL
tests/test_pep518.py::test_pep518[wheel_directly-purelib-and-platlib] -
FIXME: Needs more investigation to pass in Debian
ERROR tests/test_editable.py::test_editable_install - SystemExit: 1
ERROR tests/test_editable.py::test_editble_reentrant - SystemExit: 1
============= 78 passed, 7 skipped, 3 xfailed, 2 errors in 42.27s
==============
E: pybuild pybuild:395: test: plugin pyproject failed with: exit code=1:
cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build; python3.12 -m
pytest tests