%define debug_package %{nil} Name: babelbrain Version: 0.8.1 Release: 6%{?dist} Summary: GUI for modeling transcranial ultrasound neuromodulation License: BSD-3-Clause URL: https://github.com/ProteusMRIgHIFU/BabelBrain Source0: https://github.com/ProteusMRIgHIFU/BabelBrain/archive/main.tar.gz#/BabelBrain-main.tar.gz BuildRequires: python3-devel BuildRequires: python3-hatchling BuildRequires: python3-pip BuildRequires: chrpath # Add runtime deps here if needed for tests or byte-compilation checks # BuildRequires: python3-babelviscofdtd Requires: python3-babelviscofdtd Requires: python3-pyside6 Requires: python3-h5py Requires: python3-hdf5plugin Requires: python3-pydicom Requires: python3-nibabel Requires: python3-pyvista Requires: python3-vtk Requires: python3-numba Requires: python3-numpy Requires: python3-scipy Requires: python3-matplotlib Requires: python3-pandas Requires: python3-scikit-image Requires: python3-pyopencl Requires: python3-pymupdf # Requires: python3-pymeshfix # Might not be in Fedora Requires: python3-trimesh # Requires: python3-manifold3d # Might not be in Fedora Requires: python3-numpy-stl # Requires: python3-pwlf # Might not be in Fedora Requires: python3-superqt Requires: python3-simpleitk # Requires: python3-histoprint # Might not be in Fedora # Requires: python3-linetimer # Might not be in Fedora Requires: python3-xmltodict Requires: python3-openpyxl Requires: python3-et_xmlfile Requires: python3-networkx Requires: python3-scooby Requires: python3-platformdirs Requires: python3-packaging Requires: python3-click Requires: python3-requests Requires: python3-pillow # Fedora's PyWavelets package is named python-pywt, and nothing provides the # literal name "python3-pywavelets" -- so this hand-written Requires made the # package uninstallable. The auto-generated python3.Xdist(pywavelets) dependency # was already satisfied by python3-pywt; only this line was unsatisfiable. Requires: python3-pywt %description Plymouth's TUS Planning Toolbox (BabelBrain). BabelBrain is a graphical user interface aimed to simplify the planning of Transcranial Focused Ultrasound (TUS) procedures. %prep %autosetup -n BabelBrain-main # Generate pyproject.toml since it is missing in the source cat > pyproject.toml < %{buildroot}%{_bindir}/babelbrain < SimNIBS workflow, which is how a TUS plan actually starts, # cannot work from packages. Guard the activation: use the virtualenv when # one is really there, otherwise fall through to the system interpreter, # which already has simnibs on its path. for f in %{buildroot}%{python3_sitelib}/BabelBrain/ExternalBin/*/run_linux.sh; do [ -f "$f" ] || continue sed -i 's|^source "\$1/simnibs_env/bin/activate"|if [ -f "$1/simnibs_env/bin/activate" ]; then\n source "$1/simnibs_env/bin/activate"\nelif ! %{__python3} -c "import simnibs" >/dev/null 2>\&1; then\n echo "simnibs not found: no virtualenv at $1/simnibs_env and no system simnibs" >\&2\n exit 1\nfi|' "$f" # Inside a virtualenv "python" exists; with the system interpreter it may # not, and python3 is correct in both cases. sed -i 's|^python "|%{__python3} "|' "$f" grep -q 'if \[ -f "\$1/simnibs_env/bin/activate" \]' "$f" \ || { echo "simnibs_env guard did not apply to $f"; exit 1; } done # Remove Mac/Windows specific scripts to clean up package rm -f %{buildroot}%{python3_sitelib}/BabelBrain/ExternalBin/*/run_mac.sh rm -f %{buildroot}%{python3_sitelib}/BabelBrain/ExternalBin/*/run_mac_transformix.sh %files %license LICENSE %doc README.md %{_bindir}/babelbrain %{python3_sitelib}/BabelBrain %{python3_sitelib}/babelbrain-%{version}.dist-info %changelog * Sat Sep 26 2026 Morgan Hough - 0.8.1-6 - Make the SimNIBS bridge usable from packages. ExternalBin/*/run_linux.sh unconditionally sourced a simnibs_env virtualenv that upstream's installer creates and a distribution install does not have, so the BabelBrain to SimNIBS workflow -- how a TUS plan actually begins -- failed before running anything. The activation is now conditional, falling through to the system interpreter where python3-simnibs already lives, and `python` is spelled python3 since there is no virtualenv to provide the unversioned name. - Add tests/babelbrain.bats. * Mon Sep 14 2026 Morgan Hough - 0.8.1-5 - Fix an unsatisfiable Requires that made the package uninstallable: Fedora's PyWavelets is python-pywt, and nothing provides the literal name "python3-pywavelets". Found by running gate 4 over the FUS stack -- babelbrain had been green in COPR since June while failing to install. - This does not make it installable on its own: python3-numba is still absent from Fedora entirely, and numba 0.67 needs llvmlite >= 0.49 where Fedora ships 0.46. That remains the blocker. * Thu Jun 11 2026 Morgan Hough - 0.8.1-4 - Refresh rebuild against the Python 3.15 rebuilds of its compute deps (python-babelviscofdtd 1.2.6-4, python-fmm3dpy 2.1.0-2) so rawhide resolves consistently. No spec/source changes. * Sun Feb 01 2026 Morgan Hough - 0.8.1-3 - Fix package summary length and spelling issues * Sun Feb 01 2026 Morgan Hough - 0.8.1-2 - Fix script permissions and clean up non-Linux scripts - Fix RPATHs for bundled elastix binaries - Disable debuginfo generation for bundled binaries * Sun Feb 01 2026 Morgan Hough - 0.8.1-1 - Initial package ssions and clean up non-Linux scripts - Fix RPATHs for bundled elastix binaries - Disable debuginfo generation for bundled binaries * Sun Feb 01 2026 Morgan Hough - 0.8.1-1 - Initial package