diff --git a/python-Automat.spec b/python-Automat.spec index 5594f73..259a2af 100644 --- a/python-Automat.spec +++ b/python-Automat.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_with test Name: python-Automat Version: 0.6.0 Release: 0 @@ -25,12 +26,16 @@ License: MIT Group: Development/Languages/Python Url: https://github.com/glyph/automat Source: https://files.pythonhosted.org/packages/source/A/Automat/Automat-%{version}.tar.gz -BuildRequires: %{python_module attrs} BuildRequires: %{python_module m2r} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module Twisted} +BuildRequires: %{python_module attrs} +BuildRequires: %{python_module graphviz} +%endif Requires: python-attrs Requires: python-six Suggests: python-graphviz > 0.5.1 @@ -57,8 +62,10 @@ automata (particularly deterministic finite-state transducers). %python_clone -a %{buildroot}%{_bindir}/automat-visualize %python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with test} %check %python_exec setup.py test +%endif %post %python_install_alternative automat-visualize