diff --git a/9eb9269e8c.patch b/9eb9269e8c.patch new file mode 100644 index 0000000..1955a07 --- /dev/null +++ b/9eb9269e8c.patch @@ -0,0 +1,50 @@ +From 9eb9269e8c0ab0f53010a4b7b6cf466fd6f0090f Mon Sep 17 00:00:00 2001 +From: Ian Stapleton Cordasco +Date: Sat, 23 Mar 2024 06:56:04 -0500 +Subject: [PATCH] Fix metadata tests + +--- + tests/test_package.py | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/tests/test_package.py b/tests/test_package.py +index 0b883da3..63690ad4 100644 +--- a/tests/test_package.py ++++ b/tests/test_package.py +@@ -340,20 +340,35 @@ def test_fips_metadata_excludes_md5_and_blake2(monkeypatch): + "read_data, missing_fields", + [ + pytest.param( +- b"Metadata-Version: 2.3\nName: test-package\nVersion: 1.0.0\n", ++ b"Metadata-Version: 102.3\nName: test-package\nVersion: 1.0.0\n", + "Name, Version", + id="unsupported Metadata-Version", + ), ++ pytest.param( ++ b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: UNKNOWN\n", ++ "Name, Version", ++ id="missing Name and Version", ++ ), + pytest.param( + b"Metadata-Version: 2.2\nName: UNKNOWN\nVersion: UNKNOWN\n", + "Name, Version", + id="missing Name and Version", + ), ++ pytest.param( ++ b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: 1.0.0\n", ++ "Name", ++ id="missing Name", ++ ), + pytest.param( + b"Metadata-Version: 2.2\nName: UNKNOWN\nVersion: 1.0.0\n", + "Name", + id="missing Name", + ), ++ pytest.param( ++ b"Metadata-Version: 2.3\nName: test-package\nVersion: UNKNOWN\n", ++ "Version", ++ id="missing Version", ++ ), + pytest.param( + b"Metadata-Version: 2.2\nName: test-package\nVersion: UNKNOWN\n", + "Version", diff --git a/python-twine.spec b/python-twine.spec index 34105fe..4e82760 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -6,12 +6,14 @@ Name: python-%{srcname} Version: 5.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of utilities for interacting with PyPI License: ASL 2.0 URL: https://github.com/pypa/%{srcname} Source0: %{pypi_source} +# Fixes the failing test when built with python-pkginfo 1.10.0 +Patch: https://github.com/pypa/twine/commit/9eb9269e8c.patch BuildArch: noarch %description @@ -104,6 +106,9 @@ install -p -D -T -m 0644 docs/build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1 %{_bindir}/twine %changelog +* Wed Apr 24 2024 Tomáš Hrnčiar - 5.0.0-2 +- Backport upstream patch needed for compatibility with python-pkginfo 1.10.0 + * Sun Mar 17 2024 Charalampos Stratakis - 5.0.0-1 - Update to 5.0.0 - Resolves: rhbz#2263785