2022-12-26 15:02:23 +01:00
#
# spec file for package python-jupyter-events
#
2024-02-06 16:21:58 +01:00
# Copyright (c) 2024 SUSE LLC
2022-12-26 15:02:23 +01: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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2023-01-15 22:09:53 +01:00
%if 0%{suse_version} >= 1550
2022-12-26 15:02:23 +01:00
%bcond_without libalternatives
2023-01-15 22:09:53 +01:00
%else
%bcond_with libalternatives
%endif
2023-08-23 10:17:09 +02:00
2023-08-23 10:08:15 +02:00
%{?sle15_python_module_pythons}
2022-12-26 15:02:23 +01:00
Name : python-jupyter-events
2024-03-29 19:24:45 +01:00
Version : 0.10.0
2022-12-26 15:02:23 +01:00
Release : 0
Summary : Jupyter Event System library
License : BSD-3-Clause
URL : https://github.com/jupyter/jupyter_events
Source : https://files.pythonhosted.org/packages/source/j/jupyter_events/jupyter_events-%{version} .tar.gz
2024-02-06 16:21:58 +01:00
# PATCH-FIX-OPENSUSE jupyter_events-py312-taskname.patch code@bnavigator.de -- we patched python-python-json-logger with gh#madzak/python-json-logger#183
Patch0 : jupyter_events-py312-taskname.patch
2023-07-30 17:54:39 +02:00
BuildRequires : %{python_module base >= 3.8}
2023-01-15 22:09:53 +01:00
BuildRequires : %{python_module hatchling >= 1.5}
2022-12-26 15:02:23 +01:00
BuildRequires : %{python_module pip}
BuildRequires : alts
BuildRequires : fdupes
BuildRequires : python-rpm-macros
Requires : alts
2023-01-15 22:09:53 +01:00
Requires : python-PyYAML >= 5.3
2023-07-30 17:54:39 +02:00
Requires : python-jsonschema-format-nongpl >= 4.18
2022-12-26 15:02:23 +01:00
Requires : python-python-json-logger >= 2.0.4
2023-07-30 17:54:39 +02:00
Requires : python-referencing
2023-01-15 22:09:53 +01:00
Requires : python-rfc3339-validator
Requires : python-rfc3986-validator >= 0.1.1
2022-12-26 15:02:23 +01:00
Requires : python-traitlets >= 5.3
2022-12-26 22:24:33 +01:00
Provides : python-jupyter_events = %{version} -%{release}
2022-12-26 15:02:23 +01:00
BuildArch : noarch
2023-08-23 10:17:09 +02:00
%if %{with libalternatives}
BuildRequires : alts
Requires : alts
%else
Requires(post) : update-alternatives
2024-02-06 16:21:58 +01:00
Requires(postun) : update-alternatives
2023-08-23 10:17:09 +02:00
%endif
2022-12-26 15:02:23 +01:00
# SECTION test requirements
2023-01-15 22:09:53 +01:00
BuildRequires : %{python_module rfc3339-validator}
BuildRequires : %{python_module PyYAML >= 5.3}
2022-12-26 15:02:23 +01:00
BuildRequires : %{python_module click}
2023-07-30 17:54:39 +02:00
BuildRequires : %{python_module jsonschema-format-nongpl >= 4.18}
2023-01-15 22:09:53 +01:00
BuildRequires : %{python_module pytest >= 7}
2022-12-26 15:02:23 +01:00
BuildRequires : %{python_module pytest-asyncio >= 0.19.0}
BuildRequires : %{python_module pytest-console-scripts}
BuildRequires : %{python_module python-json-logger >= 2.0.4}
2023-07-30 17:54:39 +02:00
BuildRequires : %{python_module referencing}
2023-01-15 22:09:53 +01:00
BuildRequires : %{python_module rfc3986-validator >= 0.1.1}
2022-12-26 15:02:23 +01:00
BuildRequires : %{python_module rich}
BuildRequires : %{python_module traitlets >= 5.3}
# /SECTION
%python_subpackages
%description
Jupyter Events enables Jupyter Python Applications (e.g. Jupyter Server,
JupyterLab Server, JupyterHub, etc.) to emit events—structured data
describing things happening inside the application. Other software
(e.g. client applications like JupyterLab) can listen and respond to
these events.
%prep
%autosetup -p1 -n jupyter_events-%{version}
2023-07-30 17:54:39 +02:00
sed -i -e 's/--color=yes//' pyproject.toml
2022-12-26 15:02:23 +01:00
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot} %{_bindir} /jupyter-events
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
2023-01-15 22:09:53 +01:00
%{python_expand # provide flavored command in case not yet installed libalts are not supported by python_flavored_alternatives
2022-12-26 15:02:23 +01:00
mkdir -p build/flavorbin
2023-01-15 22:09:53 +01:00
which jupyter-events || ln -s %{buildroot} %{_bindir} /jupyter-events-%{$python_bin_suffix} build/flavorbin/jupyter-events
2022-12-26 15:02:23 +01:00
}
%pytest
2023-01-15 22:09:53 +01:00
%pre
%python_libalternatives_reset_alternative jupyter-events
2022-12-26 15:02:23 +01:00
%post
%python_install_alternative jupyter-events
%postun
%python_uninstall_alternative jupyter-events
%files %{python_files}
2023-08-23 10:17:09 +02:00
%license LICENSE
2022-12-26 15:02:23 +01:00
%python_alternative %{_bindir} /jupyter-events
%{python_sitelib} /jupyter_events
%{python_sitelib} /jupyter_events-%{version} .dist-info
%changelog