From 6ffb0858666b4bf1e3fed1e8e5a9ed7c37dd22a5 Mon Sep 17 00:00:00 2001 From: cherry530 <707078654@qq.com> Date: Mon, 31 Jul 2023 11:11:55 +0800 Subject: [PATCH] remove buildrequires python3-contextlib2 Signed-off-by: cherry530 <707078654@qq.com> --- python-pytest-shutil.spec | 9 +++++++-- remove-require-contextlib2-on-python3.patch | 22 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 remove-require-contextlib2-on-python3.patch diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index abaeaad..fd16371 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -1,14 +1,16 @@ Name: python-pytest-shutil Version: 1.7.0 -Release: 2 +Release: 3 Summary: A goodie-bag of unix shell and environment tools for py.test License: MIT URL: https://pypi.python.org/pypi/pytest-shutil Source0: https://files.pythonhosted.org/packages/f7/fa/c1f7bfb61674f69fb2694bda0ef475a6b8b915a5c36105648dd58a6f200a/pytest-shutil-%{version}.tar.gz +Patch0: remove-require-contextlib2-on-python3.patch + BuildArch: noarch -BuildRequires: python3-contextlib2 python3-devel python3-execnet python3-mock python3-wheel +BuildRequires: python3-devel python3-execnet python3-mock python3-wheel BuildRequires: python3-path python3-pytest python3-pip python3-setuptools_git python3-termcolor %description @@ -45,6 +47,9 @@ pytest -k "not test_pretty_formatter" %{python3_sitelib}/* %changelog +* Mon Jul 31 2023 xu_ping <707078654@qq.com> - 1.7.0-3 +- remove buildrequires python3-contextlib2. + * Fri May 05 2023 yaoxin - 1.7.0-2 - Fix compilation errors due to python-termcolor update to 2.3.0 diff --git a/remove-require-contextlib2-on-python3.patch b/remove-require-contextlib2-on-python3.patch new file mode 100644 index 0000000..d76f53a --- /dev/null +++ b/remove-require-contextlib2-on-python3.patch @@ -0,0 +1,22 @@ +From 2d6709e2fc7fba1e0d61e8dad03fa68bf19a9b0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Sun, 18 Aug 2019 10:46:37 +0200 +Subject: [PATCH] pytest-shutil: Only require contextlib2 on Python 2 + +--- + pytest-shutil/setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py +index 70cc354..57f710d 100644 +--- a/setup.py ++++ b/setup.py +@@ -24,7 +24,7 @@ + + install_requires = ['six', + 'execnet', +- 'contextlib2', ++ 'contextlib2;python_version<"3"', + 'pytest', + 'path.py', + 'mock',