diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..ec2fdbb
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,3 @@
+
+ test
+
\ No newline at end of file
diff --git a/python-nbclient.changes b/python-nbclient.changes
index 7385b91..b7ff208 100644
--- a/python-nbclient.changes
+++ b/python-nbclient.changes
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Thu Apr 8 22:30:04 UTC 2021 - Ben Greiner
+
+- Actually break the cycle: test flavor needs a psuffix
+
+-------------------------------------------------------------------
+Wed Mar 31 16:03:17 UTC 2021 - Ben Greiner
+
+- test in multibuild flavor in order to break runtime and build
+ dependency cycle with nbconvert.
+
-------------------------------------------------------------------
Wed Mar 3 19:24:34 UTC 2021 - Arun Persaud
diff --git a/python-nbclient.spec b/python-nbclient.spec
index aa8f41d..6de8dbe 100644
--- a/python-nbclient.spec
+++ b/python-nbclient.spec
@@ -16,9 +16,18 @@
#
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
+
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
-Name: python-nbclient
+Name: python-nbclient%{psuffix}
Version: 0.5.3
Release: 0
Summary: A client library for executing notebooks
@@ -34,7 +43,7 @@ Requires: python-nbformat >= 5.0
Requires: python-nest-asyncio
Requires: python-traitlets >= 4.2
BuildArch: noarch
-# SECTION test requirements
+%if %{with test}
BuildRequires: %{python_module async_generator}
BuildRequires: %{python_module ipython}
BuildRequires: %{python_module ipywidgets}
@@ -46,7 +55,7 @@ BuildRequires: %{python_module pytest >= 4.1}
BuildRequires: %{python_module testpath}
BuildRequires: %{python_module traitlets >= 4.2}
BuildRequires: %{python_module xmltodict}
-# /SECTION
+%endif
%python_subpackages
%description
@@ -57,22 +66,29 @@ NBClient is a tool for parameterizing andexecuting Jupyter Notebooks.
%prep
%setup -q -n nbclient-%{version}
+rm -r nbclient/tests/files/.ipynb_checkpoints
%build
%python_build
+%if ! %{with test}
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
+%if %{with test}
%check
# test_many_parallel_notebooks randomly fails - https://github.com/jupyter/nbclient/pull/74#issuecomment-635929953
%pytest -k 'not test_many_parallel_notebooks'
+%endif
+%if ! %{with test}
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE
%{python_sitelib}/nbclient
%{python_sitelib}/nbclient-%{version}-py*.egg-info/
+%endif
%changelog