- Update to 6.1.5 * Fix open redirect vulnerability GHSA-c7vm-f5p4-8fqh (CVE to be assigned) - Changes for 6.1.4 * Fix broken links to jupyter documentation * Add additional entries to troubleshooting section * Revert change in page alignment * Bug fix: remove double encoding in download files * Fix typo for Check in zh_CN * Require a file name in the "Save As" dialog - Changes for 6.1.3 * Title new buttons with label if action undefined - Changes for 6.1.2 * Fix russian message format for delete/duplicate actions * Remove unnecessary import of bind_unix_socket * Tooltip style scope fix - Changes for 6.1.1 * Prevent inclusion of requests_unixsocket on Windows - Changes for 6.1.0 Please note that this repository is currently maintained by a skeleton crew of maintainers from the Jupyter community. For our approach moving forward, please see this notice from the README. Thank you. * Remove deprecated encoding parameter for Python 3.9 compatibility. * Add support for async kernel management * Fix typo in password_required help message * Gateway only: Ensure launch and request timeouts are in sync * Update Markdown Cells example to HTML5 video tag * Integrated LoginWidget into edit to enable users to logout from the t… * Update message about minimum Tornado version * Logged notebook type * Added nl language * Add UNIX socket support to notebook server. * Update CodeMirror dependency * Tree added download multiple files * Toolbar buttons tooltip: show help instead of label * Remove unnecessary import of requests_unixsocket * Add ability to cull terminals and track last activity * Code refactoring notebook.js * Install terminado for docs build * Convert notifications JS test to selenium * Add cell attachments to markdown example * Add Japanese document * Migrate Move multiselection test to selenium * Use cmdtrl-enter to run a cell * Fix broken "Raw cell MIME type" dialog * Make a notebook writable after successful save-as * Add actual watch script * Added --autoreload flag to NotebookApp * Enable check_origin on gateway websocket communication * Restore detection of missing terminado package * Culling: ensure last_activity attr exists before use * Added functionality to allow filter kernels by Jupyter Enterprise Gat… * 'Play' icon for run-cell toolbar button * Bump minimum version of jQuery to 3.5.0 * Remove old JS markdown tests, add a new one in selenium * Add support for more RTL languages * Make markdown cells stay RTL in edit mode * Unforce RTL output display * Fixed multicursor backspacing * Implemented Split Cell for multicursor * Alignment issue [FIXED] * MathJax: Support for \gdef * Another (Minor) Duplicate Code Reduction * Update readme regarding maintenance * Document contents chunks * Backspace deletes empty line * The dropdown submenu at notebook page is not keyboard accessible * Tooltips visible through keyboard navigation for specified buttons * Fix for recursive symlink * Fix for the terminal shutdown issue * Add japanese translation files * Workaround for socket permission errors on Cygwin * Implement optional markdown header and footer files * Remove double link when using custom_display_url * Respect cell.is_editable during find-and-replace * Fix exception causes all over the codebase (:ghpull:`5556` * Improve login shell heuristics * Added support for JUPYTER_TOKEN_FILE * Kill notebook itself when server cull idle kernel * Implement password hashing with bcrypt * Fix broken links * Russian internationalization support * Add a metadata tag to override notebook direction (ltr/rtl) * Paste two images from clipboard in markdown cell * Add keyboard shortcuts to menu dropdowns * Update codemirror to 5.56.0+components1 - refresh remove_nose.patch based on gh#jupyter/notebook#5826 - move the entrypoints to the flavored python package and make them alternatives - tag language files OBS-URL: https://build.opensuse.org/request/show/857913 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=25
258 lines
8.9 KiB
RPMSpec
258 lines
8.9 KiB
RPMSpec
#
|
|
# spec file for package python-notebook
|
|
#
|
|
# Copyright (c) 2020 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-notebook%{psuffix}
|
|
Version: 6.1.5
|
|
Release: 0
|
|
Summary: Jupyter Notebook interface
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/jupyter/notebook
|
|
Source0: https://files.pythonhosted.org/packages/source/n/notebook/notebook-%{version}.tar.gz
|
|
Source100: python-notebook-rpmlintrc
|
|
# PATCH-FIX-UPSTREAM remove_nose.patch gh#jupyter/notebook#5826 -- Port the test suite to pytest from nose
|
|
Patch0: remove_nose.patch
|
|
BuildRequires: %{python_module jupyter-core >= 4.4.0}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
Requires: jupyter-notebook = %{version}
|
|
Requires: python-Jinja2
|
|
Requires: python-Send2Trash
|
|
Requires: python-argon2-cffi
|
|
Requires: python-ipykernel
|
|
Requires: python-ipython_genutils
|
|
Requires: python-jupyter-client >= 5.3.4
|
|
Requires: python-jupyter-core >= 4.6.1
|
|
Requires: python-nbconvert
|
|
Requires: python-nbformat
|
|
Requires: python-prometheus_client
|
|
Requires: python-pyzmq >= 17
|
|
Requires: python-terminado >= 0.8.3
|
|
Requires: python-tornado >= 5
|
|
Requires: python-traitlets >= 4.2.1
|
|
Recommends: python-ipywidgets
|
|
Suggests: %{name}-latex
|
|
Provides: python-jupyter_notebook = %{version}
|
|
Obsoletes: python-jupyter_notebook < %{version}
|
|
BuildArch: noarch
|
|
%if !%{with test}
|
|
BuildRequires: fdupes
|
|
BuildRequires: hicolor-icon-theme
|
|
BuildRequires: jupyter-notebook-filesystem
|
|
%endif
|
|
%if %{with test}
|
|
BuildRequires: %{python_module Jinja2}
|
|
BuildRequires: %{python_module Send2Trash}
|
|
BuildRequires: %{python_module argon2-cffi}
|
|
BuildRequires: %{python_module attrs >= 17.4.0}
|
|
BuildRequires: %{python_module ipykernel}
|
|
BuildRequires: %{python_module ipython_genutils}
|
|
BuildRequires: %{python_module jupyter-client >= 5.3.4}
|
|
BuildRequires: %{python_module jupyter-core >= 4.6.1}
|
|
BuildRequires: %{python_module nbconvert}
|
|
BuildRequires: %{python_module nbformat}
|
|
BuildRequires: %{python_module nbval}
|
|
# Some dependency loop involving the jupyter-notebook subpackage could pull in an old version otherwise!
|
|
BuildRequires: %{python_module notebook = %{version}}
|
|
BuildRequires: %{python_module prometheus_client}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module pyzmq >= 17}
|
|
BuildRequires: %{python_module requests-unixsocket}
|
|
BuildRequires: %{python_module requests}
|
|
BuildRequires: %{python_module terminado >= 0.8.3}
|
|
BuildRequires: %{python_module tornado >= 5}
|
|
BuildRequires: %{python_module traitlets >= 4.2.1}
|
|
BuildRequires: pandoc
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
The Jupyter HTML notebook is a web-based notebook environment for
|
|
interactive computing.
|
|
|
|
This package provides the python interface.
|
|
|
|
%package lang
|
|
Summary: Translations for the Jupyter Notebook
|
|
Group: System/Localization
|
|
Requires: python-notebook = %{version}
|
|
Provides: python-jupyter_notebook-lang = %{version}
|
|
Provides: python-notebook-lang-all = %{version}
|
|
Obsoletes: python-jupyter_notebook-lang < %{version}
|
|
|
|
%description lang
|
|
Provides translations for the Jupyter notebook.
|
|
|
|
This package provides the Python module translations.
|
|
|
|
%package -n jupyter-notebook
|
|
Summary: Jupyter Notebook interface
|
|
Group: Development/Languages/Python
|
|
Requires: jupyter-ipykernel
|
|
Requires: jupyter-jupyter-client >= 5.3.4
|
|
Requires: jupyter-jupyter-core >= 4.6.1
|
|
Requires: jupyter-nbconvert
|
|
Requires: jupyter-nbformat
|
|
Requires: jupyter-notebook-filesystem
|
|
Requires: python3-notebook = %{version}
|
|
Conflicts: python3-jupyter_notebook < 5.7.8
|
|
Provides: jupyter-notebook-doc = %{version}
|
|
Obsoletes: jupyter-notebook-doc < %{version}
|
|
|
|
%description -n jupyter-notebook
|
|
The Jupyter HTML notebook is a web-based notebook environment for
|
|
interactive computing.
|
|
|
|
This package provides the jupyter components.
|
|
|
|
%package -n jupyter-notebook-lang
|
|
Summary: Translations for the Jupyter Notebook
|
|
Group: System/Localization
|
|
Requires: jupyter-notebook = %{version}
|
|
Requires: python3-notebook-lang = %{version}
|
|
Provides: jupyter-notebook-lang-all = %{version}
|
|
|
|
%description -n jupyter-notebook-lang
|
|
Provides translations for the Jupyter notebook.
|
|
|
|
This package provides the jupyter component translations.
|
|
|
|
%package -n jupyter-notebook-latex
|
|
Summary: LaTeX support for the Jupyter Notebook
|
|
Group: Development/Languages/Python
|
|
Requires: jupyter-nbconvert-latex
|
|
Requires: jupyter-notebook = %{version}
|
|
Provides: %{python_module jupyter_notebook-latex = %{version}}
|
|
Provides: %{python_module notebook-latex = %{version}}
|
|
Obsoletes: %{python_module jupyter_notebook-latex < %{version}}
|
|
|
|
%description -n jupyter-notebook-latex
|
|
The Jupyter HTML notebook is a web-based notebook environment for
|
|
interactive computing.
|
|
|
|
This package pulls in the LaTeX dependencies for the Jupyter Notebook.
|
|
|
|
%prep
|
|
%setup -q -n notebook-%{version}
|
|
%autopatch -p1
|
|
|
|
# We don't want to run selenium tests
|
|
rm -rf notebook/tests/selenium
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%if !%{with test}
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
# Install icons
|
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
|
|
cp docs/resources/icon_512x512.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/JupyterNotebook.svg
|
|
|
|
for x in 16 24 32 48 64 128 256 512 ; do
|
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/
|
|
cp docs/resources/ipynb.iconset/icon_${x}x${x}.png %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/JupyterNotebook.png
|
|
done
|
|
|
|
%{python_expand # the structure is not compatible with (python_)find_lang. Roll our own.
|
|
find %{buildroot}%{$python_sitelib}/notebook/i18n -type f -o -type l | grep -v '__init__' > lang-files
|
|
sed -E '
|
|
s:%{buildroot}::
|
|
s:(.*/notebook/i18n/)([^/_]+)(.*(mo|po|json)$):%lang(\2) \1\2\3:
|
|
' > %{$python_prefix}-notebook.lang < lang-files
|
|
sed -E '
|
|
s:%{buildroot}::
|
|
s:(.*/notebook/i18n/)([^/_]+)(.*(mo|po|json)$):%exclude \1\2\3:
|
|
' > %{$python_prefix}-notebook.lang-exclude < lang-files
|
|
find %{buildroot}%{$python_sitelib}/notebook/i18n -type d -mindepth 1 | grep -v '__pycache__' > lang-dirs
|
|
sed -E '
|
|
s:%{buildroot}::
|
|
s:(.*):%dir \1:
|
|
' >> %{$python_prefix}-notebook.lang < lang-dirs
|
|
sed -E '
|
|
s:%{buildroot}::
|
|
s:(.*):%exclude %dir \1:
|
|
' >> %{$python_prefix}-notebook.lang-exclude < lang-dirs
|
|
}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-bundlerextension
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-nbextension
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-notebook
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-serverextension
|
|
|
|
%endif
|
|
|
|
%if %{with test}
|
|
%check
|
|
export LANG=en_US.UTF-8
|
|
# test_launch_socket_collision: fails because there are still servers listening
|
|
pythonall_donttest="test_launch_socket_collision"
|
|
%{python_expand # these tests call the wrong interpreter somewhere deep in the stack
|
|
if [ "$python_" != "python3_" -a "%{$python_provides}" != "python3" ]; then
|
|
python_$python_donttest+=" or (test_kernels_api and (test_connection or test_culling))"
|
|
fi
|
|
}
|
|
%pytest -v -k "not (${pythonall_donttest} ${python_$python_donttest})"
|
|
%endif
|
|
|
|
%if !%{with test}
|
|
|
|
%post
|
|
%python_install_alternative jupyter-notebook jupyter-bundlerextension jupyter-nbextension jupyter-serverextension
|
|
|
|
%postun
|
|
%python_uninstall_alternative jupyter-notebook
|
|
|
|
%files %{python_files} -f %{python_prefix}-notebook.lang-exclude
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{python_sitelib}/notebook-*-py*.egg-info
|
|
%{python_sitelib}/notebook/
|
|
%python_alternative %{_bindir}/jupyter-bundlerextension
|
|
%python_alternative %{_bindir}/jupyter-nbextension
|
|
%python_alternative %{_bindir}/jupyter-notebook
|
|
%python_alternative %{_bindir}/jupyter-serverextension
|
|
|
|
%files %{python_files lang} -f %{python_prefix}-notebook.lang
|
|
%license LICENSE
|
|
|
|
%files -n jupyter-notebook
|
|
%license LICENSE
|
|
%{_datadir}/icons/hicolor/*/apps/JupyterNotebook.*
|
|
|
|
%files -n jupyter-notebook-lang
|
|
%license LICENSE
|
|
|
|
%files -n jupyter-notebook-latex
|
|
%license LICENSE
|
|
%endif
|
|
|
|
%changelog
|