Name: fslpython Version: 1.0 Release: 1%{?dist} Summary: FSL Python interpreter (fslpython) backed by the system python3 and fslpy License: MIT URL: https://gitlab.com/morgan.hough/neurofedora # Bash launcher installed as /usr/bin/fslpython: sets $FSLDIR if unset and # execs the system python3. Upstream FSL ships this name as a private conda # environment; on Fedora the packaged fslpy stack replaces it. Source0: fslpython BuildArch: noarch BuildRequires: /bin/bash # for %%check BuildRequires: python3-fslpy BuildRequires: python3-numpy BuildRequires: python3-nibabel Requires: /bin/bash Requires: python3 # fslpy itself (Fedora ships it) plus everything FSL's own fslpython scripts # import: eddy, xtract*, bianca, fsladd, pnm_stage1, film_cifti, aff2rigid, # possum_plot.py, possum_interpmot.py, create_blueprint, make_subcort_bp. # Upstream's fslpython env carries the same scientific stack, so requiring it # here keeps those scripts runnable without per-package Requires lists. Requires: python3-fslpy Requires: python3-numpy Requires: python3-scipy Requires: python3-nibabel Requires: python3-pandas Requires: python3-matplotlib Requires: python3-plotly Requires: python3-seaborn Requires: python3-scikit-learn Requires: python3-pillow Requires: python3-joblib Requires: python3-jinja2 Requires: python3-tqdm %description FSL's wrapper scripts (eddy, xtract, bianca, fsladd, aff2rigid, ...) start with "#!/usr/bin/env fslpython", the Python interpreter of FSL's private conda environment. This package provides /usr/bin/fslpython for Fedora: a launcher that exports FSLDIR (default /usr/lib/fsl) and FSLOUTPUTTYPE and runs the system python3, and pulls in python3-fslpy and the scientific Python stack those scripts import. %prep # Nothing to extract; Source0 is a single script. %build # Nothing to compile. %install install -D -p -m 0755 %{SOURCE0} %{buildroot}%{_bindir}/fslpython # $FSLDIR/bin/fslpython, the upstream location, for scripts that call it # by absolute path. install -d %{buildroot}%{_prefix}/lib/fsl/bin ln -s ../../../bin/fslpython %{buildroot}%{_prefix}/lib/fsl/bin/fslpython %check %{buildroot}%{_bindir}/fslpython -c 'import fsl.data.image, fsl.utils.run, numpy, nibabel' test "$(%{buildroot}%{_bindir}/fslpython -c 'import os; print(os.environ["FSLDIR"])')" = /usr/lib/fsl %files %{_bindir}/fslpython %dir %{_prefix}/lib/fsl %dir %{_prefix}/lib/fsl/bin %{_prefix}/lib/fsl/bin/fslpython %changelog * Sun Sep 13 2026 Morgan Hough - 1.0-1 - Initial package: /usr/bin/fslpython launcher over the system python3 and Fedora's python3-fslpy, so FSL's 16 "#!/usr/bin/env fslpython" wrapper scripts (eddy, xtract, bianca, fsladd, aff2rigid, pnm_stage1, film_cifti, possum_*.py) stop failing with "bad interpreter".