%global pypi_name cuslines Name: python-%{pypi_name} Version: 2.2.3 Release: 1%{?dist} Summary: GPU and CPU (Numba) streamline tractography for DIPY License: BSD-3-Clause URL: https://github.com/dipy/GPUStreamlines Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %global _description %{expand: cuslines (GPUStreamlines) runs DIPY's probabilistic, PTT and bootstrap direction getters for many seeds in parallel. It picks a CUDA, Metal or WebGPU backend when one is available and otherwise runs the same kernels on the CPU through Numba, which is pyAFQ's default tractography path. This package carries the Numba CPU backend and the kernel sources. The CUDA backend also needs NVIDIA's cuda-python bindings and the WebGPU backend wgpu, neither of which is packaged here.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check # The GPU backends import their (unpackaged) bindings at module level. %pyproject_check_import -e 'cuslines.cuda_python*' -e 'cuslines.metal*' -e 'cuslines.webgpu*' %{py3_test_envvars} %{python3} -c ' import cuslines, cuslines.numba as nb assert cuslines.BACKEND is None, cuslines.BACKEND assert cuslines.Tracker is nb.CPUTracker print("numba backend selected")' %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Fri Oct 16 2026 Morgan Hough - 2.2.3-1 - Initial package (pyAFQ's default tractography backend), CPU/Numba only.