diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-18 12:04:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-18 12:04:39 +0100 |
commit | 2d01b3d133c0fbf17de8d7b47905585af88bd6e4 (patch) | |
tree | f74eb9a3d16ed25f8c15b825f4d28b759ae99a42 /dev-python/meson-python/files | |
parent | 97bacba3ead078e5db8b87ab651a3ffa7d82f60f (diff) |
gentoo auto-resync : 18:04:2024 - 12:04:39
Diffstat (limited to 'dev-python/meson-python/files')
-rw-r--r-- | dev-python/meson-python/files/meson-python-0.16.0-pyproject-metadata-0.8.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-python/meson-python/files/meson-python-0.16.0-pyproject-metadata-0.8.patch b/dev-python/meson-python/files/meson-python-0.16.0-pyproject-metadata-0.8.patch new file mode 100644 index 000000000000..834aed4d2fb4 --- /dev/null +++ b/dev-python/meson-python/files/meson-python-0.16.0-pyproject-metadata-0.8.patch @@ -0,0 +1,68 @@ +From ba14bfdffceb571a5e8c1406c76b7b77634bcb7f Mon Sep 17 00:00:00 2001 +From: Daniele Nicolodi <daniele@grinta.net> +Date: Mon, 15 Apr 2024 22:34:36 +0200 +Subject: [PATCH 2/2] TST: Adapt to changes in pyproject-metadata 0.8.0 + +--- + tests/test_metadata.py | 8 +++++++- + tests/test_sdist.py | 9 +++++++-- + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/tests/test_metadata.py b/tests/test_metadata.py +index 0c278da6..088e82f7 100644 +--- a/tests/test_metadata.py ++++ b/tests/test_metadata.py +@@ -3,6 +3,7 @@ + # SPDX-License-Identifier: MIT + + import pathlib ++import re + + import packaging.version + import pyproject_metadata +@@ -48,5 +49,10 @@ 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'): ++ match = '|'.join(( ++ re.escape('Required "project.version" field is missing'), ++ # pyproject-metatadata 0.8.0 and later ++ re.escape('Field "project.version" missing and "version" not specified in "project.dynamic"'), ++ )) ++ with pytest.raises(pyproject_metadata.ConfigurationError, match=match): + Metadata.from_pyproject(pyproject, pathlib.Path()) +diff --git a/tests/test_sdist.py b/tests/test_sdist.py +index 6e337617..fb698b53 100644 +--- a/tests/test_sdist.py ++++ b/tests/test_sdist.py +@@ -3,6 +3,7 @@ + # SPDX-License-Identifier: MIT + + import os ++import re + import stat + import sys + import tarfile +@@ -30,7 +31,7 @@ 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 = re.escape(textwrap.dedent('''\ + Metadata-Version: 2.1 + Name: full-metadata + Version: 1.2.3 +@@ -65,7 +66,11 @@ def test_pep621(sdist_full_metadata): + # full-metadata + + An example package with all of the PEP 621 metadata! +- ''') ++ ''')) ++ ++ # pyproject-metadata 0.8.0 and later uses a comma to separate keywords ++ expr = metadata.replace(r'Keywords:\ full\ metadata', r'Keywords:\ full[ ,]metadata') ++ assert re.fullmatch(expr, sdist_pkg_info) + + + def test_dynamic_version(sdist_dynamic_version): |