Sync from SUSE:SLFO:Main python-nbdime revision 81350ad0557e7e7e44d91969f611cf32

This commit is contained in:
Adrian Schröter 2024-05-03 21:36:41 +02:00
commit 80c81c0691
4 changed files with 496 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
nbdime-3.2.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

183
python-nbdime.changes Normal file
View File

@ -0,0 +1,183 @@
-------------------------------------------------------------------
Tue May 9 20:31:51 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to python v3.2.1
* Fixed incorrect exit code submission when succesfully closing
web tools.
-------------------------------------------------------------------
Sun Apr 23 20:15:14 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to python v3.2.0 / jupyter 6.2.0 / jupyterlab 2.2.0
* no upstream release notes.
-------------------------------------------------------------------
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>
- Modernize jupyter packaging: alternatives, config, provides
-------------------------------------------------------------------
Sat Nov 13 15:34:18 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to python 3.1.1 / jupyter 6.1.2 / jupyterlab 2.1.1
* Removed py2 compatibility code.
* Fixed issue with certain output diffs in web view.
- Fixes CVE-2021-41134, CWE-75, CWE-80, boo#1192355
* Improper handling of user controlled input caused a stored
cross-site scripting (XSS) vulnerability. All previous versions
of nbdime are affected.
-------------------------------------------------------------------
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>
- Update to 2.1.0 / jupyterlab extension 2.0.1
* Dropped Python 3.5 support.
* Optimize comparison of large stream outputs.
* Fixed an error when merging a file that were concurrently added
in two branches with git.
* Fixed a config bug where ignore configs written in a file was
not taken into account.
* Fixed compatibility with JupyterLab 2.2
- Changes in 2.0.0
* Dropped Python 2 support, and Python 3.4 support.
* Made web apps (e.g. nbdiff-web) work properly offline.
* Fix for git driver with renamed files.
- Fix new wheel location for %pyproject_install
-------------------------------------------------------------------
Thu Apr 23 10:42:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- As py2 support is dropped remove py2 dependencies
-------------------------------------------------------------------
Sat Jan 11 14:10:51 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
- Use pyproject_install macro (boo#1094323)
- Do not rewrite source artifact
-------------------------------------------------------------------
Tue Nov 12 17:38:51 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Drop python2 support due to python-notebook dropping python2 support
-------------------------------------------------------------------
Tue Aug 20 14:38:49 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Tests require jsonschema 3.
-------------------------------------------------------------------
Sun Aug 11 03:39:51 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Update to 1.1.0
* Add rest API for server extension for handling pure git diffs
of notebooks. This allows for a cleaner call without prefixing
the filename etc. This is currently only available on the
server extension, but can be moved to the main server if there
is demand.
- Update to 1.0.7
* Fixes an issue using config files (PR #476).
* Upgrades to using lab 1.0 components, which also allows lab
extension to support lab 1.0.
- Update to 1.0.6
* Fixed a styling regression from 1.0.5, where the web text panes
had incorrect styling (most notably incorrect widths).
-------------------------------------------------------------------
Thu May 16 19:08:20 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Specify which version number is being used to avoid conflicts.
-------------------------------------------------------------------
Wed May 15 15:56:00 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Add conflicts to jupyter subpackage to more explicitly handle
file overlaps with old naming scheme.
-------------------------------------------------------------------
Thu Apr 25 01:59:57 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Update to 1.0.5
* Fixed filename encoding issue with git diff on Python 2.
* Fixes for deploying nbdime on a non-localhost server.
* Web: Fixed issue where unchanged cells would not show correctly if unhidden.
* Various other fixes and adjustments.
- Rename to to match jupyter package naming guidelines.
-------------------------------------------------------------------
Sat Dec 22 07:11:41 UTC 2018 - Todd R <toddrme2178@gmail.com>
- Update to version 1.0.4
* Fix git diffing failure with older versions of git. Now, an older version of git will simply prevent integration with git filters.
* Allow for two-way merge by making the base notebook argument to `nbmerge` optional. It will now default to an empty notebook.
- Update to version 1.0.3
* Web: Fix issues with hiding unchanged cells. Make hiding unchanged cells configurable and on by default.
* Options of the console printing can now be configured. Mainly the `--no-color` flag disables ANSI color escapes.
* Web: Fixed MathJax math rendering.
* Various other fixes and adjustments.
-------------------------------------------------------------------
Thu Aug 2 18:14:08 UTC 2018 - toddrme2178@gmail.com
- Update to version 1.0.2
* Diff: Optimized diffing of large texts (e.g. big cells).
* Config: Fixed several issues with the config system.
* Lab extension: Updated to latest jupyterlab. All npm packages are now using ES6 features.
* Web: Fixed keyboard tabbing / focusing issues.
- Update to version 1.0.1
* Web: Fix output rendering of outputs with a period in MIME type name.
* Config: Add configuration option for front-end extensions.
* Merging: Fix handling of corner case for inline merge strategy.
* Various other fixes and adjustments.
-------------------------------------------------------------------
Sun Jun 10 11:02:54 UTC 2018 - jengelh@inai.de
- Use find "+" strategy.
- Use noun phrase in summary.
-------------------------------------------------------------------
Fri May 18 14:53:54 UTC 2018 - toddrme2178@gmail.com
- Update to version 1.0.0
* Added ability for git diff driver to integrate with git filters.
* Improved/fixed merge resolution for similar cell insertions.
* Added config system to allow for configuring the various entrypoints. Especially useful for customizing which keys to ignore when diffing.
* Added control to web view of outputs to select which MIME type to render, and to enable trusting of outputs for full rendering.
* Added jupyterlab extension. Frontend/server extensions are now enabled by default on installation.
* Various fixes and adjustments.
- Switch to wheel-based install
-------------------------------------------------------------------
Fri May 18 08:34:04 UTC 2018 - tchvatal@suse.com
- Remove python3-jupyter_vega3 requires as we never had this pkg
present in the d:l:py, it is not mentioned in the setup.py
- Run the tests
-------------------------------------------------------------------
Fri Apr 20 22:08:22 UTC 2018 - toddrme2178@gmail.com
- Initial version

287
python-nbdime.spec Normal file
View File

@ -0,0 +1,287 @@
#
# spec file for package python-nbdime
#
# Copyright (c) 2023 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/
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%define pyver 3.2.1
%define labver 2.2.0
%define jupver 6.2.0
%define anypythondist python3dist
# always cut trailing .0
%define pyverdist 3.2.1
%define mainbins nbdime nbshow nbdiff nbdiff-web nbmerge nbmerge-web
%define gitbins git-nbdifftool git-nbmergetool git-nbdiffdriver git-nbmergedriver
%define hgbins hg-nbdiff hg-nbdiffweb hg-nbmerge hg-nbmergeweb
Name: python-nbdime
Version: %{pyver}
Release: 0
Summary: Tools for diffing and merging Jupyter Notebooks
License: BSD-3-Clause
URL: https://github.com/jupyter/nbdime
Source: https://files.pythonhosted.org/packages/source/n/nbdime/nbdime-%{pyver}.tar.gz
BuildRequires: %{python_module GitPython >= 2.1.6}
BuildRequires: %{python_module Jinja2 >= 2.9}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module base >= 3.6}
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 pip}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tornado}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: jupyter-rpm-macros
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module jupyter-server-test}
BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module notebook}
BuildRequires: %{python_module pytest >= 3.6}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-tornado}
# /SECTION
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-requests
Requires: python-tornado
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
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 = %{pyver}-%{release}
Obsoletes: python-jupyter_nbdime < %{pyver}-%{release}
BuildArch: noarch
%python_subpackages
%description
The nbdime package provides tools for diffing and merging of
Jupyter Notebooks.
This package provides the python interface.
%package -n jupyter-nbdime
Version: %{jupver}
Summary: A JupyterLab extension for showing Notebook diffs
Requires: %{anypythondist}(nbdime) = %{pyverdist}
Conflicts: python3-jupyter_nbdime < 1.0.5
%description -n jupyter-nbdime
The nbdime package provides tools for diffing and merging of
Jupyter Notebooks.
This package provides the tools and jupyter notebook extension.
%package -n jupyter-nbdime-jupyterlab
Version: %{labver}
Release: 0
Summary: A JupyterLab extension for showing Notebook diffs
Requires: jupyter-jupyterlab
Requires: %{anypythondist}(nbdime) = %{pyverdist}
%description -n jupyter-nbdime-jupyterlab
The nbdime package provides tools for diffing and merging of
Jupyter Notebooks.
This package provides the JupyterLab extension.
%package git
Version: %{pyver}
Summary: Git integration for python-nbdime
Requires: git-core
Requires: python-nbdime = %{pyver}
# python3-jupyter_nbdime-git = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022
Provides: python-jupyter_nbdime-git = %{jupver}-%{release}
Obsoletes: python-jupyter_nbdime-git < %{jupver}-%{release}
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-nbdime-git = %{jupver}-%{release}
Obsoletes: jupyter-nbdime-git < %{jupver}-%{release}
%else
Conflicts: jupyter-nbdime-git < %{jupver}-%{release}
%endif
%if %{with libalternatives}
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
%description git
The nbdime package provides tools for diffing and merging of
Jupyter Notebooks.
This package provides git integration.
%package hg
Version: %{pyver}
Summary: Mercurial integration for python-nbdime
Requires: mercurial
Requires: python-nbdime = %{pyver}
# python3-jupyter_nbdime-hg = JUPVER (!) was provided by a jupyter-nbdime-git package until end of 2022
Provides: python-jupyter_nbdime-hg = %{jupver}-%{release}
Obsoletes: python-jupyter_nbdime-hg < %{jupver}-%{release}
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-nbdime-hg = %{jupver}-%{release}
Obsoletes: jupyter-nbdime-hg < %{jupver}-%{release}
%else
Conflicts: jupyter-nbdime-hg < %{jupver}-%{release}
%endif
%if %{with libalternatives}
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
%description hg
The nbdime package provides tools for diffing and merging of
Jupyter Notebooks.
This package provides mercurial integration.
%prep
%autosetup -p1 -n nbdime-%{pyver}
find . -type f -name "*.py" -exec sed -i 's/\r$//' {} +
find . -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} +
find ./nbdime/ -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
rm nbdime/labextension/schemas/nbdime-jupyterlab/package.json.orig
%build
%pyproject_wheel
%install
%pyproject_install
for b in %mainbins %gitbins %hgbins; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
%{jupyter_move_config}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%fdupes %{buildroot}%{_jupyter_prefix}
%check
# freshly to be install libalternatives commands are not yet flavorbinned automatically
%if %{with libalternatives}
%{python_expand mkdir -p build/flavorbin
for b in %mainbins %gitbins %hgbins; do
ln -s %{buildroot}%{_bindir}/$b-%{$python_bin_suffix} build/flavorbin/$b
done
}
%endif
git config --global user.email "test@test.com"
git config --global user.name "tester"
git config --global init.defaultBranch master
%pytest --pyargs nbdime
%pre
# remove any non-symlink bin before installing the alternative links
for b in %mainbins; do
[ -f %{_bindir}/$b -a ! -h %{_bindir}/$b ] && rm %{_bindir}/$b
done
%python_libalternatives_reset_alternative nbdime
%post
%python_install_alternative %mainbins
%postun
%python_uninstall_alternative nbdime
%pre git
# remove any non-symlink bin before installing the alternative links
for b in %gitbins; do
[ -f %{_bindir}/$b -a ! -h %{_bindir}/$b ] && rm %{_bindir}/$b
done
%python_libalternatives_reset_alternative git-nbdifftool
%post git
%python_install_alternative %gitbins
%postun git
%python_uninstall_alternative git-nbdifftool
%pre hg
# remove any non-symlink bin before installing the alternative links
for b in %hgbins; do
[ -f %{_bindir}/$b -a ! -h %{_bindir}/$b ] && rm %{_bindir}/$b
done
%python_libalternatives_reset_alternative hg-nbdiff
%post hg
%python_install_alternative %hgbins
%postun hg
%python_uninstall_alternative hg-nbdiff
%files %{python_files}
%license LICENSE.md
%python_alternative %{_bindir}/nbdime
%python_alternative %{_bindir}/nbshow
%python_alternative %{_bindir}/nbdiff
%python_alternative %{_bindir}/nbdiff-web
%python_alternative %{_bindir}/nbmerge
%python_alternative %{_bindir}/nbmerge-web
%{python_sitelib}/nbdime/
%{python_sitelib}/nbdime-%{pyver}.dist-info/
%files %{python_files git}
%license LICENSE.md
%python_alternative %{_bindir}/git-nbdiffdriver
%python_alternative %{_bindir}/git-nbdifftool
%python_alternative %{_bindir}/git-nbmergedriver
%python_alternative %{_bindir}/git-nbmergetool
%files %{python_files hg}
%license LICENSE.md
%python_alternative %{_bindir}/hg-nbdiff
%python_alternative %{_bindir}/hg-nbdiffweb
%python_alternative %{_bindir}/hg-nbmerge
%python_alternative %{_bindir}/hg-nbmergeweb
%files -n jupyter-nbdime
%license LICENSE.md
%{_jupyter_nbextension_dir}/nbdime/
%_jupyter_config %{_jupyter_server_confdir}/nbdime.json
%_jupyter_config %{_jupyter_servextension_confdir}/nbdime.json
%_jupyter_config %{_jupyter_nb_notebook_confdir}/nbdime.json
%files -n jupyter-nbdime-jupyterlab
%license LICENSE.md
%dir %{_jupyter_prefix}/labextensions
%{_jupyter_labextensions_dir3}/nbdime-jupyterlab
%{_jupyter_labextensions_dir}/nbdime-jupyterlab-%{labver}.tgz
%changelog