Package: src:meson-python
Version: 0.15.0-1
Severity: serious
Tags: ftbfs
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary
dh binary --with sphinxdoc --buildsystem=pybuild
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build"
module
I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel
--outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy --config-setting
compile-args=--verbose --config-setting setup-args=--wrap-mode=nodownload --config-setting
setup-args=--prefix=/usr --config-setting setup-args=--sysconfdir=/etc --config-setting
setup-args=--localstatedir=/var --config-setting setup-args=--libdir=lib/x86_64-linux-gnu
* Building wheel...
+ meson setup /<<PKGBUILDDIR>> /<<PKGBUILDDIR>>/.mesonpy-yf0sm3kx -Dbuildtype=release
-Db_ndebug=if-release -Db_vscrt=md --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--libdir=lib/x86_64-linux-gnu
--native-file=/<<PKGBUILDDIR>>/.mesonpy-yf0sm3kx/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir: /<<PKGBUILDDIR>>
Build dir: /<<PKGBUILDDIR>>/.mesonpy-yf0sm3kx
Build type: native build
Project name: meson-python
Project version: 0.15.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
meson-python 0.15.0
User defined options
Native files :
/<<PKGBUILDDIR>>/.mesonpy-yf0sm3kx/meson-python-native-file.ini
buildtype : release
libdir : lib/x86_64-linux-gnu
localstatedir: /var
prefix : /usr
sysconfdir : /etc
wrap_mode : nodownload
b_ndebug : if-release
b_vscrt : md
Found ninja-1.12.1 at /usr/bin/ninja
+ /usr/bin/ninja --verbose
ninja: no work to do.
[1/7] /<<PKGBUILDDIR>>/mesonpy/__init__.py
[2/7] /<<PKGBUILDDIR>>/mesonpy/_compat.py
[3/7] /<<PKGBUILDDIR>>/mesonpy/_editable.py
[4/7] /<<PKGBUILDDIR>>/mesonpy/_rpath.py
[5/7] /<<PKGBUILDDIR>>/mesonpy/_tags.py
[6/7] /<<PKGBUILDDIR>>/mesonpy/_util.py
[7/7] /<<PKGBUILDDIR>>/mesonpy/_wheelfile.py
Successfully built meson_python-0.15.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with
"installer" module
I: pybuild plugin_pyproject:129: Building wheel for python3.11 with "build"
module
I: pybuild base:311: python3.11 -m build --skip-dependency-check --no-isolation --wheel
--outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy --config-setting
compile-args=--verbose --config-setting setup-args=--wrap-mode=nodownload --config-setting
setup-args=--prefix=/usr --config-setting setup-args=--sysconfdir=/etc --config-setting
setup-args=--localstatedir=/var --config-setting setup-args=--libdir=lib/x86_64-linux-gnu
* Building wheel...
+ meson setup /<<PKGBUILDDIR>> /<<PKGBUILDDIR>>/.mesonpy-_weco7n6 -Dbuildtype=release
-Db_ndebug=if-release -Db_vscrt=md --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--libdir=lib/x86_64-linux-gnu
--native-file=/<<PKGBUILDDIR>>/.mesonpy-_weco7n6/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir: /<<PKGBUILDDIR>>
Build dir: /<<PKGBUILDDIR>>/.mesonpy-_weco7n6
Build type: native build
Project name: meson-python
Project version: 0.15.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (/usr/bin/python3.11)
Build targets in project: 0
meson-python 0.15.0
User defined options
Native files :
/<<PKGBUILDDIR>>/.mesonpy-_weco7n6/meson-python-native-file.ini
buildtype : release
libdir : lib/x86_64-linux-gnu
localstatedir: /var
prefix : /usr
sysconfdir : /etc
wrap_mode : nodownload
b_ndebug : if-release
b_vscrt : md
Found ninja-1.12.1 at /usr/bin/ninja
+ /usr/bin/ninja --verbose
ninja: no work to do.
[1/7] /<<PKGBUILDDIR>>/mesonpy/__init__.py
[2/7] /<<PKGBUILDDIR>>/mesonpy/_compat.py
[3/7] /<<PKGBUILDDIR>>/mesonpy/_editable.py
[4/7] /<<PKGBUILDDIR>>/mesonpy/_rpath.py
[5/7] /<<PKGBUILDDIR>>/mesonpy/_tags.py
[6/7] /<<PKGBUILDDIR>>/mesonpy/_util.py
[7/7] /<<PKGBUILDDIR>>/mesonpy/_wheelfile.py
Successfully built meson_python-0.15.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.11 with
"installer" module
debian/rules execute_after_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs/
build/html
Running Sphinx v7.2.6
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 30 source files that are out of date
updating environment: [new config] 30 added, 0 changed, 0 removed
[2Kreading sources... [ 3%] about
[2Kreading sources... [ 7%] changelog
[2Kreading sources... [ 10%] contributing/commit-format
[2Kreading sources... [ 13%] contributing/documentation
[2Kreading sources... [ 17%] contributing/getting-started
[2Kreading sources... [ 20%] contributing/index
[2Kreading sources... [ 23%] contributing/release-process
[2Kreading sources... [ 27%] contributing/test-suite
[2Kreading sources... [ 30%] explanations/default-options
[2Kreading sources... [ 33%] explanations/design
[2Kreading sources... [ 37%] explanations/design-old
[2Kreading sources... [ 40%] explanations/editable-installs
[2Kreading sources... [ 43%] explanations/internal-dependencies
[2Kreading sources... [ 47%] how-to-guides/build-directory
[2Kreading sources... [ 50%] how-to-guides/config-settings
[2Kreading sources... [ 53%] how-to-guides/debug-builds
[2Kreading sources... [ 57%] how-to-guides/editable-installs
[2Kreading sources... [ 60%] how-to-guides/first-project
[2Kreading sources... [ 63%] how-to-guides/meson-args
[2Kreading sources... [ 67%] index
[2Kreading sources... [ 70%] projects-using-meson-python
[2Kreading sources... [ 73%] reference/config-settings
[2Kreading sources... [ 77%] reference/environment-variables
[2Kreading sources... [ 80%] reference/limitations
[2Kreading sources... [ 83%] reference/meson-compatibility
[2Kreading sources... [ 87%] reference/pyproject-settings
[2Kreading sources... [ 90%] reference/quirks
[2Kreading sources... [ 93%] tutorials/entrypoints
[2Kreading sources... [ 97%] tutorials/executable
[2Kreading sources... [100%] tutorials/introduction
looking for now-outdated files... none found
pickling environment... done
checking consistency... /<<PKGBUILDDIR>>/docs/contributing/commit-format.rst:
WARNING: document isn't included in any toctree
/<<PKGBUILDDIR>>/docs/contributing/getting-started.rst: WARNING: document isn't
included in any toctree
/<<PKGBUILDDIR>>/docs/contributing/test-suite.rst: WARNING: document isn't
included in any toctree
/<<PKGBUILDDIR>>/docs/explanations/design.rst: WARNING: document isn't included
in any toctree
/<<PKGBUILDDIR>>/docs/explanations/editable-installs.rst: WARNING: document
isn't included in any toctree
/<<PKGBUILDDIR>>/docs/explanations/internal-dependencies.rst: WARNING: document
isn't included in any toctree
/<<PKGBUILDDIR>>/docs/how-to-guides/build-directory.rst: WARNING: document
isn't included in any toctree
/<<PKGBUILDDIR>>/docs/reference/quirks.rst: WARNING: document isn't included in
any toctree
/<<PKGBUILDDIR>>/docs/tutorials/entrypoints.rst: WARNING: document isn't
included in any toctree
/<<PKGBUILDDIR>>/docs/tutorials/executable.rst: WARNING: document isn't
included in any toctree
done
preparing documents... WARNING: unsupported theme option 'light_css_variables'
given
done
copying assets... copying static files... done
copying extra files... done
done
[2Kwriting output... [ 3%] about
[2Kwriting output... [ 7%] changelog
[2Kwriting output... [ 10%] contributing/commit-format
[2Kwriting output... [ 13%] contributing/documentation
[2Kwriting output... [ 17%] contributing/getting-started
[2Kwriting output... [ 20%] contributing/index
[2Kwriting output... [ 23%] contributing/release-process
[2Kwriting output... [ 27%] contributing/test-suite
[2Kwriting output... [ 30%] explanations/default-options
[2Kwriting output... [ 33%] explanations/design
[2Kwriting output... [ 37%] explanations/design-old
[2Kwriting output... [ 40%] explanations/editable-installs
[2Kwriting output... [ 43%] explanations/internal-dependencies
[2Kwriting output... [ 47%] how-to-guides/build-directory
[2Kwriting output... [ 50%] how-to-guides/config-settings
[2Kwriting output... [ 53%] how-to-guides/debug-builds
[2Kwriting output... [ 57%] how-to-guides/editable-installs
[2Kwriting output... [ 60%] how-to-guides/first-project
[2Kwriting output... [ 63%] how-to-guides/meson-args
[2Kwriting output... [ 67%] index
[2Kwriting output... [ 70%] projects-using-meson-python
[2Kwriting output... [ 73%] reference/config-settings
[2Kwriting output... [ 77%] reference/environment-variables
[2Kwriting output... [ 80%] reference/limitations
[2Kwriting output... [ 83%] reference/meson-compatibility
[2Kwriting output... [ 87%] reference/pyproject-settings
[2Kwriting output... [ 90%] reference/quirks
[2Kwriting output... [ 93%] tutorials/entrypoints
[2Kwriting output... [ 97%] tutorials/executable
[2Kwriting output... [100%] tutorials/introduction
/<<PKGBUILDDIR>>/docs/contributing/release-process.rst:16: WARNING: undefined
label: 'security'
/<<PKGBUILDDIR>>/docs/tutorials/executable.rst:20: WARNING: undefined label:
'how-to-guides-executable-with-internal-dependencies'
generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 13 warnings.
The HTML pages are in build/html.
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build;
python3.12 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.1.2, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build
configfile: pyproject.toml
plugins: mock-3.12.0
collected 98 items
tests/test_consistency.py . [ 1%]
tests/test_editable.py ......... [ 10%]
tests/test_examples.py x [ 11%]
tests/test_metadata.py ....F [ 16%]
tests/test_options.py ... [ 19%]
tests/test_output.py ......... [ 28%]
tests/test_pep517.py ............. [ 41%]
tests/test_project.py ............s [ 55%]
tests/test_sdist.py .F...... [ 63%]
tests/test_tags.py .ss..... [ 71%]
tests/test_wheel.py ...............ss........ [ 96%]
tests/test_wheelfile.py ... [100%]
=================================== FAILURES ===================================
_____________________________ test_missing_version _____________________________
package_missing_version =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/missing-version')
def test_missing_version(package_missing_version):
pyproject = {'project': {
'name': 'missing-version',
}}
with pytest.raises(pyproject_metadata.ConfigurationError, match='Required
"project.version" field is missing'):
Metadata.from_pyproject(pyproject, pathlib.Path())
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/test_metadata.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/mesonpy/__init__.py:230:
in from_pyproject
metadata = super().from_pyproject(data, project_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'mesonpy.Metadata'>
data = {'project': {'name': 'missing-version'}}, project_dir = PosixPath('.')
metadata_version = None
@classmethod
def from_pyproject(
cls,
data: Mapping[str, Any],
project_dir: str | os.PathLike[str] = os.path.curdir,
metadata_version: str | None = None,
) -> Self:
fetcher = DataFetcher(data)
project_dir = pathlib.Path(project_dir)
if 'project' not in fetcher:
msg = 'Section "project" missing in pyproject.toml'
raise ConfigurationError(msg)
dynamic = fetcher.get_list('project.dynamic')
if 'name' in dynamic:
msg = 'Unsupported field "name" in "project.dynamic"'
raise ConfigurationError(msg)
for field in dynamic:
if field in data['project']:
msg = f'Field "project.{field}" declared as dynamic in
"project.dynamic" but is defined'
raise ConfigurationError(msg)
name = fetcher.get_str('project.name')
if not name:
msg = 'Field "project.name" missing'
raise ConfigurationError(msg)
version_string = fetcher.get_str('project.version')
requires_python_string = fetcher.get_str('project.requires-python')
version = packaging.version.Version(version_string) if version_string
else None
if version is None and 'version' not in dynamic:
msg = 'Field "project.version" missing and "version" not specified in
"project.dynamic"'
raise ConfigurationError(msg)
E pyproject_metadata.ConfigurationError: Field "project.version" missing and
"version" not specified in "project.dynamic"
/usr/lib/python3/dist-packages/pyproject_metadata/__init__.py:242:
ConfigurationError
During handling of the above exception, another exception occurred:
package_missing_version =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/missing-version')
def test_missing_version(package_missing_version):
pyproject = {'project': {
'name': 'missing-version',
}}
with pytest.raises(pyproject_metadata.ConfigurationError, match='Required
"project.version" field is missing'):
E AssertionError: Regex pattern did not match.
E Regex: 'Required "project.version" field is missing'
E Input: 'Field "project.version" missing and "version" not specified in
"project.dynamic"'
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/test_metadata.py:51:
AssertionError
_________________________________ test_pep621 __________________________________
sdist_full_metadata =
PosixPath('/tmp/pytest-of-buildd/pytest-0/test0/mesonpy-test-sn6lrr_x/full_metadata-1.2.3.tar.gz')
def test_pep621(sdist_full_metadata):
with tarfile.open(sdist_full_metadata, 'r:gz') as sdist:
sdist_pkg_info =
sdist.extractfile('full_metadata-1.2.3/PKG-INFO').read().decode()
assert sdist_pkg_info == textwrap.dedent('''\
Metadata-Version: 2.1
Name: full-metadata
Version: 1.2.3
Summary: Some package with all of the PEP 621 metadata
Keywords: full metadata
Home-page: https://example.com
Author: Jane Doe
Author-Email: Unknown <jhon....@example.com>
Maintainer-Email: Jane Doe <jane....@example.com>
License: some license
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Project-URL: Homepage, https://example.com
Project-URL: Documentation, https://readthedocs.org
Project-URL: Repository, https://github.com/mesonbuild/meson-python
Project-URL: Changelog,
https://github.com/mesonbuild/meson-python/blob/master/CHANGELOG.rst
Requires-Python: >=3.7
Requires-Dist: a
Requires-Dist: b>1
Requires-Dist: c>2; os_name != "nt"
Requires-Dist: d<3; extra == "test"
Requires-Dist: e[all]; extra == "test"
Provides-Extra: test
Description-Content-Type: text/markdown
<!--
SPDX-FileCopyrightText: 2021 The meson-python developers
SPDX-License-Identifier: MIT
-->
# full-metadata
An example package with all of the PEP 621 metadata!
''')
E AssertionError: assert 'Metadata-Ver...1 metadata!\n' ==
'Metadata-Ver...1 metadata!\n'
E
E Skipping 116 identical leading characters in diff, use -v to show
E Skipping 906 identical trailing characters in diff, use -v to show
E - ords: full metadata
E ? ^
E + ords: full,metadata
E ? ^
tests/test_sdist.py:33: AssertionError
---------------------------- Captured stdout setup -----------------------------
Initialized empty Git repository in
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.git/
+ meson setup /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.mesonpy-989fqevp
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.mesonpy-989fqevp/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata
Build dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.mesonpy-989fqevp
Build type: native build
Project name: full-metadata
Project version: 1.0.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 0
full-metadata 1.0.0
User defined options
Native files:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.mesonpy-989fqevp/meson-python-native-file.ini
buildtype : release
b_ndebug : if-release
b_vscrt : md
Found ninja-1.12.1 at /usr/bin/ninja
+ meson dist --allow-dirty --no-tests --formats gztar
Created
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/tests/packages/full-metadata/.mesonpy-989fqevp/meson-dist/full-metadata-1.0.0.tar.gz
================================== XFAILURES ===================================
__________________________________ test_spam ___________________________________
venv = <tests.conftest.VEnv object at 0x7fc5f4ef5d00>
tmp_path = PosixPath('/tmp/pytest-of-buildd/pytest-0/test_spam0')
@pytest.mark.xfail(reason="FIXME: Needs more investigation to pass in
Debian")
def test_spam(venv, tmp_path):
"""Test that the wheel for the example builds, installs, and imports."""
with chdir(examples_dir / 'spam'):
tests/test_examples.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/docs/examples/spam')
@contextlib.contextmanager
def chdir(path: Path) -> Iterator[Path]:
"""Context manager helper to change the current working directory --
cd."""
old_cwd = os.getcwd()
os.chdir(os.fspath(path))
E FileNotFoundError: [Errno 2] No such file or directory:
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build/docs/examples/spam'
mesonpy/_util.py:30: FileNotFoundError
=========================== short test summary info ============================
SKIPPED [1] tests/test_project.py:204: Requires MSVC
SKIPPED [1] tests/test_tags.py:46: macOS specific test
SKIPPED [1] tests/test_tags.py:57: macOS specific test
SKIPPED [2] tests/test_wheel.py:249: macOS specific test
XFAIL tests/test_examples.py::test_spam - FIXME: Needs more investigation to
pass in Debian
FAILED tests/test_metadata.py::test_missing_version - AssertionError: Regex p...
FAILED tests/test_sdist.py::test_pep621 - AssertionError: assert 'Metadata-Ve...
============= 2 failed, 90 passed, 5 skipped, 1 xfailed in 43.34s ==============
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_mesonpy/build; python3.12 -m pytest
tests
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build;
python3.11 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-8.1.2, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build
configfile: pyproject.toml
plugins: mock-3.12.0
collected 98 items
tests/test_consistency.py . [ 1%]
tests/test_editable.py ......... [ 10%]
tests/test_examples.py x [ 11%]
tests/test_metadata.py ....F [ 16%]
tests/test_options.py ... [ 19%]
tests/test_output.py ......... [ 28%]
tests/test_pep517.py ............. [ 41%]
tests/test_project.py ............s [ 55%]
tests/test_sdist.py .F...... [ 63%]
tests/test_tags.py .ss..... [ 71%]
tests/test_wheel.py ...............ss........ [ 96%]
tests/test_wheelfile.py ... [100%]
=================================== FAILURES ===================================
_____________________________ test_missing_version _____________________________
package_missing_version =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/missing-version')
def test_missing_version(package_missing_version):
pyproject = {'project': {
'name': 'missing-version',
}}
with pytest.raises(pyproject_metadata.ConfigurationError, match='Required
"project.version" field is missing'):
Metadata.from_pyproject(pyproject, pathlib.Path())
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/test_metadata.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/mesonpy/__init__.py:230:
in from_pyproject
metadata = super().from_pyproject(data, project_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'mesonpy.Metadata'>
data = {'project': {'name': 'missing-version'}}, project_dir = PosixPath('.')
metadata_version = None
@classmethod
def from_pyproject(
cls,
data: Mapping[str, Any],
project_dir: str | os.PathLike[str] = os.path.curdir,
metadata_version: str | None = None,
) -> Self:
fetcher = DataFetcher(data)
project_dir = pathlib.Path(project_dir)
if 'project' not in fetcher:
msg = 'Section "project" missing in pyproject.toml'
raise ConfigurationError(msg)
dynamic = fetcher.get_list('project.dynamic')
if 'name' in dynamic:
msg = 'Unsupported field "name" in "project.dynamic"'
raise ConfigurationError(msg)
for field in dynamic:
if field in data['project']:
msg = f'Field "project.{field}" declared as dynamic in
"project.dynamic" but is defined'
raise ConfigurationError(msg)
name = fetcher.get_str('project.name')
if not name:
msg = 'Field "project.name" missing'
raise ConfigurationError(msg)
version_string = fetcher.get_str('project.version')
requires_python_string = fetcher.get_str('project.requires-python')
version = packaging.version.Version(version_string) if version_string
else None
if version is None and 'version' not in dynamic:
msg = 'Field "project.version" missing and "version" not specified in
"project.dynamic"'
raise ConfigurationError(msg)
E pyproject_metadata.ConfigurationError: Field "project.version" missing and
"version" not specified in "project.dynamic"
/usr/lib/python3/dist-packages/pyproject_metadata/__init__.py:242:
ConfigurationError
During handling of the above exception, another exception occurred:
package_missing_version =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/missing-version')
def test_missing_version(package_missing_version):
pyproject = {'project': {
'name': 'missing-version',
}}
with pytest.raises(pyproject_metadata.ConfigurationError, match='Required
"project.version" field is missing'):
E AssertionError: Regex pattern did not match.
E Regex: 'Required "project.version" field is missing'
E Input: 'Field "project.version" missing and "version" not specified in
"project.dynamic"'
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/test_metadata.py:51:
AssertionError
_________________________________ test_pep621 __________________________________
sdist_full_metadata =
PosixPath('/tmp/pytest-of-buildd/pytest-1/test0/mesonpy-test-2ipp_v5r/full_metadata-1.2.3.tar.gz')
def test_pep621(sdist_full_metadata):
with tarfile.open(sdist_full_metadata, 'r:gz') as sdist:
sdist_pkg_info =
sdist.extractfile('full_metadata-1.2.3/PKG-INFO').read().decode()
assert sdist_pkg_info == textwrap.dedent('''\
Metadata-Version: 2.1
Name: full-metadata
Version: 1.2.3
Summary: Some package with all of the PEP 621 metadata
Keywords: full metadata
Home-page: https://example.com
Author: Jane Doe
Author-Email: Unknown <jhon....@example.com>
Maintainer-Email: Jane Doe <jane....@example.com>
License: some license
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Project-URL: Homepage, https://example.com
Project-URL: Documentation, https://readthedocs.org
Project-URL: Repository, https://github.com/mesonbuild/meson-python
Project-URL: Changelog,
https://github.com/mesonbuild/meson-python/blob/master/CHANGELOG.rst
Requires-Python: >=3.7
Requires-Dist: a
Requires-Dist: b>1
Requires-Dist: c>2; os_name != "nt"
Requires-Dist: d<3; extra == "test"
Requires-Dist: e[all]; extra == "test"
Provides-Extra: test
Description-Content-Type: text/markdown
<!--
SPDX-FileCopyrightText: 2021 The meson-python developers
SPDX-License-Identifier: MIT
-->
# full-metadata
An example package with all of the PEP 621 metadata!
''')
E AssertionError: assert 'Metadata-Ver...1 metadata!\n' ==
'Metadata-Ver...1 metadata!\n'
E
E Skipping 116 identical leading characters in diff, use -v to show
E Skipping 906 identical trailing characters in diff, use -v to show
E - ords: full metadata
E ? ^
E + ords: full,metadata
E ? ^
tests/test_sdist.py:33: AssertionError
---------------------------- Captured stdout setup -----------------------------
Initialized empty Git repository in
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.git/
+ meson setup /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.mesonpy-7w0mrv2y
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.mesonpy-7w0mrv2y/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata
Build dir:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.mesonpy-7w0mrv2y
Build type: native build
Project name: full-metadata
Project version: 1.0.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 0
full-metadata 1.0.0
User defined options
Native files:
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.mesonpy-7w0mrv2y/meson-python-native-file.ini
buildtype : release
b_ndebug : if-release
b_vscrt : md
Found ninja-1.12.1 at /usr/bin/ninja
+ meson dist --allow-dirty --no-tests --formats gztar
Created
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/tests/packages/full-metadata/.mesonpy-7w0mrv2y/meson-dist/full-metadata-1.0.0.tar.gz
================================== XFAILURES ===================================
__________________________________ test_spam ___________________________________
venv = <tests.conftest.VEnv object at 0x7f8700379110>
tmp_path = PosixPath('/tmp/pytest-of-buildd/pytest-1/test_spam0')
@pytest.mark.xfail(reason="FIXME: Needs more investigation to pass in
Debian")
def test_spam(venv, tmp_path):
"""Test that the wheel for the example builds, installs, and imports."""
with chdir(examples_dir / 'spam'):
tests/test_examples.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.11/contextlib.py:137: in __enter__
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path =
PosixPath('/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/docs/examples/spam')
@contextlib.contextmanager
def chdir(path: Path) -> Iterator[Path]:
"""Context manager helper to change the current working directory --
cd."""
old_cwd = os.getcwd()
os.chdir(os.fspath(path))
E FileNotFoundError: [Errno 2] No such file or directory:
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build/docs/examples/spam'
mesonpy/_util.py:30: FileNotFoundError
=========================== short test summary info ============================
SKIPPED [1] tests/test_project.py:204: Requires MSVC
SKIPPED [1] tests/test_tags.py:46: macOS specific test
SKIPPED [1] tests/test_tags.py:57: macOS specific test
SKIPPED [2] tests/test_wheel.py:249: macOS specific test
XFAIL tests/test_examples.py::test_spam - FIXME: Needs more investigation to
pass in Debian
FAILED tests/test_metadata.py::test_missing_version - AssertionError: Regex p...
FAILED tests/test_sdist.py::test_pep621 - AssertionError: assert 'Metadata-Ve...
============= 2 failed, 90 passed, 5 skipped, 1 xfailed in 45.48s ==============
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_mesonpy/build; python3.11 -m pytest
tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12
3.11" returned exit code 13
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202405/
About the archive rebuild: The build was made on virtual machines
of type m6a.large and r6a.large from AWS, using sbuild and a
reduced chroot with only build-essential packages.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Thanks.