%global pypi_name nninteractive %global dist_name nninteractive # PEP 420 namespace shared with the lightweight nninteractive-client package. %global import_name nnInteractive Name: python-%{pypi_name} Version: 2.5.1 Release: 3%{?dist} Summary: Promptable 3D interactive segmentation for medical images # Apache-2.0 covers the code, which is all this package ships. The pretrained # model checkpoints are CC-BY-NC-SA-4.0 (non-commercial), per upstream's README and # Hugging Face model card. They are NOT packaged; nninteractive-download-model # fetches them at runtime. That is why this belongs in the free COPR while the # weights would not. License: Apache-2.0 URL: https://github.com/MIC-DKFZ/nnInteractive Source0: %{pypi_source %{dist_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %global _description %{expand: nnInteractive is a promptable 3D segmentation framework from the DKFZ Division of Medical Image Computing. Rather than segmenting a fixed set of structures, it takes user interactions -- points, scribbles, bounding boxes and lassos -- and produces a full 3D segmentation from them, refining as further prompts arrive. This package provides the in-process inference engine, model management, and the nninteractive-server HTTP server that image viewers connect to. To drive a remote server without pulling in torch, install python3-nninteractive-client instead. No model weights are included. nninteractive-download-model fetches the pretrained checkpoint from upstream at runtime, and that checkpoint is licensed CC-BY-NC-SA-4.0 (non-commercial use only). The code in this package is Apache-2.0.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} # Version only, NOT %{version}-%{release}. python3-nninteractive-client is # built from a SEPARATE source package (python-nninteractive-client.spec) # whose Release moves independently of this one -- it is at 2.5.1-1 while # this package is at 2.5.1-2, so an exact-NVR requires can only be # satisfied by coincidence. It was not: python3-nninteractive was # UNINSTALLABLE on every chroot that has it (f44 both, f45 both, # rawhide-x86_64), requiring a -client NVR that does not exist anywhere. # The two share a PEP 420 namespace and must agree on VERSION, not on # release. Requires: python3-nninteractive-client = %{version} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{dist_name}-%{version} # See python-nnunetv2.spec for the full rationale: upstream's `!=2.9.*` torch # exclusion is a CUDA/cuDNN performance guard (torch 2.9 disabled fast conv # implementations after a cuDNN bug), not a correctness constraint, and it does # not apply to Fedora's CPU-only torch 2.9.1. Relax it so the dependency # resolves. sed -i 's/"torch>=2\.1\.2,!=2\.9\.\*"/"torch>=2.1.2"/' pyproject.toml grep -q '!=2.9' pyproject.toml && exit 1 || : %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{import_name} %check %pyproject_check_import %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc readme.md %{_bindir}/nninteractive-server %{_bindir}/nninteractive-available-models %{_bindir}/nninteractive-download-model %changelog * Tue Oct 06 2026 Morgan Hough - 2.5.1-3 - Require python3-nninteractive-client by VERSION, not version-release. -client is a separate source package whose Release is independent; it is at 2.5.1-1 while this is 2.5.1-2, so "= %%{version}-%%{release}" asked for an NVR that exists on no chroot and python3-nninteractive was uninstallable on all five chroots that carry it. Found by a repoclosure sweep, not by a build -- every build was green. * Mon Sep 14 2026 Morgan Hough - 2.5.1-2 - Document that the pretrained weights fetched by nninteractive-download-model are CC-BY-NC-SA-4.0 (non-commercial), per upstream's README and Hugging Face model card. No weights are packaged; License: Apache-2.0 covers the shipped code only. No functional change. * Sat Jul 18 2026 Morgan Hough - 2.5.1-1 - Initial package. Gives ITK-SNAP 4.4 (which already exposes nnInteractive point/scribble/lasso modes) a local inference backend to talk to. Relaxes the upstream torch != 2.9.* exclusion, a CUDA/cuDNN performance guard that does not apply to Fedora's CPU-only torch (see the comment in %%prep).