Migrate from tox to pytest, avoid unwanted deps in RHEL builds

tox is unwanted in RHEL, but provides little value for even the Fedora
package.  coverage and pillow are also unwanted in RHEL, where those
tests are skipped in their absence.
This commit is contained in:
Yaakov Selkowitz 2023-05-23 17:51:59 -04:00
parent f44b16cf9e
commit ee43108f23

View File

@ -11,6 +11,7 @@ Source0: %{pypi_source qrcode}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pytest
# Comment out failing test
Patch0: qrcode_test.patch
@ -33,7 +34,8 @@ generation of QR Codes. Python 3 version.
%generate_buildrequires
%pyproject_buildrequires -t
# RHEL does not include the extra test dependencies (coverage, pillow)
%pyproject_buildrequires %{?!rhel:-x test -x pil}
%prep
@ -60,7 +62,7 @@ ln -s qr %{buildroot}%{_bindir}/qrcode
%check
%tox
%pytest
%files -n python3-%{pkgname} -f %{pyproject_files}