Accepting request 882417 from home:bnavigator:branches:devel:languages:python:jupyter

- test in multibuild flavor in order to break runtime and build
  dependency cycle with nbconvert.

OBS-URL: https://build.opensuse.org/request/show/882417
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclient?expand=0&rev=18
This commit is contained in:
Markéta Machová 2021-04-01 10:21:32 +00:00 committed by Git OBS Bridge
parent fea774668a
commit cdc30beb19
3 changed files with 27 additions and 2 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Mar 31 16:03:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
- 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 <arun@gmx.de>

View File

@ -16,6 +16,15 @@
#
%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
@ -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