python-jupyter-server/python-jupyter-server.spec
Benjamin Greiner 1b3523cfe4 Accepting request 982653 from home:bnavigator:python-rpm-macros
- Update to 1.17.1
  * no changelog
- Release 1.17.0
  * Add the root_dir value to the logging message in case of non
    compliant preferred_dir #804 (@echarles)
  * missing required arguments in utils.fetch #798 (@minrk)
  * Add helper jobs for branch protection #797 (@blink1073)
  * [pre-commit.ci] pre-commit autoupdate #793
    (@pre-commit-ci[bot])
  * Update branch references and links #791 (@blink1073)
- Release notes for 1.16.0
  * add hook to observe pending sessions #751 (@Zsailer)
  * Add max-age Cache-Control header to kernel logos #760
    (@divyansshhh)
  * Regression in connection URL calcuation in ServerApp #761
    (@jhamet93)
  * Include explicit package data #757 (@blink1073)
  * Ensure terminal cwd exists #755 (@fcollonval)
  * make 'cwd' param for TerminalManager absolute #749 (@rccern)
  * wait to cleanup kernels after kernel is finished pending #748
    (@Zsailer)
  * Skip jsonschema in CI #766 (@blink1073)
  * Remove redundant job and problematic check #765 (@blink1073)
  * Update pre-commit #764 (@blink1073)
  * Install pre-commit automatically #763 (@blink1073)
  * Add pytest opts and use isort #762 (@blink1073)
  * Ensure minimal nbconvert support jinja2 v2 & v3 #756
    (@fcollonval)
  * Fix error handler in simple extension examples #750
    (@andreyvelich)

OBS-URL: https://build.opensuse.org/request/show/982653
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=46
2022-06-14 16:59:46 +00:00

158 lines
5.0 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 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
%define skip_python2 1
Name: python-jupyter-server%{psuffix}
Version: 1.17.1
Release: 0
Summary: The backend to Jupyter web applications
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://jupyter-server.readthedocs.io
Source: https://files.pythonhosted.org/packages/source/j/jupyter-server/jupyter_server-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module jupyter_packaging}
BuildRequires: %{python_module setuptools}
# We need the full stdlib
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python >= 3.7
Requires: python-Jinja2
Requires: python-Send2Trash
Requires: python-anyio >= 3.1.0
Requires: python-argon2-cffi
Requires: python-jupyter-client >= 6.1.12
Requires: python-jupyter-core >= 4.7.0
Requires: python-nbconvert >= 6.4.4
Requires: python-nbformat >= 5.2.0
Requires: python-packaging
Requires: python-prometheus_client
Requires: python-pyzmq >= 17
Requires: python-terminado >= 0.8.3
Requires: python-tornado >= 6.1
Requires: python-traitlets >= 5.1
Requires: python-websocket-client
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
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 >= 6
Requires: python-pytest-console-scripts
Requires: python-pytest-mock
Requires: python-pytest-tornasync
Requires: python-requests
%description test
Metapackage for the jupyter_server[test] requirement specifier
%prep
%setup -q -n jupyter_server-%{version}
sed -i pyproject.toml \
-e 's/--color=yes//' \
-e '/filterwarnings/,/]/ {/error/ a \ "ignore:Module already imported so cannot be rewritten",
}'
%if ! %{with test}
%build
%python_build
%install
%python_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
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
%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