2020-02-24 18:58:04 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-nbclient
|
|
|
|
#
|
2021-02-15 14:02:02 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2020-02-24 18:58:04 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-04-01 12:21:32 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
2020-02-24 18:58:04 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-05-24 09:52:13 +02:00
|
|
|
%define skip_python2 1
|
2020-02-24 18:58:04 +01:00
|
|
|
Name: python-nbclient
|
2021-03-08 17:53:16 +01:00
|
|
|
Version: 0.5.3
|
2020-02-24 18:58:04 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A client library for executing notebooks
|
|
|
|
License: BSD-3-Clause
|
|
|
|
URL: https://github.com/jupyter/nbclient
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/nbclient/nbclient-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools >= 38.6.0}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-05-24 09:52:13 +02:00
|
|
|
Requires: python-async_generator
|
2020-09-05 22:12:53 +02:00
|
|
|
Requires: python-jupyter-client >= 6.1.5
|
2020-02-24 18:58:04 +01:00
|
|
|
Requires: python-nbformat >= 5.0
|
2020-06-09 11:07:48 +02:00
|
|
|
Requires: python-nest-asyncio
|
2020-02-24 18:58:04 +01:00
|
|
|
Requires: python-traitlets >= 4.2
|
|
|
|
BuildArch: noarch
|
2021-04-01 12:21:32 +02:00
|
|
|
%if %{with test}
|
2020-05-24 09:52:13 +02:00
|
|
|
BuildRequires: %{python_module async_generator}
|
|
|
|
BuildRequires: %{python_module ipython}
|
2020-02-24 18:58:04 +01:00
|
|
|
BuildRequires: %{python_module ipywidgets}
|
2020-09-05 22:12:53 +02:00
|
|
|
BuildRequires: %{python_module jupyter-client >= 6.1.5}
|
2020-02-24 18:58:04 +01:00
|
|
|
BuildRequires: %{python_module nbconvert}
|
|
|
|
BuildRequires: %{python_module nbformat >= 5.0}
|
2020-06-09 11:07:48 +02:00
|
|
|
BuildRequires: %{python_module nest-asyncio}
|
2020-02-24 18:58:04 +01:00
|
|
|
BuildRequires: %{python_module pytest >= 4.1}
|
|
|
|
BuildRequires: %{python_module testpath}
|
2020-05-24 09:52:13 +02:00
|
|
|
BuildRequires: %{python_module traitlets >= 4.2}
|
2020-02-24 18:58:04 +01:00
|
|
|
BuildRequires: %{python_module xmltodict}
|
2021-04-01 12:21:32 +02:00
|
|
|
%endif
|
2020-02-24 18:58:04 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
A client library for executing notebooks. Formally nbconvert's
|
|
|
|
ExecutePreprocessor.
|
|
|
|
|
|
|
|
NBClient is a tool for parameterizing andexecuting Jupyter Notebooks.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n nbclient-%{version}
|
2021-04-01 12:21:32 +02:00
|
|
|
rm -r nbclient/tests/files/.ipynb_checkpoints
|
2020-02-24 18:58:04 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
2021-04-01 12:21:32 +02:00
|
|
|
%if ! %{with test}
|
2020-02-24 18:58:04 +01:00
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-04-01 12:21:32 +02:00
|
|
|
%endif
|
2020-02-24 18:58:04 +01:00
|
|
|
|
2021-04-01 12:21:32 +02:00
|
|
|
%if %{with test}
|
2020-02-24 18:58:04 +01:00
|
|
|
%check
|
2020-06-09 11:07:48 +02:00
|
|
|
# test_many_parallel_notebooks randomly fails - https://github.com/jupyter/nbclient/pull/74#issuecomment-635929953
|
|
|
|
%pytest -k 'not test_many_parallel_notebooks'
|
2021-04-01 12:21:32 +02:00
|
|
|
%endif
|
2020-02-24 18:58:04 +01:00
|
|
|
|
2021-04-01 12:21:32 +02:00
|
|
|
%if ! %{with test}
|
2020-02-24 18:58:04 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%doc CHANGELOG.md README.md
|
|
|
|
%license LICENSE
|
2020-05-24 09:52:13 +02:00
|
|
|
%{python_sitelib}/nbclient
|
|
|
|
%{python_sitelib}/nbclient-%{version}-py*.egg-info/
|
2021-04-01 12:21:32 +02:00
|
|
|
%endif
|
2020-02-24 18:58:04 +01:00
|
|
|
|
|
|
|
%changelog
|