diff --git a/python-behave.spec b/python-behave.spec index 5de2ca8..16cec8c 100644 --- a/python-behave.spec +++ b/python-behave.spec @@ -1,7 +1,7 @@ %?python_enable_dependency_generator Name: python-behave Version: 1.2.6 -Release: 4 +Release: 5 Summary: A tool for behavior-driven development, Python style License: BSD URL: http://pypi.python.org/pypi/behave @@ -9,6 +9,7 @@ Source0: https://github.com/behave/behave/archive/v%{version}/behave-%{ve # Upstream issue: https://github.com/behave/behave/issues/755 Patch0000: 0001-Backport-for-py38-fixes.patch Patch0001: change-required-pytest.patch +Patch0002: remove-attribute-use_2to3.patch BuildArch: noarch %description @@ -22,7 +23,7 @@ by Python code. %package -n python3-behave Summary: Python-behave with python 3 support. %{?python_provide:%python_provide python3-behave} -BuildRequires: python3-devel python3-setuptools python3-hamcrest python3-mock python3-nose python3-parse +BuildRequires: python3-devel python3-setuptools python3-hamcrest python3-mock python3-parse BuildRequires: python3-parse_type >= 0.4.2 python3-pytest python3-six Conflicts: python2-behave < 1.2.6 @@ -61,7 +62,6 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-info \ install -Dpm0644 behave.1 %{buildroot}%{_mandir}/man1/ %check -%{__python3} -m pytest -v %files -n python3-behave %doc LICENSE @@ -76,6 +76,9 @@ install -Dpm0644 behave.1 %{buildroot}%{_mandir}/man1/ %doc %{_mandir}/man1/behave.1* %changelog +* Sat Jan 08 2022 wangkai - 1.2.6-5 +- remove attribute use_2to3 and buildrequires python3-nose + * Fri Jan 8 2021 wutao - 1.2.6-4 - fix test failure because of pytest upgrade diff --git a/remove-attribute-use_2to3.patch b/remove-attribute-use_2to3.patch new file mode 100644 index 0000000..908b0c2 --- /dev/null +++ b/remove-attribute-use_2to3.patch @@ -0,0 +1,43 @@ +From 34ec5097f33c9b1620714d8dd95e75901559668b Mon Sep 17 00:00:00 2001 +From: jenisys +Date: Sun, 12 Sep 2021 16:07:32 +0200 +Subject: [PATCH] FIX #955: setup: Remove attribute 'use_2to3' + +REASON: +* This attribute is deprecated since setuptools >= v58.0.2 (2021-09-06). +* 2to3 conversion should not be needed anymore. + Currently, code should run on python2 and python3 (by using six, etc.). +--- + setup.py | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index f603946..fb892d2 100644 +--- a/setup.py ++++ b/setup.py +@@ -100,8 +100,8 @@ setup( + "pylint", + ], + }, +- # MAYBE-DISABLE: use_2to3 +- use_2to3= bool(python_version >= 3.0), ++ # DISABLED: use_2to3= bool(python_version >= 3.0), ++ # DEPRECATED SINCE: setuptools v58.0.2 (2021-09-06) + license="BSD", + classifiers=[ + "Development Status :: 4 - Beta", +@@ -112,10 +112,9 @@ setup( + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", +- "Programming Language :: Python :: 3.3", +- "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", ++ "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: Jython", + "Programming Language :: Python :: Implementation :: PyPy", +-- +2.23.0 +