# SigPy -- signal processing and iterative reconstruction in Python (Lustig lab, # UC Berkeley): linear operators, proximal operators and solvers on NumPy (and # optionally CuPy), with an MRI package covering SENSE/L1-wavelet/TV recon, # ESPIRiT coil sensitivity calibration, NUFFT, density compensation, sampling # patterns and RF pulse design. # # WHY IT IS HERE: DeepInverse's multi-coil MRI operator uses it for coil maps. # deepinv.physics.MultiCoilMRI's ESPIRiT estimation calls sigpy.mri.app.EspiritCalib, # and its simulated birdcage coils call sigpy.mri.birdcage_maps. SigPy is also the # standard Python comparison point for BART (tests/deepinv-bart-mri.bats). # # Class 1 under docs/PACKAGING-POLICY.md: Fedora ships no package by this source # name and nothing provides python3dist(sigpy). Verified 2026-10-12: # dnf repoquery --whatprovides 'python3dist(sigpy)' -> empty # # Chroots: numba is a hard runtime dependency. Fedora 44+ gets it from this # Copr (python-numba); Fedora 43 has neither a Fedora nor a Copr numba # (python-llvmlite 0.50 fails there). So this package is not built for f43. %global pypi_name sigpy Name: python-%{pypi_name} Version: 0.1.27 Release: 1%{?dist} Summary: Signal processing and iterative reconstruction, with MRI tools License: BSD-3-Clause URL: https://github.com/mikgroup/sigpy # The GitHub tag. The PyPI sdist for 0.1.27 contains only metadata (11 files, # no sigpy/ package and no tests/), so it cannot be built from. Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-xdist) # tests/test_pytorch.py checks the to_pytorch/from_pytorch bridges. BuildRequires: python3dist(torch) %global _description %{expand: SigPy is a package for signal processing, with an emphasis on iterative reconstruction. It provides linear operators, proximal operators and first-order solvers (conjugate gradient, gradient methods, primal-dual) that run on NumPy arrays, or on CuPy arrays when CuPy is installed. Its MRI module covers parallel imaging (SENSE, L1-wavelet and total-variation regularised reconstruction), ESPIRiT coil sensitivity calibration, the non-uniform FFT, density compensation, Poisson-disc and radial sampling, and RF pulse design.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} # sigpy.to_pytorch_function and the torch bridge in sigpy.pytorch import torch on # use, not at module scope. Not a hard dependency: SigPy's core is NumPy. Suggests: python3-torch %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check export NUMBA_CACHE_DIR=$(mktemp -d) %pyproject_check_import # Upstream runs `python -m unittest`; pytest collects the same unittest cases. # Run from a copy of tests/ so the source tree's sigpy/ cannot shadow the # installed package. # - tests/learn: tests for sigpy.learn, a subpackage upstream removed; 0.1.27 # ships no sigpy/learn/, so both modules fail to import (stale upstream tests). # - NUMBA_CACHE_DIR: SigPy's kernels are @numba.jit(cache=True), and numba # writes its cache next to the module when that is writable, which in %%check # is the buildroot. Pointed at a scratch directory above, before the import # check, which compiles nothing but would create the directory. cp -a tests %{_builddir}/sigpy-tests cd %{_builddir}/sigpy-tests test ! -e %{buildroot}%{python3_sitelib}/sigpy/learn %pytest -c /dev/null --rootdir=. . -p no:cacheprovider -n %{_smp_build_ncpus} -q -rs \ --ignore=learn %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst %changelog * Mon Oct 12 2026 Morgan Hough - 0.1.27-1 - Initial package: ESPIRiT and birdcage coil maps for DeepInverse's MRI operator.