1
0
python-jupyter-server/python-jupyter-server.spec

162 lines
5.3 KiB
RPMSpec
Raw Normal View History

#
# spec file
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-jupyter-server%{psuffix}
Version: 2.0.6
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
2022-06-14 18:59:46 +02:00
URL: https://jupyter-server.readthedocs.io
# SourceRepository: https://github.com/jupyter-server/jupyter_server
Source: https://files.pythonhosted.org/packages/source/j/jupyter_server/jupyter_server-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatch-jupyter-builder >= 0.8.1}
BuildRequires: %{python_module hatchling >= 1.11}
BuildRequires: %{python_module pip}
# We need the full stdlib
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python >= 3.8
Requires: python-Jinja2
Requires: python-Send2Trash
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-jupyter-client >= 7.4.4
Requires: python-jupyter_events >= 0.4.0
Requires: python-jupyter_server_terminals
2022-06-14 18:59:46 +02:00
Requires: python-nbconvert >= 6.4.4
Requires: python-nbformat >= 5.3.0
Requires: python-packaging
Requires: python-prometheus_client
Requires: python-pyzmq >= 24
Requires: python-terminado >= 0.8.3
Requires: python-tornado >= 6.2
Requires: python-traitlets >= 5.6
Requires: python-websocket-client
Requires: ((python-jupyter-core >= 4.12 with python-jupyter-core < 5.0) or python-jupyter-core >= 5.1)
Requires: (python-anyio >= 3.1.0 with python-anyio < 4)
Accepting request 964363 from home:bnavigator:branches:devel:languages:python:jupyter - Update to verson 1.15.6 * Missing warning when no authorizer in found ZMQ handlers #744 (@Zsailer) - Release notes for 1.15.5 * Relax type checking on ExtensionApp.serverapp #739 (@minrk) * raise no-authorization warning once and allow disabled authorization #738 (@Zsailer) - Release notes for 1.15.4 * Fix server-extension paths (3rd time's the charm) #734 (@minrk) - Release notes for 1.15.2 * allow handlers to work without an authorizer in the Tornado settings #717 (@Zsailer) - Release notes for 1.15.1 * Revert "Re-use ServerApp.config_file_paths for consistency (#715)" #728 (@blink1073) - Release notes for 1.15.0 * Add authorization layer to server request handlers #165 (@Zsailer) Enhancements made * Validate notebooks once per fetch or save #724 (@kevin-bates) * Register pre/post save hooks, call them sequentially #696 (@davidbrochart) * Implement Required Methods in Async Manner #721 (@jhamet93) * Call pre_save_hook only on first chunk of large files #716 (@davidbrochart) * Re-use ServerApp.config_file_paths for consistency #715 (@minrk) * serverapp: Use .absolute() instead of .resolve() for symlinks #712 (@EricCousineau-TRI) * Fall back to legacy protocol if selected_subprotocol raises exception #706 (@davidbrochart) * Fix FilesHandler not meet RFC 6713 #701 (@Wh1isper) OBS-URL: https://build.opensuse.org/request/show/964363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=44
2022-03-23 20:32:08 +01:00
Provides: python-jupyter_server = %{version}-%{release}
Obsoletes: python-jupyter_server < %{version}-%{release}
%if %{with test}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module jupyter-server-test = %{version}}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xdist}
%endif
%if %{with libalternatives}
BuildRequires: alts
Accepting request 964363 from home:bnavigator:branches:devel:languages:python:jupyter - Update to verson 1.15.6 * Missing warning when no authorizer in found ZMQ handlers #744 (@Zsailer) - Release notes for 1.15.5 * Relax type checking on ExtensionApp.serverapp #739 (@minrk) * raise no-authorization warning once and allow disabled authorization #738 (@Zsailer) - Release notes for 1.15.4 * Fix server-extension paths (3rd time's the charm) #734 (@minrk) - Release notes for 1.15.2 * allow handlers to work without an authorizer in the Tornado settings #717 (@Zsailer) - Release notes for 1.15.1 * Revert "Re-use ServerApp.config_file_paths for consistency (#715)" #728 (@blink1073) - Release notes for 1.15.0 * Add authorization layer to server request handlers #165 (@Zsailer) Enhancements made * Validate notebooks once per fetch or save #724 (@kevin-bates) * Register pre/post save hooks, call them sequentially #696 (@davidbrochart) * Implement Required Methods in Async Manner #721 (@jhamet93) * Call pre_save_hook only on first chunk of large files #716 (@davidbrochart) * Re-use ServerApp.config_file_paths for consistency #715 (@minrk) * serverapp: Use .absolute() instead of .resolve() for symlinks #712 (@EricCousineau-TRI) * Fall back to legacy protocol if selected_subprotocol raises exception #706 (@davidbrochart) * Fix FilesHandler not meet RFC 6713 #701 (@Wh1isper) OBS-URL: https://build.opensuse.org/request/show/964363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=44
2022-03-23 20:32:08 +01:00
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
%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.
%package test
Summary: The backend to Jupyter web applications - test requirements
Group: Development/Languages/Python
Requires: python-ipykernel
Requires: python-jupyter-server = %{version}
Requires: python-pytest >= 7
Requires: python-pytest-console-scripts
Requires: python-pytest-jupyter-server >= 0.4
Requires: python-pytest-timeout
Requires: python-requests
%description test
Metapackage for the jupyter_server[test] requirement specifier
%prep
%setup -q -n jupyter_server-%{version}
2022-06-14 18:59:46 +02:00
sed -i pyproject.toml \
-e 's/--color=yes//' \
-e '/filterwarnings/,/]/ {/error/ a \ "ignore:Module already imported so cannot be rewritten",
}'
%if ! %{with test}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/jupyter-server
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
export LANG=en_US.UTF-8
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-xdist for process control so that the worker does not indefinitely hang after success, no parallel tests
2022-06-14 18:59:46 +02:00
%pytest --timeout 60 --force-flaky --max-runs=3 --no-flaky-report -n 1
%endif
%if ! %{with test}
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative 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
%files %{python_files test}
%license COPYING.md
%endif
%changelog