From 44ae35850f66e3351521b5ec8c956336a8f8701cb42abd584d42486e123957bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 2 Aug 2024 11:51:41 +0000 Subject: [PATCH] Accepting request 1191175 from home:glaubitz:branches:devel:languages:python - Add python-pytest to BuildRequires - Use %pytest instead of %pyunitest to be able to skip tests - Temporarily disable test_errors_syntax test on Python 3.13 OBS-URL: https://build.opensuse.org/request/show/1191175 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyflakes?expand=0&rev=73 --- python-pyflakes.changes | 7 +++++++ python-pyflakes.spec | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/python-pyflakes.changes b/python-pyflakes.changes index cd93265..57c1555 100644 --- a/python-pyflakes.changes +++ b/python-pyflakes.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Aug 2 11:40:14 UTC 2024 - John Paul Adrian Glaubitz + +- Add python-pytest to BuildRequires +- Use %pytest instead of %pyunitest to be able to skip tests +- Temporarily disable test_errors_syntax test on Python 3.13 + ------------------------------------------------------------------- Fri Jan 5 15:26:55 UTC 2024 - Dirk Müller diff --git a/python-pyflakes.spec b/python-pyflakes.spec index a81d72e..f00061d 100644 --- a/python-pyflakes.spec +++ b/python-pyflakes.spec @@ -26,6 +26,7 @@ URL: https://github.com/PyCQA/pyflakes Source: https://files.pythonhosted.org/packages/source/p/pyflakes/pyflakes-%{version}.tar.gz BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes @@ -33,7 +34,7 @@ BuildRequires: python-rpm-macros # the pkg_resources module is required at runtime Requires: python-setuptools Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -54,7 +55,10 @@ modules with side effects. It's also much faster. %python_clone -a %{buildroot}%{_bindir}/pyflakes %check -%pyunittest discover -v +# Disable test_errors_syntax test until Python 3.13 has been +# released, see: https://github.com/PyCQA/pyflakes/issues/811 +python313_args=("-k" "not test_errors_syntax") +%pytest "${$python_args[@]}" %post %python_install_alternative pyflakes