17
0

- Revert multibuild and fix kernel selection in tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-ipykernel?expand=0&rev=124
This commit is contained in:
2026-02-04 15:00:59 +00:00
committed by Git OBS Bridge
parent f8015f7151
commit da68a4c899
3 changed files with 16 additions and 40 deletions

View File

@@ -1,6 +0,0 @@
<multibuild>
<package>test-py311</package>
<package>test-py312</package>
<package>test-py313</package>
<package>test-py314</package>
</multibuild>

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 4 13:57:06 UTC 2026 - Ben Greiner <code@bnavigator.de>
- Revert multibuild and fix kernel selection in tests
-------------------------------------------------------------------
Mon Feb 2 13:38:42 UTC 2026 - Markéta Machová <mmachova@suse.com>

View File

@@ -16,32 +16,6 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == ""
%define psuffix %{nil}
%bcond_with test
%else
# we are unable to set the correct jupyter kernel file, hence the flavored tests need to be run in separate environments
%bcond_without test
%define psuffix -%{flavor}
%if "%{flavor}" != "test-py311"
%define skip_python311 1
%endif
%if "%{flavor}" != "test-py312"
%define skip_python312 1
%endif
%if "%{flavor}" != "test-py313"
%define skip_python313 1
%endif
%if "%{flavor}" != "test-py314"
%define skip_python314 1
%endif
%endif
# The obs server-side interpreter cannot use lua or rpm shrink
%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || ( "%pythons" == "python311" && 0%{?skip_python311} )
ExclusiveArch: donotbuild
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
%endif
%{?sle15_python_module_pythons}
Name: python-ipykernel
Version: 6.31.0
@@ -98,10 +72,8 @@ Requires: python-tornado >= 6.2
Requires: python-traitlets >= 5.4.0
Requires: (python-jupyter-core >= 5.1 or (python-jupyter-core >= 4.12 with python-jupyter-core < 5.0))
# /SECTION
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module ipykernel = %{version}}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module pytest >= 7.0}
BuildRequires: %{python_module pytest-asyncio >= 0.23.5}
@@ -109,7 +81,6 @@ BuildRequires: %{python_module pytest-timeout}
# we don't want ipyparallel and its dependencies in Ring1, see below
#BuildRequires: #{python_module ipyparallel}
# /SECTION
%endif
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: jupyter-ipykernel = %{version}-%{release}
Obsoletes: jupyter-ipykernel < %{version}-%{release}
@@ -142,7 +113,6 @@ $python -m ipykernel install \
%endif
%check
%if %{with test}
# fails in obs setups
ignoretests="--ignore tests/test_debugger.py"
# flaky obs timeouts
@@ -150,10 +120,18 @@ donttest="test_init_ipc_socket"
# we don't want ipyparallel and its dependencies in Ring1
ignoretests="$ignoretests --ignore tests/test_pickleutil.py"
donttest="$donttest or test_do_apply"
%pytest -k "not ($donttest)" $ignoretests
%endif
%{python_expand #
export PYTHONPATH=%{buildroot}%{$python_sitelib}
# install single kernelspecs for each flavor, so that it is taken by default
mkdir testjupyter-{$python_bin_suffix}
export JUPYTER_DATA_DIR=$PWD/testjupyter-%{$python_bin_suffix}
$python -m ipykernel install \
--prefix=$JUPYTER_DATA_DIR \
--name python%{$python_bin_suffix} \
--display-name 'Python %{$python_bin_suffix} (ipykernel)'
$python -m pytest -v -k "not ($donttest)" $ignoretests
}
%if !%{with test}
%files %{python_files}
%doc README.md
%license LICENSE
@@ -165,6 +143,5 @@ donttest="$donttest or test_do_apply"
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" || 0%{?suse_version} < 1600
%{_jupyter_kernel_dir}/python3
%endif
%endif
%changelog