Accepting request 886594 from devel:languages:python:jupyter

OBS-URL: https://build.opensuse.org/request/show/886594
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nbdime?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2021-04-19 19:06:13 +00:00 committed by Git OBS Bridge
commit 9a8918ba77
4 changed files with 49 additions and 19 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53c5219ab56b157acb81faa1e09e36e5ba589a9bece47c6c197348699484a643
size 5046479

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e28da1d79344a4ae2c8ecba0ee3b849909bba5403d913a091e6d430c55ead944
size 5207475

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Sat Apr 17 15:22:45 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to python 3.0.0 / jupyter 6.1.0 / jupyterlab 2.1.0
* Added support for JupyterLab 3. This includes compatability
with jupyter_server (notebook is still supported as well).
* Basic functionality for working with cell ids introduced in
notebook format spec 4.5. Full utilization of this for diffing/
merging functionality is planned for a later release.
* Fixed some issues with inline merging1
-------------------------------------------------------------------
Thu Feb 4 11:03:23 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@ -18,8 +18,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define mainver 2.1.0
%define labver 2.0.1
%define mainver 3.0.0
%define jupver 6.1.0
%define labver 2.1.0
Name: python-nbdime
Version: %{mainver}
Release: 0
@ -29,9 +30,11 @@ URL: https://github.com/jupyter/nbdime
Source: https://files.pythonhosted.org/packages/py2.py3/n/nbdime/nbdime-%{mainver}-py2.py3-none-any.whl
BuildRequires: %{python_module GitPython >= 2.1.6}
BuildRequires: %{python_module Jinja2 >= 2.9}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module jupyter-server-mathjax >= 0.2.2}
BuildRequires: %{python_module jupyter-server}
BuildRequires: %{python_module nbformat}
BuildRequires: %{python_module notebook}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module six}
@ -39,24 +42,32 @@ BuildRequires: %{python_module tornado}
BuildRequires: fdupes
BuildRequires: jupyter-jupyterlab-filesystem
BuildRequires: python-rpm-macros
# SECTION test requirements
# SECTION test requirements (including jupyter_server[test])
BuildRequires: %{python_module ipykernel}
BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module notebook}
BuildRequires: %{python_module pytest-console-scripts}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-tornado}
BuildRequires: %{python_module pytest-tornasync}
BuildRequires: %{python_module pytest}
# /SECTION
Requires: jupyter-nbdime = %{mainver}
Requires: jupyter-nbdime = %{jupver}
Requires: python-GitPython >= 2.1.6
Requires: python-Jinja2 >= 2.9
Requires: python-Pygments
Requires: python-colorama
Requires: python-jupyter-server
Requires: python-jupyter-server-mathjax >= 0.2.2
Requires: python-nbformat
Requires: python-notebook
Requires: python-requests
Requires: python-six
Requires: python-tornado
Conflicts: python-jupyter_nbdime-hg < 1.0.5
Conflicts: python-jupyter_nbdime-git < 1.0.5
Conflicts: python-jupyter_nbdime-hg < 1.0.5
Recommends: python-tabulate
Suggests: python-notebook
Provides: python-jupyter_nbdime = %{mainver}
Obsoletes: python-jupyter_nbdime < %{mainver}
BuildArch: noarch
@ -69,6 +80,7 @@ Jupyter Notebooks.
This package provides the python interface.
%package -n jupyter-nbdime
Version: %{jupver}
Summary: A JupyterLab extension for showing Notebook diffs
Requires: jupyter-nbformat
Requires: jupyter-notebook
@ -97,11 +109,12 @@ Jupyter Notebooks.
This package provides the JupyterLab extension.
%package -n jupyter-nbdime-git
Version: %{jupver}
Summary: Git integration for jupyter-nbdime
Requires: git-core
Requires: jupyter-nbdime = %{mainver}
Provides: python3-jupyter_nbdime-git = %{mainver}
Obsoletes: python3-jupyter_nbdime-git < %{mainver}
Requires: jupyter-nbdime = %{jupver}
Provides: python3-jupyter_nbdime-git = %{jupver}
Obsoletes: python3-jupyter_nbdime-git < %{jupver}
%description -n jupyter-nbdime-git
The nbdime package provides tools for diffing and merging of
@ -110,11 +123,12 @@ Jupyter Notebooks.
This package provides git integration.
%package -n jupyter-nbdime-hg
Version: %{jupver}
Summary: Mercurial integration for jupyter-nbdime
Requires: jupyter-nbdime = %{mainver}
Requires: jupyter-nbdime = %{jupver}
Requires: mercurial
Provides: python3-jupyter_nbdime-hg = %{mainver}
Obsoletes: python3-jupyter_nbdime-hg < %{mainver}
Provides: python3-jupyter_nbdime-hg = %{jupver}
Obsoletes: python3-jupyter_nbdime-hg < %{jupver}
%description -n jupyter-nbdime-hg
The nbdime package provides tools for diffing and merging of
@ -126,17 +140,19 @@ This package provides mercurial integration.
%setup -q -c -T
%build
%python_expand mkdir build; cp -a %{SOURCE0} build
:
%install
%pyproject_install
%pyproject_install %{SOURCE0}
%{jupyter_move_config}
%python_expand sed -i 's/^import mock/from unittest import mock/' %{buildroot}%{$python_sitelib}/nbdime/tests/test_*.py
%python_expand find %{buildroot}%{$python_sitelib} -type f -name "*.py" -exec sed -i 's/\r$//' {} +
%python_expand find %{buildroot}%{$python_sitelib} -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} +
%python_expand find %{buildroot}%{$python_sitelib}/nbdime/ -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
%python_expand rm %{buildroot}%{$python_sitelib}/nbdime/labextension/schemas/nbdime-jupyterlab/package.json.orig
%python_compileall
rm %{buildroot}%{_jupyter_prefix}/labextensions/nbdime-jupyterlab/schemas/nbdime-jupyterlab/package.json.orig
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%fdupes %{buildroot}%{_jupyter_prefix}
cp %{buildroot}%{python3_sitelib}/nbdime-%{mainver}.dist-info/LICENSE.md .
@ -161,12 +177,15 @@ git config --global user.name "tester"
%{_bindir}/nbmerge
%{_bindir}/nbmerge-web
%{_jupyter_nbextension_dir}/nbdime/
%config %{_jupyter_server_confdir}/nbdime.json
%config %{_jupyter_servextension_confdir}/nbdime.json
%config %{_jupyter_nb_notebook_confdir}/nbdime.json
%files -n jupyter-nbdime-jupyterlab
%license LICENSE.md
%{_jupyter_labextensions_dir}/nbdime-jupyterlab-%{labver}.tgz
%dir %{_jupyter_prefix}/labextensions
%{_jupyter_prefix}/labextensions/nbdime-jupyterlab
%{_jupyter_prefix}/lab/extensions/nbdime-jupyterlab-%{labver}.tgz
%files -n jupyter-nbdime-git
%license LICENSE.md