# pyradiomics: extraction of radiomics features (first order, shape, GLCM, GLRLM, # GLSZM, NGTDM, GLDM) from medical images. The engine behind the SlicerRadiomics # extension (3dslicer-radiomics). # # A snapshot of master, not the 3.1.0 release (May 2023): master has the 2025 # rework for NumPy 2 and current CPython (scikit-build-core, the C extensions # without Python 2 support), which Fedora's NumPy 2.4 / Python 3.14 need. # SlicerRadiomics' own superbuild pins 146e3bd0 (Jan 2024), older than both. %global commit 8ed579383b44806651c463d5e691f3b2b57522ab %global shortcommit %(c=%{commit}; echo ${c:0:8}) %global snapdate 20250617 Name: python-pyradiomics Version: 3.1.0^%{snapdate}git%{shortcommit} Release: 2%{?dist} Summary: Radiomics feature extraction for medical images License: BSD-3-Clause URL: https://github.com/AIM-Harvard/pyradiomics Source0: %{url}/archive/%{commit}/pyradiomics-%{shortcommit}.tar.gz BuildRequires: gcc BuildRequires: cmake BuildRequires: python3-devel BuildRequires: python3-numpy # %%check BuildRequires: python3-pytest %global _description %{expand: PyRadiomics extracts radiomics features from medical images: first-order statistics, 2D/3D shape, and texture features (GLCM, GLRLM, GLSZM, NGTDM, GLDM), on the original image and on filtered images (wavelet, LoG, square, gradient, LBP, ...). Extraction is configured with YAML/JSON parameter files and can be run from Python or with the pyradiomics command-line tool.} %description %_description %package -n python3-pyradiomics Summary: %{summary} %description -n python3-pyradiomics %_description %prep %autosetup -n pyradiomics-%{commit} # radiomics/scripts/__init__.py is executable with #!/usr/bin/env python; # brp-mangle-shebangs rejects that on Fedora 45+ ("ambiguous python shebang"). %py3_shebang_fix radiomics/scripts %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=3.1.0.post%{snapdate} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=3.1.0.post%{snapdate} # scikit-build-core strips the extension modules on install by default, which left # find-debuginfo nothing ("Empty %%files file .../debugsourcefiles.list"); rpm strips. export SKBUILD_INSTALL_STRIP=false %pyproject_wheel %install %pyproject_install %pyproject_save_files -l radiomics %check %pyproject_check_import -e 'radiomics.scripts*' # The full upstream suite. radiomics.getTestCase() looks for the test images in # /pyradiomics/data and downloads them from GitHub when absent (the chroot has # no network); the repository ships the same images in data/, so seed that directory. export TMPDIR=$PWD/check-tmp mkdir -p "$TMPDIR/pyradiomics/data" cp -p data/*.nrrd "$TMPDIR/pyradiomics/data/" # Leave out what needs images that are only downloadable (not in data/): test_wavelet.py # (test_wavelet_64x64x64, test_wavelet_37x37x37, fetched while collecting) and the # shape2D scenarios (their 2D test cases; 45 = 5 cases x 9 features, all failing with # "Temporary failure in name resolution" in getTestCase, none on a value). %pytest tests --ignore=tests/test_wavelet.py -k "not shape2D" -p no:cacheprovider -o addopts="" %files -n python3-pyradiomics -f %{pyproject_files} %doc README.md %{_bindir}/pyradiomics %changelog * Sun Oct 11 2026 Morgan Hough - 3.1.0^20250617git8ed57938-2 - Fix the ambiguous python shebang in radiomics/scripts, which failed %%install on Fedora 45 and rawhide (build 11107591). * Sat Oct 10 2026 Morgan Hough - 3.1.0^20250617git8ed57938-1 - Initial package: master snapshot 8ed57938 (NumPy 2, scikit-build-core).