forked from pool/python-nbclient
Benjamin Greiner
032aa09039
- Update to version 0.5.8 * Prepare for use with Jupyter Releaser #175 (@davidbrochart) * Move IPYKERNEL_CELL_NAME from tox to pytest #172 (@frenzymadness) * Added CLI to README #170 (@palewire) * Add "jupyter execute" command-line interface #165 (@palewire) * Fix: updating buffers overwrote previous buffers #169 (@maartenbreddels) * Fix tests for ipykernel without debugpy #166 (@frenzymadness) * gitignore Pipfile #164 (@palewire) * Fixed CONTRIBUTING.md link #163 (@palewire) * Fix typo #162 (@The-Compiler) * Move format & lint to pre-commit #161 (@chrisjsewell) * Add skip-execution cell tag functionality #151 (@chrisjsewell) - Not enabling new jupyter-run entrypoint due to conflict with jupyter_client OBS-URL: https://build.opensuse.org/request/show/931394 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclient?expand=0&rev=24
108 lines
3.3 KiB
RPMSpec
108 lines
3.3 KiB
RPMSpec
#
|
|
# spec file
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%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%{psuffix}
|
|
Version: 0.5.8
|
|
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
|
|
%if 0%{?python_version_nodots} < 37
|
|
Requires: python-async_generator
|
|
%endif
|
|
Requires: python-jupyter-client >= 6.1.5
|
|
Requires: python-nbformat >= 5.0
|
|
Requires: python-nest-asyncio
|
|
Requires: python-traitlets >= 4.2
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module async_generator if %python-base < 3.7}
|
|
BuildRequires: %{python_module ipython}
|
|
BuildRequires: %{python_module ipywidgets}
|
|
BuildRequires: %{python_module jupyter-client >= 6.1.5}
|
|
BuildRequires: %{python_module nbconvert}
|
|
BuildRequires: %{python_module nbformat >= 5.0}
|
|
BuildRequires: %{python_module nest-asyncio}
|
|
BuildRequires: %{python_module pytest >= 4.1}
|
|
BuildRequires: %{python_module testpath}
|
|
BuildRequires: %{python_module traitlets >= 4.2}
|
|
BuildRequires: %{python_module xmltodict}
|
|
%endif
|
|
%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}
|
|
# conflict with jupyter_client -- https://github.com/jupyter/nbclient/pull/173#issuecomment-968292909
|
|
sed -i '/jupyter-run =/ d' setup.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%if ! %{with test}
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-execute
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%endif
|
|
|
|
%if %{with test}
|
|
%check
|
|
export IPYKERNEL_CELL_NAME="<IPY-INPUT>"
|
|
# tests on parallel notebooks randomly fail - https://github.com/jupyter/nbclient/pull/74#issuecomment-635929953
|
|
%pytest -k 'not (test_many_parallel_notebooks or test_async_parallel_notebooks)'
|
|
%endif
|
|
|
|
%if ! %{with test}
|
|
%post
|
|
%python_install_alternative jupyter-execute
|
|
|
|
%postun
|
|
%python_uninstall_alternative jupyter-execute
|
|
|
|
%files %{python_files}
|
|
%doc CHANGELOG.md README.md
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/jupyter-execute
|
|
%{python_sitelib}/nbclient
|
|
%{python_sitelib}/nbclient-%{version}*-info/
|
|
%endif
|
|
|
|
%changelog
|