diff --git a/freeipa-healthcheck.spec b/freeipa-healthcheck.spec index 1328f7c..2d65afb 100644 --- a/freeipa-healthcheck.spec +++ b/freeipa-healthcheck.spec @@ -6,6 +6,7 @@ %global python3dir %{_builddir}/python3-%{name}-%{version}-%{release} %{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%bcond_without tests Name: %{project}-%{shortname} Version: 0.7 @@ -38,8 +39,10 @@ BuildRequires: systemd-devel %{?systemd_requires} # packages for make check BuildRequires: python3-pytest-runner +%if %{with tests} BuildRequires: python3-ipalib BuildRequires: python3-ipaserver +%endif BuildRequires: python3-lib389 BuildRequires: python3-libsss_nss_idmap @@ -95,8 +98,10 @@ install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/man/man5/%{long sed -e 's,\./,%%{python3_sitelib}/ipahealthcheck/,g' ) >healthcheck.list +%if %{with tests} %check %{__python3} setup.py test +%endif %post