1
0
python-nbclient/python-nbclient.spec
Benjamin Greiner d44a9e1a04 Accepting request 980896 from home:apersaud:branches:devel:languages:python:jupyter
- specfile:
  * update requirements
- update to version 0.6.4:
  * Merged PRs
    + Make sure kernel is cleaned up in case an error occurred while
      starting kernel client #234 (@CiprianAnton)
    + Suppress most warnings in tests #232 (@davidbrochart)
- changes from version 0.6.3:
  * Bugs fixed
    + Clean up docs and typings #230 (@blink1073)
  * Documentation improvements
    + Clean up docs and typings #230 (@blink1073)
- changes from version 0.6.2:
  * Merged PRs
    + Fix documentation generation #228 (@davidbrochart)
- changes from version 0.6.1:
  * Merged PRs
    + [pre-commit.ci] pre-commit autoupdate #225 (@pre-commit-ci)
    + Add error_on_interrupt trait #224 (@davidbrochart)
    + Fix typo #223 (@davidbrochart)
    + Add on_cell_executed hook #222 (@davidbrochart)
- changes from version 0.6.0:
  * Maintenance and upkeep improvements
    + Fix typings and update mypy settings #220 (@blink1073)
    + Add missing dep on testpath #219 (@blink1073)
    + Add more pre-commit hooks and update flake8 #218 (@blink1073)
  * Documentation improvements
    + Clean up docs handling #216 (@blink1073)

OBS-URL: https://build.opensuse.org/request/show/980896
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclient?expand=0&rev=41
2022-06-05 16:49:19 +00:00

118 lines
3.4 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 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
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-nbclient%{psuffix}
Version: 0.6.4
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 base >= 3.7}
BuildRequires: %{python_module setuptools >= 38.6.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-jupyter-client >= 6.1.5
Requires: python-nbformat >= 5.0
Requires: python-nest-asyncio
Requires: python-traitlets >= 5.2.2
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
%if %{with test}
BuildRequires: %{python_module ipykernel}
BuildRequires: %{python_module ipython < 8}
BuildRequires: %{python_module ipywidgets < 8}
BuildRequires: %{python_module nbclient = %{version}}
BuildRequires: %{python_module pytest >= 4.1}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-cov}
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}
%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 (4 tests) - https://github.com/jupyter/nbclient/pull/74#issuecomment-635929953
donttest="parallel_notebooks"
# https://github.com/jupyter/nbclient/issues/189
donttest+=" or (test_run_all_notebooks and (opts6 or opts8 or opts9))"
# extra -v for more verbose error diffs
%pytest -v -k "not ($donttest)" --asyncio-mode=auto
%endif
%if ! %{with test}
%pre
%python_libalternatives_reset_alternative jupyter-execute
%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