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:
parent
f44b16cf9e
commit
ee43108f23
@ -11,6 +11,7 @@ Source0: %{pypi_source qrcode}
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
|
||||||
# Comment out failing test
|
# Comment out failing test
|
||||||
Patch0: qrcode_test.patch
|
Patch0: qrcode_test.patch
|
||||||
@ -33,7 +34,8 @@ generation of QR Codes. Python 3 version.
|
|||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -t
|
# RHEL does not include the extra test dependencies (coverage, pillow)
|
||||||
|
%pyproject_buildrequires %{?!rhel:-x test -x pil}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -60,7 +62,7 @@ ln -s qr %{buildroot}%{_bindir}/qrcode
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%tox
|
%pytest
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{pkgname} -f %{pyproject_files}
|
%files -n python3-%{pkgname} -f %{pyproject_files}
|
||||||
|
Loading…
Reference in New Issue
Block a user