2019-05-02 20:57:38 +02:00
|
|
|
#
|
2022-01-03 12:58:10 +01:00
|
|
|
# spec file
|
2019-05-02 20:57:38 +02:00
|
|
|
#
|
2023-01-01 19:02:20 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-05-02 20:57:38 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-02-10 19:51:58 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-05-02 20:57:38 +02:00
|
|
|
|
|
|
|
|
2022-01-03 12:58:10 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2022-12-27 00:53:59 +01:00
|
|
|
|
2021-11-12 22:51:30 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
2021-10-27 14:48:51 +02:00
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
2022-12-27 00:53:59 +01:00
|
|
|
|
2022-01-03 12:58:10 +01:00
|
|
|
Name: python-jupyter-server%{psuffix}
|
2023-02-05 20:41:32 +01:00
|
|
|
Version: 2.2.1
|
2019-05-02 20:57:38 +02:00
|
|
|
Release: 0
|
2021-04-16 14:45:22 +02:00
|
|
|
Summary: The backend to Jupyter web applications
|
2020-02-10 19:51:58 +01:00
|
|
|
License: BSD-3-Clause
|
2019-05-02 20:57:38 +02:00
|
|
|
Group: Development/Languages/Python
|
2022-06-14 18:59:46 +02:00
|
|
|
URL: https://jupyter-server.readthedocs.io
|
2023-01-01 19:02:20 +01:00
|
|
|
# SourceRepository: https://github.com/jupyter-server/jupyter_server
|
2022-07-25 10:05:04 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/j/jupyter_server/jupyter_server-%{version}.tar.gz
|
2022-12-27 00:53:59 +01:00
|
|
|
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}
|
2021-02-15 14:00:49 +01:00
|
|
|
# We need the full stdlib
|
|
|
|
BuildRequires: %{pythons}
|
2021-02-03 13:38:07 +01:00
|
|
|
BuildRequires: fdupes
|
2021-10-27 14:48:51 +02:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: python >= 3.8
|
2019-05-02 20:57:38 +02:00
|
|
|
Requires: python-Jinja2
|
|
|
|
Requires: python-Send2Trash
|
2023-02-05 20:41:32 +01:00
|
|
|
Requires: python-anyio >= 3.1.0
|
2021-04-16 14:45:22 +02:00
|
|
|
Requires: python-argon2-cffi
|
2022-12-27 00:53:59 +01:00
|
|
|
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
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: python-nbformat >= 5.3.0
|
2022-01-15 23:15:29 +01:00
|
|
|
Requires: python-packaging
|
2019-05-02 20:57:38 +02:00
|
|
|
Requires: python-prometheus_client
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: python-pyzmq >= 24
|
2021-02-03 13:38:07 +01:00
|
|
|
Requires: python-terminado >= 0.8.3
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: python-tornado >= 6.2
|
|
|
|
Requires: python-traitlets >= 5.6
|
2021-06-29 10:35:50 +02:00
|
|
|
Requires: python-websocket-client
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: ((python-jupyter-core >= 4.12 with python-jupyter-core < 5.0) or python-jupyter-core >= 5.1)
|
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
|
2021-10-27 14:48:51 +02:00
|
|
|
%if %{with libalternatives}
|
|
|
|
BuildRequires: alts
|
2022-03-23 20:32:08 +01:00
|
|
|
Requires: alts
|
2021-10-27 14:48:51 +02:00
|
|
|
%else
|
2021-02-03 13:38:07 +01:00
|
|
|
Requires(post): update-alternatives
|
2021-02-25 22:07:39 +01:00
|
|
|
Requires(postun):update-alternatives
|
2021-10-27 14:48:51 +02:00
|
|
|
%endif
|
2021-02-03 13:38:07 +01:00
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
Provides: jupyter-jupyter-server = %{version}-%{release}
|
|
|
|
Obsoletes: jupyter-jupyter-server < %{version}-%{release}
|
2019-05-02 20:57:38 +02:00
|
|
|
BuildArch: noarch
|
2021-02-03 13:38:07 +01:00
|
|
|
%endif
|
2019-05-02 20:57:38 +02:00
|
|
|
%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.
|
|
|
|
|
2021-10-17 23:54:26 +02:00
|
|
|
%package test
|
|
|
|
Summary: The backend to Jupyter web applications - test requirements
|
2021-10-27 14:48:51 +02:00
|
|
|
Group: Development/Languages/Python
|
2021-10-17 23:54:26 +02:00
|
|
|
Requires: python-ipykernel
|
|
|
|
Requires: python-jupyter-server = %{version}
|
2022-10-26 12:35:22 +02:00
|
|
|
Requires: python-pytest >= 7
|
2021-10-17 23:54:26 +02:00
|
|
|
Requires: python-pytest-console-scripts
|
2022-12-27 00:53:59 +01:00
|
|
|
Requires: python-pytest-jupyter-server >= 0.4
|
2022-08-05 21:59:09 +02:00
|
|
|
Requires: python-pytest-timeout
|
2021-10-17 23:54:26 +02:00
|
|
|
Requires: python-requests
|
|
|
|
|
|
|
|
%description test
|
|
|
|
Metapackage for the jupyter_server[test] requirement specifier
|
|
|
|
|
2019-05-02 20:57:38 +02:00
|
|
|
%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",
|
|
|
|
}'
|
2019-05-02 20:57:38 +02:00
|
|
|
|
2022-01-03 12:58:10 +01:00
|
|
|
%if ! %{with test}
|
2019-05-02 20:57:38 +02:00
|
|
|
%build
|
2022-12-27 00:53:59 +01:00
|
|
|
%pyproject_wheel
|
2019-05-02 20:57:38 +02:00
|
|
|
|
|
|
|
%install
|
2022-12-27 00:53:59 +01:00
|
|
|
%pyproject_install
|
2021-02-03 13:38:07 +01:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-server
|
2019-05-02 20:57:38 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-01-03 12:58:10 +01:00
|
|
|
%endif
|
2019-05-02 20:57:38 +02:00
|
|
|
|
2022-01-03 12:58:10 +01:00
|
|
|
%if %{with test}
|
2019-05-02 20:57:38 +02:00
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
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
|
2022-01-29 21:10:05 +01:00
|
|
|
# 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
|
2022-01-03 12:58:10 +01:00
|
|
|
%endif
|
2019-05-02 20:57:38 +02:00
|
|
|
|
2022-01-03 12:58:10 +01:00
|
|
|
%if ! %{with test}
|
2021-10-27 14:48:51 +02:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative jupyter-server
|
|
|
|
|
2021-02-03 13:38:07 +01:00
|
|
|
%post
|
|
|
|
%python_install_alternative jupyter-server
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative jupyter-server
|
|
|
|
|
2019-05-02 20:57:38 +02:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license COPYING.md
|
2021-02-03 13:38:07 +01:00
|
|
|
%python_alternative %{_bindir}/jupyter-server
|
|
|
|
%{python_sitelib}/jupyter_server
|
|
|
|
%{python_sitelib}/jupyter_server-%{version}*-info
|
2019-05-02 20:57:38 +02:00
|
|
|
|
2021-10-17 23:54:26 +02:00
|
|
|
%files %{python_files test}
|
|
|
|
%license COPYING.md
|
2022-01-03 12:58:10 +01:00
|
|
|
%endif
|
2021-10-17 23:54:26 +02:00
|
|
|
|
2019-05-02 20:57:38 +02:00
|
|
|
%changelog
|