diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..fcc7b97
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,3 @@
+
+ test
+
diff --git a/python-sphinxcontrib-websupport.changes b/python-sphinxcontrib-websupport.changes
index 6d16412..3f41db4 100644
--- a/python-sphinxcontrib-websupport.changes
+++ b/python-sphinxcontrib-websupport.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Jun 6 10:48:40 UTC 2019 - Tomáš Chvátal
+
+- Switch to multibuild to fix testing issues
+
-------------------------------------------------------------------
Fri May 24 19:52:17 UTC 2019 - Tomáš Chvátal
diff --git a/python-sphinxcontrib-websupport.spec b/python-sphinxcontrib-websupport.spec
index e0f8b8a..d58e02b 100644
--- a/python-sphinxcontrib-websupport.spec
+++ b/python-sphinxcontrib-websupport.spec
@@ -17,23 +17,34 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-Name: python-sphinxcontrib-websupport
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
+Name: python-sphinxcontrib-websupport%{psuffix}
Version: 1.1.2
Release: 0
Summary: Sphinx API for Web Apps
License: BSD-2-Clause
Group: Development/Languages/Python
-URL: http://sphinx-doc.org/
+URL: https://github.com/sphinx-doc/sphinxcontrib-websupport
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-websupport/sphinxcontrib-websupport-%{version}.tar.gz
+%if %{with test}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module SQLAlchemy}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module Whoosh}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module pytest}
-BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
+BuildRequires: %{python_module sphinxcontrib-websupport >= %{version}}
BuildRequires: %{python_module xapian}
+%endif
+BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
@@ -59,12 +70,17 @@ documentation into your Web application.
%python_build
%install
+%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
%check
+%if %{with test}
%pytest
+%endif
+%if !%{with test}
%files %{python_files}
%license LICENSE
%doc CHANGES README.rst
@@ -72,5 +88,6 @@ documentation into your Web application.
%{python_sitelib}/sphinxcontrib/websupport/
%{python_sitelib}/sphinxcontrib_websupport-%{version}-py*-nspkg.pth
%{python_sitelib}/sphinxcontrib_websupport-%{version}-py*.egg-info
+%endif
%changelog