diff --git a/python-attrs.changes b/python-attrs.changes index d194f82..b8ce2d0 100644 --- a/python-attrs.changes +++ b/python-attrs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 21 16:10:47 UTC 2017 - jmatejek@suse.com + +- add test requirements, run tests conditionally + (not BuildRequiring pytest fixes bsc#1073845) + ------------------------------------------------------------------- Thu Nov 9 18:50:46 UTC 2017 - arun@gmx.de diff --git a/python-attrs.spec b/python-attrs.spec index 136a3df..8c74f8c 100644 --- a/python-attrs.spec +++ b/python-attrs.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_with tests Name: python-attrs Version: 17.3.0 @@ -27,10 +28,14 @@ Group: Development/Languages/Python Url: https://github.com/hynek/attrs/ Source: https://pypi.io/packages/source/a/attrs/attrs-%{version}.tar.gz BuildRequires: %{python_module devel} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with tests} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module zope.interface} +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -66,6 +71,11 @@ python-attrs is the successor to python-characterstic %python_install %fdupes %{buildroot}%{_prefix} +%if %{with tests} +%check +%python_exec -m pytest tests +%endif + %files %{python_files} %defattr(-,root,root,-) %doc CHANGELOG.rst LICENSE README.rst