2019-11-12 18:30:04 +01:00
#
2021-06-28 16:24:57 +02:00
# spec file
2019-11-12 18:30:04 +01:00
#
2023-01-15 22:20:28 +01:00
# Copyright (c) 2023 SUSE LLC
2019-11-12 18:30:04 +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/
#
2020-02-24 18:17:03 +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-14 23:20:15 +01:00
2020-02-24 18:17:03 +01:00
Name : python-jupyter-client%{psuffix}
2023-11-26 16:19:44 +01:00
Version : 8.6.0
2019-11-12 18:30:04 +01:00
Release : 0
Summary : Jupyter protocol implementation and client libraries
License : BSD-3-Clause
Group : Development/Languages/Python
URL : https://github.com/jupyter/jupyter_client
Source : https://files.pythonhosted.org/packages/source/j/jupyter_client/jupyter_client-%{version} .tar.gz
2023-03-21 22:31:33 +01:00
# PATCH-FIX-OPENSUSE jupyter-client-suse-remove-ifconfig-test.patch code@bnavigator.de -- we don't have `ifconfig` and don't need it because we have `ip`
Patch10 : jupyter-client-suse-remove-ifconfig-test.patch
BuildRequires : %{python_module base >= 3.8}
BuildRequires : %{python_module hatchling >= 1.5}
2022-07-04 20:06:24 +02:00
BuildRequires : %{python_module pip}
2019-11-12 18:30:04 +01:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
2022-05-26 01:12:26 +02:00
Requires : python-python-dateutil >= 2.8.2
2022-07-04 20:06:24 +02:00
Requires : python-pyzmq >= 23.0
2022-12-14 23:20:15 +01:00
Requires : python-tornado >= 6.2
2023-03-21 22:31:33 +01:00
Requires : python-traitlets >= 5.3
Requires : (python-importlib-metadata >= 4.8.3 if python-base < 3.10)
Requires : (python-jupyter-core >= 5.1 or (python-jupyter-core >= 4.12 with python-jupyter-core < 5.0))
2023-04-14 05:16:50 +02:00
Requires(post) : update-alternatives
Requires(postun) : update-alternatives
Provides : python-jupyter_client = %{version} -%{release}
Obsoletes : python-jupyter_client < %{version} -%{release}
Provides : jupyter-jupyter-client = %{version} -%{release}
Obsoletes : jupyter-jupyter-client < %{version} -%{release}
Provides : jupyter-jupyter_client = %{version} -%{release}
Obsoletes : jupyter-jupyter_client < %{version} -%{release}
Provides : jupyter-jupyter-client-doc = %{version} -%{release}
Obsoletes : jupyter-jupyter-client-doc < %{version} -%{release}
2019-11-12 18:30:04 +01:00
BuildArch : noarch
2020-02-24 18:17:03 +01:00
%if %{with test}
2022-07-04 20:06:24 +02:00
# gh#jupyter/jupyter_client#787
2023-03-21 22:31:33 +01:00
BuildRequires : %{python_module ipykernel >= 6.14}
2020-09-05 22:15:38 +02:00
BuildRequires : %{python_module ipython}
2021-06-28 16:24:57 +02:00
BuildRequires : %{python_module jupyter-client = %{version} }
2023-03-21 22:31:33 +01:00
BuildRequires : %{python_module pytest-jupyter-client >= 0.4.1}
2020-09-05 22:15:38 +02:00
BuildRequires : %{python_module pytest-timeout}
2020-02-24 18:17:03 +01:00
BuildRequires : %{python_module pytest}
2021-06-28 16:24:57 +02:00
# flaky is not an upstream dep, but for obs flakyness of parallel kernel test
BuildRequires : %{python_module flaky}
2023-03-21 22:31:33 +01:00
BuildRequires : iproute2
BuildRequires : openssh-clients
2020-02-24 18:17:03 +01:00
%endif
2019-11-12 18:30:04 +01:00
%python_subpackages
%description
This package contains the reference implementation of the Jupyter protocol.
It also provides client and kernel management APIs for working with kernels.
It also provides the jupyter kernelspec entrypoint for installing kernelspecs
for use with Jupyter frontends.
%prep
2021-06-28 16:24:57 +02:00
%autosetup -p1 -n jupyter_client-%{version}
2023-10-14 11:35:44 +02:00
sed -i 's/"--color=yes",//' pyproject.toml
2021-06-28 16:24:57 +02:00
2019-11-12 18:30:04 +01:00
%build
2022-07-04 20:06:24 +02:00
%pyproject_wheel
2019-11-12 18:30:04 +01:00
%install
2020-02-24 18:17:03 +01:00
%if !%{with test}
2022-07-04 20:06:24 +02:00
%pyproject_install
2023-04-14 05:16:50 +02:00
%python_clone -a %{buildroot} %{_bindir} /jupyter-kernel
%python_clone -a %{buildroot} %{_bindir} /jupyter-kernelspec
%python_clone -a %{buildroot} %{_bindir} /jupyter-run
2019-11-12 18:30:04 +01:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2020-02-24 18:17:03 +01:00
%endif
%if %{with test}
%check
2023-03-21 22:31:33 +01:00
# flaky timeout
donttest=" ( T e s t A s y n c K e r n e l C l i e n t a n d t e s t _ i n p u t _ r e q u e s t ) "
2023-10-14 11:35:44 +02:00
# timeout
donttest+=" o r ( T e s t K e r n e l M a n a g e r a n d t e s t _ s t r e a m _ o n _ r e c v ) "
2023-03-21 22:31:33 +01:00
%pytest --force-flaky --max-runs=3 --no-success-flaky-report -k " n o t ( $ d o n t t e s t ) "
2020-02-24 18:17:03 +01:00
%endif
2019-11-12 18:30:04 +01:00
2023-04-14 05:16:50 +02:00
%post
%python_install_alternative jupyter-kernel jupyter-kernelspec jupyter-run
%postun
%python_uninstall_alternative jupyter-kernel
2020-02-24 18:17:03 +01:00
%if !%{with test}
2019-11-12 18:30:04 +01:00
%files %{python_files}
2023-03-21 22:31:33 +01:00
%license LICENSE
2022-03-13 08:40:03 +01:00
%{python_sitelib} /jupyter_client-%{version} *-info
2019-11-12 18:30:04 +01:00
%{python_sitelib} /jupyter_client/
2023-04-14 05:16:50 +02:00
%python_alternative %{_bindir} /jupyter-kernel
%python_alternative %{_bindir} /jupyter-kernelspec
%python_alternative %{_bindir} /jupyter-run
2020-02-24 18:17:03 +01:00
%endif
2019-11-12 18:30:04 +01:00
%changelog