python-jupyter-server/python-jupyter-server.spec

137 lines
5.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-jupyter-server
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-jupyter-server
Version: 1.10.2
Release: 0
Accepting request 885974 from home:bnavigator:branches:devel:languages:python:jupyter - Release 1.6.1: * Fix race condition with async kernel management #472 (@jtpio) * Fix kernel lookup #475 (@davidbrochart) * Add Extension App Aliases to Server App #473 (@jtpio) * Correct 'Content-Type' headers #471 (@faucct) - Release 1.6.0: * Add env variable support for port options #461 (@afshin) * Add support for JUPYTER_TOKEN_FILE #462 (@afshin) * Remove unnecessary future imports #464 (@afshin) * Add Changelog to Sphinx Docs #465 (@afshin) * Update description for kernel restarted in the API docs #463 (@jtpio) * Delete the extra “or” that prevents easy cut-and-paste of URLs. #460 (@jasongrout) * Add descriptive log for port unavailable and port-retries=0 #459 (@afshin) * Add ReadTheDocs config #468 (@jtpio) * Update MappingKM.restart_kernel to accept now kwarg #404 (@vidartf) - Release 1.5.1: * Ensure jupyter config dir exists #454 (@afshin) * Allow pre_save_hook to cancel save with HTTPError #456 (@minrk) - Release 1.5.0: * Add Styling to the HTML Pages #452 (@afshin) * Implement password hashing with argon2-cffi #450 (@afshin) * Escape user input in handlers flagged during code scans #449 (@kevin-bates) * Fix for the terminal shutdown issue #446 (@afshin) * Update the branch filter for the CI badge #445 (@jtpio) * Fix for UnboundLocalError in shutdown #444 (@afshin) * Update CI badge and fix broken link #443 (@blink1073) * Fix syntax typo #442 (@kiendang) * Port terminal culling from Notebook #438 (@kevin-bates) * More complex handling of open_browser from extension applications #433 (@afshin) * Correction in Changelog #429 (@Zsailer) * Rename translation function alias #428 (@sngyo) - Note: Don't update to v1.6.2 before setuptools >= 0.49.4 is available, which is required by jupyter-packaging 0.9! OBS-URL: https://build.opensuse.org/request/show/885974 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=33
2021-04-16 14:45:22 +02:00
Summary: The backend to Jupyter web applications
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/jupyter-server/jupyter_server
# need the release tarball for the static stylesheets
Source: https://github.com/jupyter-server/jupyter_server/releases/download/v%{version}/jupyter_server-%{version}.tar.gz
# conftest.py is not in release tarball but required for tests
Source1: https://github.com/jupyter-server/jupyter_server/raw/v%{version}/conftest.py
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module Send2Trash}
BuildRequires: %{python_module anyio >= 3.1.0}
Accepting request 885974 from home:bnavigator:branches:devel:languages:python:jupyter - Release 1.6.1: * Fix race condition with async kernel management #472 (@jtpio) * Fix kernel lookup #475 (@davidbrochart) * Add Extension App Aliases to Server App #473 (@jtpio) * Correct 'Content-Type' headers #471 (@faucct) - Release 1.6.0: * Add env variable support for port options #461 (@afshin) * Add support for JUPYTER_TOKEN_FILE #462 (@afshin) * Remove unnecessary future imports #464 (@afshin) * Add Changelog to Sphinx Docs #465 (@afshin) * Update description for kernel restarted in the API docs #463 (@jtpio) * Delete the extra “or” that prevents easy cut-and-paste of URLs. #460 (@jasongrout) * Add descriptive log for port unavailable and port-retries=0 #459 (@afshin) * Add ReadTheDocs config #468 (@jtpio) * Update MappingKM.restart_kernel to accept now kwarg #404 (@vidartf) - Release 1.5.1: * Ensure jupyter config dir exists #454 (@afshin) * Allow pre_save_hook to cancel save with HTTPError #456 (@minrk) - Release 1.5.0: * Add Styling to the HTML Pages #452 (@afshin) * Implement password hashing with argon2-cffi #450 (@afshin) * Escape user input in handlers flagged during code scans #449 (@kevin-bates) * Fix for the terminal shutdown issue #446 (@afshin) * Update the branch filter for the CI badge #445 (@jtpio) * Fix for UnboundLocalError in shutdown #444 (@afshin) * Update CI badge and fix broken link #443 (@blink1073) * Fix syntax typo #442 (@kiendang) * Port terminal culling from Notebook #438 (@kevin-bates) * More complex handling of open_browser from extension applications #433 (@afshin) * Correction in Changelog #429 (@Zsailer) * Rename translation function alias #428 (@sngyo) - Note: Don't update to v1.6.2 before setuptools >= 0.49.4 is available, which is required by jupyter-packaging 0.9! OBS-URL: https://build.opensuse.org/request/show/885974 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=33
2021-04-16 14:45:22 +02:00
BuildRequires: %{python_module argon2-cffi}
BuildRequires: %{python_module ipython_genutils}
BuildRequires: %{python_module jupyter-client >= 6.1.1}
BuildRequires: %{python_module jupyter-core >= 4.4.0}
BuildRequires: %{python_module jupyter_packaging}
BuildRequires: %{python_module nbconvert}
BuildRequires: %{python_module nbformat}
BuildRequires: %{python_module prometheus_client}
BuildRequires: %{python_module pyzmq >= 17}
BuildRequires: %{python_module requests-unixsocket}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module terminado >= 0.8.3}
BuildRequires: %{python_module tornado >= 6.1}
BuildRequires: %{python_module traitlets >= 4.2.1}
BuildRequires: %{python_module websocket-client}
# We need the full stdlib
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
Requires: python-Send2Trash
Requires: python-anyio >= 3.1.0
Accepting request 885974 from home:bnavigator:branches:devel:languages:python:jupyter - Release 1.6.1: * Fix race condition with async kernel management #472 (@jtpio) * Fix kernel lookup #475 (@davidbrochart) * Add Extension App Aliases to Server App #473 (@jtpio) * Correct 'Content-Type' headers #471 (@faucct) - Release 1.6.0: * Add env variable support for port options #461 (@afshin) * Add support for JUPYTER_TOKEN_FILE #462 (@afshin) * Remove unnecessary future imports #464 (@afshin) * Add Changelog to Sphinx Docs #465 (@afshin) * Update description for kernel restarted in the API docs #463 (@jtpio) * Delete the extra “or” that prevents easy cut-and-paste of URLs. #460 (@jasongrout) * Add descriptive log for port unavailable and port-retries=0 #459 (@afshin) * Add ReadTheDocs config #468 (@jtpio) * Update MappingKM.restart_kernel to accept now kwarg #404 (@vidartf) - Release 1.5.1: * Ensure jupyter config dir exists #454 (@afshin) * Allow pre_save_hook to cancel save with HTTPError #456 (@minrk) - Release 1.5.0: * Add Styling to the HTML Pages #452 (@afshin) * Implement password hashing with argon2-cffi #450 (@afshin) * Escape user input in handlers flagged during code scans #449 (@kevin-bates) * Fix for the terminal shutdown issue #446 (@afshin) * Update the branch filter for the CI badge #445 (@jtpio) * Fix for UnboundLocalError in shutdown #444 (@afshin) * Update CI badge and fix broken link #443 (@blink1073) * Fix syntax typo #442 (@kiendang) * Port terminal culling from Notebook #438 (@kevin-bates) * More complex handling of open_browser from extension applications #433 (@afshin) * Correction in Changelog #429 (@Zsailer) * Rename translation function alias #428 (@sngyo) - Note: Don't update to v1.6.2 before setuptools >= 0.49.4 is available, which is required by jupyter-packaging 0.9! OBS-URL: https://build.opensuse.org/request/show/885974 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=33
2021-04-16 14:45:22 +02:00
Requires: python-argon2-cffi
Requires: python-ipython_genutils
Requires: python-jupyter-client >= 6.1.1
Requires: python-jupyter-core >= 4.4.0
Requires: python-nbconvert
Requires: python-nbformat
Requires: python-prometheus_client
Requires: python-pyzmq >= 17
Requires: python-requests-unixsocket
Requires: python-terminado >= 0.8.3
Requires: python-tornado >= 6.1
Requires: python-traitlets >= 4.2.1
Requires: python-websocket-client
Requires(post): update-alternatives
Requires(postun):update-alternatives
Provides: python-jupyter_server = %{version}-%{release}
Obsoletes: python-jupyter_server < %{version}-%{release}
# SECTION extras_require test
BuildRequires: %{python_module ipykernel}
BuildRequires: %{python_module pytest >= 6}
BuildRequires: %{python_module pytest-console-scripts}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-tornasync}
BuildRequires: %{python_module requests}
# /SECTION
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-jupyter-server = %{version}-%{release}
Obsoletes: jupyter-jupyter-server < %{version}-%{release}
BuildArch: noarch
%endif
%python_subpackages
%description
The Jupyter Server is a web application that allows you to create and
share documents that contain live code, equations, visualizations, and
explanatory text. The Notebook has support for multiple programming
languages, sharing, and interactive widgets.
%prep
%setup -q -n jupyter_server-%{version}
cp %{SOURCE1} ./
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/jupyter-server
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand # provide u-a entrypoints in the correct flavor version -- installed packages and jupyter-server
mkdir build/testbin
for bin in %{_bindir}/*-%{$python_bin_suffix} %{buildroot}%{_bindir}/*-%{$python_bin_suffix} ; do
# four percent into 1 by rpm/python expansions
ln -s ${bin} build/testbin/$(basename ${bin%%%%-%{$python_bin_suffix}})
done
}
export LANG=en_US.UTF-8
export PATH=$PWD/build/testbin:$PATH
Accepting request 885974 from home:bnavigator:branches:devel:languages:python:jupyter - Release 1.6.1: * Fix race condition with async kernel management #472 (@jtpio) * Fix kernel lookup #475 (@davidbrochart) * Add Extension App Aliases to Server App #473 (@jtpio) * Correct 'Content-Type' headers #471 (@faucct) - Release 1.6.0: * Add env variable support for port options #461 (@afshin) * Add support for JUPYTER_TOKEN_FILE #462 (@afshin) * Remove unnecessary future imports #464 (@afshin) * Add Changelog to Sphinx Docs #465 (@afshin) * Update description for kernel restarted in the API docs #463 (@jtpio) * Delete the extra “or” that prevents easy cut-and-paste of URLs. #460 (@jasongrout) * Add descriptive log for port unavailable and port-retries=0 #459 (@afshin) * Add ReadTheDocs config #468 (@jtpio) * Update MappingKM.restart_kernel to accept now kwarg #404 (@vidartf) - Release 1.5.1: * Ensure jupyter config dir exists #454 (@afshin) * Allow pre_save_hook to cancel save with HTTPError #456 (@minrk) - Release 1.5.0: * Add Styling to the HTML Pages #452 (@afshin) * Implement password hashing with argon2-cffi #450 (@afshin) * Escape user input in handlers flagged during code scans #449 (@kevin-bates) * Fix for the terminal shutdown issue #446 (@afshin) * Update the branch filter for the CI badge #445 (@jtpio) * Fix for UnboundLocalError in shutdown #444 (@afshin) * Update CI badge and fix broken link #443 (@blink1073) * Fix syntax typo #442 (@kiendang) * Port terminal culling from Notebook #438 (@kevin-bates) * More complex handling of open_browser from extension applications #433 (@afshin) * Correction in Changelog #429 (@Zsailer) * Rename translation function alias #428 (@sngyo) - Note: Don't update to v1.6.2 before setuptools >= 0.49.4 is available, which is required by jupyter-packaging 0.9! OBS-URL: https://build.opensuse.org/request/show/885974 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=33
2021-04-16 14:45:22 +02:00
if [ -e ~/.local/share/jupyter ]; then
echo "WARNING: Not a clean test environment."
echo "You might need to delete ~/.local/share/jupyter in order to avoid test failures."
fi
%pytest jupyter_server
%post
%python_install_alternative jupyter-server
%postun
%python_uninstall_alternative jupyter-server
%files %{python_files}
%doc README.md
%license COPYING.md
%python_alternative %{_bindir}/jupyter-server
%{python_sitelib}/jupyter_server
%{python_sitelib}/jupyter_server-%{version}*-info
%changelog