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 12:38:24 +02:00
parent 57d6b1254b
commit c8ffcaf2af
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,5 @@
%bcond_without tests
Name: pyxdg
Version: 0.26
Release: 11%{?dist}
@ -19,8 +21,10 @@ PyXDG is a python library to access freedesktop.org standards
%package -n python%{python3_pkgversion}-pyxdg
Summary: Python3 library to access freedesktop.org standards
BuildRequires: python%{python3_pkgversion}-devel
%if %{with check}
# These are needed for the nose tests.
BuildRequires: python%{python3_pkgversion}-nose
%endif
%{?python_provide:%python_provide python%{python3_pkgversion}-pyxdg}
%description -n python%{python3_pkgversion}-pyxdg
@ -38,10 +42,12 @@ package contains a Python 3 version of PyXDG.
%install
%py3_install
%if %{with check}
%check
# icon-test currently fails
# https://bugs.freedesktop.org/show_bug.cgi?id=104846
nosetests-%{python3_version} || :
%endif
%files -n python%{python3_pkgversion}-pyxdg
%license COPYING