From c35b237f30c06c332c8b322bdebe152bfa8c600c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 12 Jan 2021 17:08:42 -0600 Subject: [PATCH] Add bcond_with tests to avoid build dependency loop --- freeipa-healthcheck.spec | 5 +++++ 1 file changed, 5 insertions(+) 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