Accepting request 1062938 from devel:languages:python:jupyter

- Package current master commit as version 3.1.1.27.g2da614b
  * generated sdist with networked machine capable of running npm
- Notable PRs included:
  * Remove usage of ipython_genutils #618
  * Jupyter server 2.0 compatability fixes #649
  * Compatible with asynchronous contentsmanager #596
  * Update typescript #641
  * Update cell marker format to use bold correctly #648

OBS-URL: https://build.opensuse.org/request/show/1062938
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nbdime?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2023-02-03 21:05:37 +00:00 committed by Git OBS Bridge
commit 494e353ef4
4 changed files with 59 additions and 32 deletions

3
nbdime-3.1.1.dev0.tar.gz Normal file
View File

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

View File

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

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Feb 2 14:47:20 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Package current master commit as version 3.1.1.27.g2da614b
* generated sdist with networked machine capable of running npm
- Notable PRs included:
* Remove usage of ipython_genutils #618
* Jupyter server 2.0 compatability fixes #649
* Compatible with asynchronous contentsmanager #596
* Update typescript #641
* Update cell marker format to use bold correctly #648
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 29 20:15:44 UTC 2022 - Ben Greiner <code@bnavigator.de> Thu Dec 29 20:15:44 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-nbdime # spec file for package python-nbdime
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -22,20 +22,33 @@
%bcond_with libalternatives %bcond_with libalternatives
%endif %endif
%define skip_python2 1 %define gitcommits 27
%define mainver 3.1.1 %define gitcommit 2da614b
%define pyver 3.1.1
%define labver 2.1.1
%define jupver 6.1.2 %define jupver 6.1.2
%define labver 2.1.1 %{?gitcommits:%define mainsuffix .%{gitcommits}.g%{gitcommit}}
%define mpyver %{pyver}%{?mainsuffix}
%define mjupver %{jupver}%{?mainsuffix}
%define mlabver %{labver}%{?mainsuffix}
%define anypythondist python3dist
%define mainbins nbdime nbshow nbdiff nbdiff-web nbmerge nbmerge-web %define mainbins nbdime nbshow nbdiff nbdiff-web nbmerge nbmerge-web
%define gitbins git-nbdifftool git-nbmergetool git-nbdiffdriver git-nbmergedriver %define gitbins git-nbdifftool git-nbmergetool git-nbdiffdriver git-nbmergedriver
%define hgbins hg-nbdiff hg-nbdiffweb hg-nbmerge hg-nbmergeweb %define hgbins hg-nbdiff hg-nbdiffweb hg-nbmerge hg-nbmergeweb
Name: python-nbdime Name: python-nbdime
Version: %{mainver} Version: %{mpyver}
Release: 0 Release: 0
Summary: Tools for diffing and merging Jupyter Notebooks Summary: Tools for diffing and merging Jupyter Notebooks
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/jupyter/nbdime URL: https://github.com/jupyter/nbdime
Source: https://files.pythonhosted.org/packages/source/n/nbdime/nbdime-%{mainver}.tar.gz # Source: https://files.pythonhosted.org/packages/source/n/nbdime/nbdime-%%{pyver}.tar.gz
# Building from non-pypy published source repositories requires npm install to fetch javascript sources online
# Created on a network connected system with in a working directory without ':' in the the pathname.
# git clone https://github.com/jupyter/nbdime.git
# cd nbdime
# python3 -m build --sdist .
# git describe --tags --match '[0-9].*' | sed -e 's/^/mpyver /' -e 's/-/./g'
Source: nbdime-%{pyver}.dev0.tar.gz
BuildRequires: %{python_module GitPython >= 2.1.6} BuildRequires: %{python_module GitPython >= 2.1.6}
BuildRequires: %{python_module Jinja2 >= 2.9} BuildRequires: %{python_module Jinja2 >= 2.9}
BuildRequires: %{python_module Pygments} BuildRequires: %{python_module Pygments}
@ -61,7 +74,7 @@ BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-timeout} BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-tornado} BuildRequires: %{python_module pytest-tornado}
# /SECTION # /SECTION
Requires: jupyter-nbdime = %{jupver} Requires: jupyter-nbdime = %{mjupver}
Requires: python-GitPython >= 2.1.6 Requires: python-GitPython >= 2.1.6
Requires: python-Jinja2 >= 2.9 Requires: python-Jinja2 >= 2.9
Requires: python-Pygments Requires: python-Pygments
@ -82,8 +95,8 @@ Conflicts: python-jupyter_nbdime-git < 1.0.5
Conflicts: python-jupyter_nbdime-hg < 1.0.5 Conflicts: python-jupyter_nbdime-hg < 1.0.5
Recommends: python-tabulate Recommends: python-tabulate
Suggests: python-notebook Suggests: python-notebook
Provides: python-jupyter_nbdime = %{mainver}-%{release} Provides: python-jupyter_nbdime = %{mpyver}-%{release}
Obsoletes: python-jupyter_nbdime < %{mainver}-%{release} Obsoletes: python-jupyter_nbdime < %{mpyver}-%{release}
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@ -94,9 +107,9 @@ Jupyter Notebooks.
This package provides the python interface. This package provides the python interface.
%package -n jupyter-nbdime %package -n jupyter-nbdime
Version: %{jupver} Version: %{mjupver}
Summary: A JupyterLab extension for showing Notebook diffs Summary: A JupyterLab extension for showing Notebook diffs
Requires: (%(echo "%{python_module nbdime = %{mainver}@or@}" | sed "s/@or@/ or /g" | sed 's/ or\s*$//')) Requires: %{anypythondist}(nbdime) = %{pyver}%{?gitcommits:.%gitcommits}
Conflicts: python3-jupyter_nbdime < 1.0.5 Conflicts: python3-jupyter_nbdime < 1.0.5
%description -n jupyter-nbdime %description -n jupyter-nbdime
@ -106,11 +119,11 @@ Jupyter Notebooks.
This package provides the tools and jupyter notebook extension. This package provides the tools and jupyter notebook extension.
%package -n jupyter-nbdime-jupyterlab %package -n jupyter-nbdime-jupyterlab
Version: %{labver} Version: %{mlabver}
Release: 0 Release: 0
Summary: A JupyterLab extension for showing Notebook diffs Summary: A JupyterLab extension for showing Notebook diffs
Requires: jupyter-jupyterlab Requires: jupyter-jupyterlab
Requires: (%(echo "%{python_module nbdime = %{mainver}@or@}" | sed "s/@or@/ or /g" | sed 's/ or\s*$//')) Requires: %{anypythondist}(nbdime) = %{pyver}%{?gitcommits:.%gitcommits}
%description -n jupyter-nbdime-jupyterlab %description -n jupyter-nbdime-jupyterlab
The nbdime package provides tools for diffing and merging of The nbdime package provides tools for diffing and merging of
@ -119,18 +132,18 @@ Jupyter Notebooks.
This package provides the JupyterLab extension. This package provides the JupyterLab extension.
%package git %package git
Version: %{mainver} Version: %{mpyver}
Summary: Git integration for python-nbdime Summary: Git integration for python-nbdime
Requires: git-core Requires: git-core
Requires: python-nbdime = %{mainver} Requires: python-nbdime = %{mpyver}
# python3-jupyter_nbdime-git = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022 # python3-jupyter_nbdime-git = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022
Provides: python-jupyter_nbdime-git = %{jupver}-%{release} Provides: python-jupyter_nbdime-git = %{mjupver}-%{release}
Obsoletes: python-jupyter_nbdime-git < %{jupver}-%{release} Obsoletes: python-jupyter_nbdime-git < %{mjupver}-%{release}
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-nbdime-git = %{jupver}-%{release} Provides: jupyter-nbdime-git = %{mjupver}-%{release}
Obsoletes: jupyter-nbdime-git < %{jupver}-%{release} Obsoletes: jupyter-nbdime-git < %{mjupver}-%{release}
%else %else
Conflicts: jupyter-nbdime-git < %{jupver}-%{release} Conflicts: jupyter-nbdime-git < %{mjupver}-%{release}
%endif %endif
%if %{with libalternatives} %if %{with libalternatives}
Requires: alts Requires: alts
@ -146,18 +159,18 @@ Jupyter Notebooks.
This package provides git integration. This package provides git integration.
%package hg %package hg
Version: %{mainver} Version: %{mpyver}
Summary: Mercurial integration for python-nbdime Summary: Mercurial integration for python-nbdime
Requires: mercurial Requires: mercurial
Requires: python-nbdime = %{mainver} Requires: python-nbdime = %{mpyver}
# python3-jupyter_nbdime-hg = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022 # python3-jupyter_nbdime-hg = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022
Provides: python-jupyter_nbdime-hg = %{jupver}-%{release} Provides: python-jupyter_nbdime-hg = %{mjupver}-%{release}
Obsoletes: python-jupyter_nbdime-hg < %{jupver}-%{release} Obsoletes: python-jupyter_nbdime-hg < %{mjupver}-%{release}
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-nbdime-hg = %{jupver}-%{release} Provides: jupyter-nbdime-hg = %{mjupver}-%{release}
Obsoletes: jupyter-nbdime-hg < %{jupver}-%{release} Obsoletes: jupyter-nbdime-hg < %{mjupver}-%{release}
%else %else
Conflicts: jupyter-nbdime-hg < %{jupver}-%{release} Conflicts: jupyter-nbdime-hg < %{mjupver}-%{release}
%endif %endif
%if %{with libalternatives} %if %{with libalternatives}
Requires: alts Requires: alts
@ -173,7 +186,9 @@ Jupyter Notebooks.
This package provides mercurial integration. This package provides mercurial integration.
%prep %prep
%autosetup -p1 -n nbdime-%{mainver} %autosetup -p1 -n nbdime-%{pyver}.dev0
%{?gitcommits:sed -i "s/'dev'/'%{gitcommits}'/" nbdime/_version.py}
# gh#jupyter/nbdime#651
sed -i 's/^import mock/from unittest import mock/' nbdime/tests/test_*.py sed -i 's/^import mock/from unittest import mock/' nbdime/tests/test_*.py
find . -type f -name "*.py" -exec sed -i 's/\r$//' {} + find . -type f -name "*.py" -exec sed -i 's/\r$//' {} +
find . -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} + find . -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} +
@ -254,7 +269,7 @@ done
%python_alternative %{_bindir}/nbmerge %python_alternative %{_bindir}/nbmerge
%python_alternative %{_bindir}/nbmerge-web %python_alternative %{_bindir}/nbmerge-web
%{python_sitelib}/nbdime/ %{python_sitelib}/nbdime/
%{python_sitelib}/nbdime-%{mainver}.dist-info/ %{python_sitelib}/nbdime-%{pyver}%{?gitcommits:.%gitcommits}.dist-info/
%files %{python_files git} %files %{python_files git}
%license LICENSE.md %license LICENSE.md