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-apidoc.changes b/python-sphinxcontrib-apidoc.changes
index b4915a9..a58a778 100644
--- a/python-sphinxcontrib-apidoc.changes
+++ b/python-sphinxcontrib-apidoc.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Fri Apr 26 12:46:35 UTC 2019 - Marketa Calabkova
+
+- update to version 0.3.0
+ * Ensure '--tocfile' isn't configured for Sphinx < 1.8
+ * Support more configuration options
+ * fix the dist name used to get the version after installation
+- Launching tests using multibuild. It just did not work without it.
+
-------------------------------------------------------------------
Fri Dec 7 20:49:39 UTC 2018 - Matej Cepl
diff --git a/python-sphinxcontrib-apidoc.spec b/python-sphinxcontrib-apidoc.spec
index d599805..c12cba4 100644
--- a/python-sphinxcontrib-apidoc.spec
+++ b/python-sphinxcontrib-apidoc.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-sphinxcontrib-apidoc
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,23 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-Name: python-sphinxcontrib-apidoc
-Version: 0.2.1
+%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-apidoc%{psuffix}
+Version: 0.3.0
Release: 0
Summary: A Sphinx extension for running 'sphinx-apidoc' on each build
License: BSD-2-Clause
Group: Development/Languages/Python
URL: http://www.sphinx-doc.org/
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-apidoc/sphinxcontrib-apidoc-%{version}.tar.gz
-BuildRequires: %{python_module pbr}
+BuildRequires: %{python_module pbr >= 4.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -33,9 +41,10 @@ Requires: python-Sphinx >= 1.6.0
Requires: python-pbr
BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module Sphinx >= 1.6.0}
-BuildRequires: %{python_module pbr}
+%if %{with test}
BuildRequires: %{python_module pytest >= 3.0}
+BuildRequires: %{python_module sphinxcontrib-apidoc = %{version}}
+%endif
# /SECTION
%python_subpackages
@@ -50,21 +59,24 @@ must be run before *sphinx-build*.
%setup -q -n sphinxcontrib-apidoc-%{version}
%build
-export PBR_VERSION=%{version}
%python_build
%install
-export PBR_VERSION=%{version}
+%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
+%if %{with test}
%check
-export PBR_VERSION=%{version}
-%python_exec setup.py test
+%pytest tests
+%endif
+%if !%{with test}
%files %{python_files}
%license LICENSE
%doc AUTHORS ChangeLog README.rst
%{python_sitelib}/*
+%endif
%changelog
diff --git a/sphinxcontrib-apidoc-0.2.1.tar.gz b/sphinxcontrib-apidoc-0.2.1.tar.gz
deleted file mode 100644
index 39356a5..0000000
--- a/sphinxcontrib-apidoc-0.2.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4051899e7546621d34ec3bae789ce21aa6288c8def0e3f8af9b333782f2305f4
-size 13849
diff --git a/sphinxcontrib-apidoc-0.3.0.tar.gz b/sphinxcontrib-apidoc-0.3.0.tar.gz
new file mode 100644
index 0000000..68e2673
--- /dev/null
+++ b/sphinxcontrib-apidoc-0.3.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:729bf592cf7b7dd57c4c05794f732dc026127275d785c2a5494521fdde773fb9
+size 15396