From ee43108f235a0cc6e5514848679c73c803b409bf Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: May 23 2023 21:51:59 +0000 Subject: 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. --- diff --git a/python-qrcode.spec b/python-qrcode.spec index 3328bf2..3f9a9d8 100644 --- a/python-qrcode.spec +++ b/python-qrcode.spec @@ -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}