From 65df04f417b2785f7b43e2792f4ee03baef2ddf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sat, 8 Aug 2020 21:05:56 +0200 Subject: [PATCH] spec: add bcond for check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Pierret (fepitre) --- python-imagesize.spec | 5 +++++ 1 file changed, 5 insertions(+) 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