diff --git a/python-imagesize.spec b/python-imagesize.spec index 8e6c947..8f51b79 100644 --- a/python-imagesize.spec +++ b/python-imagesize.spec @@ -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