spec: add bcond for check

Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
This commit is contained in:
Frédéric Pierret (fepitre) 2020-08-08 21:05:56 +02:00
parent f7a3ab7f91
commit 65df04f417
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -1,3 +1,4 @@
%bcond_without tests
%global pypi_name imagesize
%global sum Python module for analyzing image file headers and returning image sizes
@ -14,7 +15,9 @@ BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pytest
%endif
%description
The imagesize package parses image file headers and returns the image sizes.
@ -51,8 +54,10 @@ rm -rf %{pypi_name}.egg-info
%install
%py3_install
%if %{with tests}
%check
py.test-3
%endif
%files -n python%{python3_pkgversion}-%{pypi_name}
%doc README.rst