# Jupyter kernel for Python built on the xeus C++ kernel protocol library. # # Packaged for 3dslicer-jupyter (SlicerJupyter), whose # JupyterKernel/CMakeLists.txt:8 does an unconditional # find_package(xeus-python REQUIRED) # and whose superbuild otherwise ExternalProject_Add()s it from git at build # time -- impossible in mock/COPR. # # Version choice: SlicerJupyter pins 0.17.0 (SuperBuild/External_xeus-python.cmake), # and that is also the newest line compatible with what Fedora ships -- 0.19.0 # raises xeus_zmq_REQUIRED_VERSION to 4.0.0 and Fedora has xeus-zmq 3.1.0. Name: xeus-python Version: 0.17.0 Release: 2%{?dist} Summary: Jupyter kernel for Python based on xeus License: BSD-3-Clause URL: https://github.com/jupyter-xeus/xeus-python Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz # Python 3.15 removed Py_GetPythonHome (deprecated since 3.11). print_pythonhome() # in src/xutils.cpp still calls it, so f45 fails to compile. Backport upstream's # own fix, which reads PyConfig::home instead; taken from xeus-python main and # applied to 0.17.0 unchanged in substance. Patch0: xeus-python-py315-pyconfig.patch BuildRequires: cmake >= 3.20 BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: python3-devel BuildRequires: xeus-devel >= 5.0.0 BuildRequires: xeus-zmq-devel >= 1.2.0 BuildRequires: pybind11-devel >= 2.6.1 BuildRequires: pybind11-json-devel >= 0.2.8 BuildRequires: nlohmann-json-devel BuildRequires: cppzmq-devel BuildRequires: xtl-devel # Transitive deps the xeus cmake configs find_dependency() but the -devel # packages do not Requires:, so every consumer must rediscover them -- # xeusConfig.cmake:66 find_dependency(LibUUID) # xeus-zmqConfig.cmake:61 find_dependency(OpenSSL) # (Same shape as the ctk-devel/qttesting-devel gap.) Worth a Fedora bug against # xeus-devel / xeus-zmq-devel. BuildRequires: libuuid-devel BuildRequires: openssl-devel BuildRequires: zeromq-devel %description xeus-python is a Jupyter kernel for Python based on the native implementation of the Jupyter protocol xeus. It provides the xpython executable and a shared library that embeds a Python interpreter and speaks the Jupyter messaging protocol. %package devel Summary: Development files for xeus-python Requires: %{name}%{?_isa} = %{version}-%{release} Requires: xeus-devel >= 5.0.0 Requires: pybind11-devel Requires: pybind11-json-devel %description devel Headers and CMake package configuration for building against the xeus-python library. %prep %autosetup -p1 -n %{name}-%{version} %build %cmake -GNinja \ `# CMakeLists.txt:11 is cmake_minimum_required(VERSION 3.4.3); cmake 4.x` \ `# removed <3.5 compatibility outright.` \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_BUILD_TYPE=Release \ `# Build only the shared library -- the static archive is not shipped and` \ `# Fedora policy prefers shared. XPYT_BUILD_STATIC defaults ON.` \ -DXPYT_BUILD_STATIC:BOOL=OFF \ -DXPYT_BUILD_SHARED:BOOL=ON \ -DXPYT_BUILD_XPYTHON_EXECUTABLE:BOOL=ON \ -DXPYT_USE_SHARED_XEUS:BOOL=ON \ -DXPYT_USE_SHARED_XEUS_PYTHON:BOOL=ON \ -DXPYT_BUILD_TESTS:BOOL=OFF \ `# The PyPI-wheel nag is aimed at conda users; irrelevant for an RPM.` \ -DXPYT_ENABLE_PYPI_WARNING:BOOL=OFF \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON %cmake_build %install %cmake_install %ldconfig_scriptlets %files %license LICENSE %doc README.md %{_bindir}/xpython %{_libdir}/libxeus-python.so.* # Two kernelspecs are installed: xpython (debugger-enabled) and xpython-raw. %{_datadir}/jupyter/kernels/xpython/ %{_datadir}/jupyter/kernels/xpython-raw/ %files devel %{_includedir}/xeus-python/ %{_libdir}/libxeus-python.so %{_libdir}/cmake/xeus-python/ %changelog * Fri Sep 18 2026 Morgan Hough - 0.17.0-2 - Patch0 (applied with %%autosetup -p1; the spec had no patches before, so the default -p0 silently skipped it): fix the f45 build. Python 3.15 removed Py_GetPythonHome, so src/xutils.cpp failed to compile (10993842). Backported from upstream main, which replaced the call with PyConfig_InitPythonConfig + config.home and handles the NULL case. Unblocks 3dslicer-jupyter on f45, which needs xeus-python-devel. * Mon Aug 03 2026 Morgan Hough - 0.17.0-1 - Initial package, to unblock 3dslicer-jupyter (SlicerJupyter requires find_package(xeus-python) and its superbuild cannot run in mock/COPR) - Pinned to 0.17.0: matches SlicerJupyter's own pin, and 0.19.0 requires xeus-zmq 4.0.0 while Fedora ships 3.1.0