Benjamin Greiner
9edab5a448
* Fix extension discovery warning #31 (@Zsailer) - Stop testing on python39: no pytest-jupyter anymore OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook-shim?expand=0&rev=14
89 lines
3.1 KiB
RPMSpec
89 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-notebook-shim
|
|
#
|
|
# Copyright (c) 2024 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/
|
|
#
|
|
|
|
|
|
Name: python-notebook-shim
|
|
Version: 0.2.4
|
|
Release: 0
|
|
Summary: A shim layer for notebook traits and config
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/jupyterlab/notebook_shim
|
|
Source: https://files.pythonhosted.org/packages/source/n/notebook_shim/notebook_shim-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.7}
|
|
BuildRequires: %{python_module hatchling >= 1.0}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: fdupes
|
|
BuildRequires: jupyter-rpm-macros
|
|
BuildRequires: python-rpm-macros
|
|
Requires: jupyter-notebook-shim = %{version}
|
|
Requires: (python-jupyter_server >= 1.8 with python-jupyter_server < 3)
|
|
Provides: python-notebook_shim = %{version}-%{release}
|
|
BuildArch: noarch
|
|
BuildRequires: %{python_module jupyter_server >= 1.8 with %python-jupyter_server < 3}
|
|
BuildRequires: %{python_module pytest-console-scripts}
|
|
BuildRequires: %{python_module pytest-jupyter if %python-base >= 3.10}
|
|
BuildRequires: %{python_module pytest-tornasync}
|
|
BuildRequires: %{python_module pytest}
|
|
%python_subpackages
|
|
|
|
%description
|
|
This project provides a way for JupyterLab and other frontends to switch to
|
|
Jupyter Server for their Python Web application backend.
|
|
|
|
%package -n jupyter-notebook-shim
|
|
Summary: The configuration file for python-notebook-shim
|
|
Provides: juypter-notebook_shim = %{version}-%{release}
|
|
# Any flavor is okay, but suggest the primary one for automatic zypper choice -- boo#1214354
|
|
Requires: python3dist(notebook-shim) = %{version}
|
|
Suggests: python3-notebook-shim
|
|
|
|
%description -n jupyter-notebook-shim
|
|
This project provides a way for JupyterLab and other frontends to switch to
|
|
Jupyter Server for their Python Web application backend. Common configuration
|
|
file
|
|
|
|
%prep
|
|
%setup -q -n notebook_shim-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%jupyter_move_config
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
%{python_expand # don't test anything on python39: no pytest-jupyter anymore
|
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
|
if [ ${python_flavor} != "python39" ]; then
|
|
$python -m pytest -v notebook_shim
|
|
fi
|
|
}
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{python_sitelib}/notebook_shim
|
|
%{python_sitelib}/notebook_shim-%{version}*-info
|
|
|
|
%files -n jupyter-notebook-shim
|
|
%_jupyter_config %{_jupyter_server_confdir}/notebook_shim.json
|
|
|
|
%changelog
|