From 4de54478fd997ff2d74ef23b46661ed00bca3e82b0e5257443a54b6820e7d0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 10 Apr 2025 13:40:04 +0000 Subject: [PATCH] Accepting request 1267962 from home:bnavigator:branches:openSUSE:Factory:Staging:adi:5 - Fix dependencies OBS-URL: https://build.opensuse.org/request/show/1267962 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-guessit?expand=0&rev=58 --- python-guessit.changes | 5 +++++ python-guessit.spec | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/python-guessit.changes b/python-guessit.changes index 77248d6..231dbbb 100644 --- a/python-guessit.changes +++ b/python-guessit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 8 17:37:51 UTC 2025 - Ben Greiner + +- Fix dependencies + ------------------------------------------------------------------- Fri Jan 10 15:47:50 UTC 2025 - Nico Krapp diff --git a/python-guessit.spec b/python-guessit.spec index 6ed4924..2c25e39 100644 --- a/python-guessit.spec +++ b/python-guessit.spec @@ -17,7 +17,9 @@ %if 0%{?suse_version} > 1500 -%define with_tests 1 +%bcond_without test +%else +%bcond_with test %endif Name: python-guessit Version: 3.8.0 @@ -31,12 +33,7 @@ Source0: https://files.pythonhosted.org/packages/source/g/guessit/guessit Patch0: remove-six.patch BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module babelfish >= 0.6.0} -BuildRequires: %{python_module importlib_resources} -%if 0%{?with_tests} -BuildRequires: %{python_module pytest >= 5} -BuildRequires: %{python_module pytest-benchmark} -BuildRequires: %{python_module pytest-mock >= 3.3.1} -%endif +BuildRequires: %{python_module importlib_resources if %python-base < 3.9} BuildRequires: %{python_module pip} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module rebulk >= 3.2.0} @@ -47,9 +44,17 @@ BuildRequires: python-rpm-macros Requires: python-babelfish >= 0.6.0 Requires: python-python-dateutil Requires: python-rebulk >= 3.2.0 +%if %{?python_version_nodots} < 39 +Requires: python-importlib_resources +%endif Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module pytest >= 5} +BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest-mock >= 3.3.1} +%endif %python_subpackages %description @@ -82,7 +87,7 @@ sed -i 's:.pytest-runner.::' setup.py %python_clone -a %{buildroot}%{_bindir}/guessit %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if 0%{?with_tests} +%if %{with test} %check %pytest %endif