Accepting request 1205373 from devel:languages:python

- Make seedir dependency optional for SLFO

OBS-URL: https://build.opensuse.org/request/show/1205373
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sybil?expand=0&rev=20
This commit is contained in:
Ana Guerrero 2024-10-04 15:08:24 +00:00 committed by Git OBS Bridge
commit 1e4e992dc5
2 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 3 07:46:17 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Make seedir dependency optional for SLFO
-------------------------------------------------------------------
Thu Jun 13 15:36:08 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@ -39,12 +39,14 @@ BuildRequires: %{python_module wheel}
%if %{with test}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pytest >= 7.1}
BuildRequires: %{python_module seedir}
BuildRequires: %{python_module sybil = %{version}}
BuildRequires: %{python_module testfixtures}
%if 0%{?sle_version} && 0%{?sle_version} <= 150400
BuildRequires: %{python_module dataclasses}
%endif
%if 0%{suse_version} > 1600
BuildRequires: %{python_module seedir}
%endif
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -61,6 +63,11 @@ of the normal test run. Integration is provided for the main Python test runners
%autosetup -p1 -n sybil-%{version}
sed -i '/pytest-cov/ d' setup.py
%if 0%{suse_version} <= 1600
# Remove seedir dependency for SLFO
sed -i '/import seedir/d' tests/helpers.py
%endif
%build
%pyproject_wheel
@ -72,7 +79,13 @@ sed -i '/pytest-cov/ d' setup.py
%check
%if %{with test}
%pytest
%if 0%{suse_version} <= 1600
# Remove seedir build dependency
test_flags="--ignore docs/patterns.rst"
%endif
%pytest $test_flags
%endif
%if !%{with test}