Avoid coverage and tox dependencies

The Fedora Python packaging guidelines exclude coverage checks as used
in this package's tox.ini:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters

Furthermore, RHEL does not include tox, but even in Fedora it does not
add much value relative to its dependencies.  Calling %pytest directly
is simpler and more conformant.

https://github.com/OpenSCAP/openscap-report/pull/225
This commit is contained in:
Yaakov Selkowitz 2024-01-29 16:34:08 -05:00
parent dbeff4dda3
commit 39e924bdb7

View File

@ -2,7 +2,7 @@
Name: openscap-report
Version: 0.2.7
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A tool for generating human-readable reports from (SCAP) XCCDF and ARF results
# The entire source code is LGPL-2.1+ and GPL-2.0+ and MIT except schemas/ and assets/, which are Public Domain
@ -13,6 +13,7 @@ Source0: https://github.com/OpenSCAP/%{name}/releases/download/v%{version
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
@ -34,7 +35,9 @@ human-readable reports from SCAP XCCDF and ARF results.}
%generate_buildrequires
%pyproject_buildrequires -t
%pyproject_buildrequires
# test requirement listed only in tox.ini
echo "%{py3_dist jsonschema}"
%build
@ -50,7 +53,8 @@ install -m 0644 -Dt %{buildroot}%{_mandir}/man1 _build_docs/oscap-report.1
%check
%tox
# test_store_file fails with FileNotFoundError: [Errno 2] No such file or directory: '/tmp/oscap-report-tests_result.html'
%pytest -k "not test_store_file"
%files -f %{pyproject_files}
%{_mandir}/man1/oscap-report.*
@ -60,6 +64,9 @@ install -m 0644 -Dt %{buildroot}%{_mandir}/man1 _build_docs/oscap-report.1
%changelog
* Mon Jan 29 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 0.2.7-2
- Avoid tox dependency
* Fri Jan 26 2024 Packit <hello@packit.dev> - 0.2.7-1
- 0.2.7 (Jan Rodak)
- Add tool tip to search bar (Jan Rodak)