From 1671bb38bb16e4d508fceca499260ad3e7e708c52d34862e801d0012a178b8ac Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 2 Jan 2023 07:23:44 +0000 Subject: [PATCH] Accepting request 1046025 from home:bnavigator:branches:devel:languages:python - Add build-pr550-packaging22.patch * gh#pypa/build#550: tests: fix for PEP 685 in packaging 22 - Be more specific in requirements OBS-URL: https://build.opensuse.org/request/show/1046025 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=10 --- build-pr550-packaging22.patch | 72 +++++++++++++++++++++++++++++++++++ python-build.changes | 7 ++++ python-build.spec | 11 ++++-- 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 build-pr550-packaging22.patch diff --git a/build-pr550-packaging22.patch b/build-pr550-packaging22.patch new file mode 100644 index 0000000..faf1470 --- /dev/null +++ b/build-pr550-packaging22.patch @@ -0,0 +1,72 @@ +From 6fd0b36eea39e9b8672962f3cca03f40aaa00089 Mon Sep 17 00:00:00 2001 +From: Henry Schreiner +Date: Fri, 9 Dec 2022 22:15:22 -0500 +Subject: [PATCH] tests: fix for PEP 685 in packaging 22 + +Signed-off-by: Henry Schreiner +--- + tests/test_projectbuilder.py | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/tests/test_projectbuilder.py b/tests/test_projectbuilder.py +index f25078a7..9c67e707 100644 +--- a/tests/test_projectbuilder.py ++++ b/tests/test_projectbuilder.py +@@ -60,13 +60,13 @@ def read_text(self, filename): + Metadata-Version: 2.2 + Name: extras_dep + Version: 1.0.0 +- Provides-Extra: extra_without_associated_deps +- Provides-Extra: extra_with_unmet_deps +- Requires-Dist: unmet_dep; extra == 'extra_with_unmet_deps' +- Provides-Extra: extra_with_met_deps +- Requires-Dist: extras_dep; extra == 'extra_with_met_deps' +- Provides-Extra: recursive_extra_with_unmet_deps +- Requires-Dist: recursive_dep; extra == 'recursive_extra_with_unmet_deps' ++ Provides-Extra: extra-without-associated-deps ++ Provides-Extra: extra-with_unmet-deps ++ Requires-Dist: unmet_dep; extra == 'extra-with-unmet-deps' ++ Provides-Extra: extra-with-met-deps ++ Requires-Dist: extras_dep; extra == 'extra-with-met-deps' ++ Provides-Extra: recursive-extra-with-unmet-deps ++ Requires-Dist: recursive_dep; extra == 'recursive-extra-with-unmet-deps' + """ + ).strip() + +@@ -142,27 +142,27 @@ def read_text(self, filename): + ('requireless_dep', None), + ('extras_dep[undefined_extra]', None), + # would the wheel builder filter this out? +- ('extras_dep[extra_without_associated_deps]', None), ++ ('extras_dep[extra-without-associated-deps]', None), + ( +- 'extras_dep[extra_with_unmet_deps]', +- ('extras_dep[extra_with_unmet_deps]', 'unmet_dep; extra == "extra_with_unmet_deps"'), ++ 'extras_dep[extra-with-unmet-deps]', ++ ('extras_dep[extra-with-unmet-deps]', 'unmet_dep; extra == "extra-with-unmet-deps"'), + ), + ( +- 'extras_dep[recursive_extra_with_unmet_deps]', ++ 'extras_dep[recursive-extra-with-unmet-deps]', + ( +- 'extras_dep[recursive_extra_with_unmet_deps]', +- 'recursive_dep; extra == "recursive_extra_with_unmet_deps"', ++ 'extras_dep[recursive-extra-with-unmet-deps]', ++ 'recursive_dep; extra == "recursive-extra-with-unmet-deps"', + 'recursive_unmet_dep', + ), + ), +- ('extras_dep[extra_with_met_deps]', None), ++ ('extras_dep[extra-with-met-deps]', None), + ('missing_dep; python_version>"10"', None), + ('missing_dep; python_version<="1"', None), + ('missing_dep; python_version>="1"', ('missing_dep; python_version >= "1"',)), + ('extras_dep == 1.0.0', None), + ('extras_dep == 2.0.0', ('extras_dep==2.0.0',)), +- ('extras_dep[extra_without_associated_deps] == 1.0.0', None), +- ('extras_dep[extra_without_associated_deps] == 2.0.0', ('extras_dep[extra_without_associated_deps]==2.0.0',)), ++ ('extras_dep[extra-without-associated-deps] == 1.0.0', None), ++ ('extras_dep[extra-without-associated-deps] == 2.0.0', ('extras_dep[extra-without-associated-deps]==2.0.0',)), + ('prerelease_dep >= 1.0.0', None), + ('circular_dep', None), + ], diff --git a/python-build.changes b/python-build.changes index 9527a3d..b5cd2c0 100644 --- a/python-build.changes +++ b/python-build.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Jan 1 18:26:09 UTC 2023 - Ben Greiner + +- Add build-pr550-packaging22.patch + * gh#pypa/build#550: tests: fix for PEP 685 in packaging 22 +- Be more specific in requirements + ------------------------------------------------------------------- Mon Nov 7 20:52:13 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-build.spec b/python-build.spec index 38c5bfd..fc5fc37 100644 --- a/python-build.spec +++ b/python-build.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif -%{?!python_module:%define python_module() python3-%{**}} + %define skip_python2 1 Name: python-build%{psuffix} Version: 0.9.0 @@ -39,17 +39,20 @@ Source10: https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-0. Source11: https://files.pythonhosted.org/packages/py2.py3/f/flit-core/flit_core-2.3.0-py2.py3-none-any.whl Source12: https://files.pythonhosted.org/packages/py2.py3/p/pytoml/pytoml-0.1.21-py2.py3-none-any.whl Source13: https://files.pythonhosted.org/packages/py3/t/tomli/tomli-2.0.1-py3-none-any.whl +# PATCH-FIX-UPSTREAM build-pr550-packaging22.patch gh#pypa/build#550 +Patch1: https://github.com/pypa/build/pull/550.patch#/build-pr550-packaging22.patch +BuildRequires: %{python_module base >= 3.6} BuildRequires: %{python_module importlib-metadata >= 0.22 if %python-base < 3.8} BuildRequires: %{python_module packaging >= 19.0} BuildRequires: %{python_module pep517 >= 0.9.1} BuildRequires: %{python_module setuptools >= 42} -BuildRequires: %{python_module tomli >= 1.0.0} +BuildRequires: %{python_module tomli >= 1.0.0 if %python-base < 3.11} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-packaging >= 0.19.0 Requires: python-pep517 >= 0.9.1 -Requires: python-tomli Requires: (python-importlib-metadata >= 0.22 if python-base < 3.8) +Requires: (python-tomli if python-base < 3.11) Recommends: python-virtualenv >= 20.0.35 Requires(post): update-alternatives Requires(postun):update-alternatives