spec: add bcond for check
Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
This commit is contained in:
parent
f7a3ab7f91
commit
65df04f417
@ -1,3 +1,4 @@
|
|||||||
|
%bcond_without tests
|
||||||
|
|
||||||
%global pypi_name imagesize
|
%global pypi_name imagesize
|
||||||
%global sum Python module for analyzing image file headers and returning image sizes
|
%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}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
|
%if %{with tests}
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
BuildRequires: python%{python3_pkgversion}-pytest
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The imagesize package parses image file headers and returns the image sizes.
|
The imagesize package parses image file headers and returns the image sizes.
|
||||||
@ -51,8 +54,10 @@ rm -rf %{pypi_name}.egg-info
|
|||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
py.test-3
|
py.test-3
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
Loading…
Reference in New Issue
Block a user