diff --git a/3787.patch b/3787.patch new file mode 100644 index 0000000..24b1356 --- /dev/null +++ b/3787.patch @@ -0,0 +1,32 @@ +From c3441cb149f27d283d51ec4f6cecd6a5052de87a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 21 Jan 2023 10:22:16 +0100 +Subject: [PATCH] Fix dependency syntax error in test_dist_info + +Fix the install_requires used in test_dist_info to use the dangling +syntax, in order to correctly handle markers. This fixes syntax error +when parsed by packaging-22.0+, as well as setuptools warning: + +``` +UserWarning: One of the parsed requirements in `install_requires` looks like a valid environment marker: \'sys_platform != "linux"\' +Make sure that the config is correct and check https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#opt-2 + warnings.warn(msg, UserWarning)\n' +``` +--- + setuptools/tests/test_dist_info.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py +index 45b0d7fbb4..2ed790762f 100644 +--- a/setuptools/tests/test_dist_info.py ++++ b/setuptools/tests/test_dist_info.py +@@ -142,7 +142,8 @@ class TestWheelCompatibility: + version = {version} + + [options] +- install_requires = foo>=12; sys_platform != "linux" ++ install_requires = ++ foo>=12; sys_platform != "linux" + + [options.extras_require] + test = pytest diff --git a/python-setuptools.spec b/python-setuptools.spec index fa865c8..1b24346 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -19,7 +19,7 @@ Name: python-setuptools # When updating, update the bundled libraries versions bellow! Version: 65.5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Easily build and distribute Python packages # setuptools is MIT # appdirs is MIT @@ -42,6 +42,10 @@ Source0: %{pypi_source %{srcname} %{version}} # Some test deps are optional and either not desired or not available in Fedora, thus this patch removes them. Patch: Remove-optional-or-unpackaged-test-deps.patch +# Tests compatibility with wheel 0.40+ +# Merged upstream +Patch: https://github.com/pypa/setuptools/pull/3787.patch + BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel @@ -227,6 +231,9 @@ PYTHONPATH=$(pwd) %pytest \ %changelog +* Tue Mar 28 2023 Miro HronĨok - 65.5.1-3 +- Fix tests with wheel 0.40 + * Fri Jan 20 2023 Fedora Release Engineering - 65.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild