# fastconfounds: generate confounds from UK Biobank IDPs (FMRIB). Apache-2.0 and pure Python with no FSL dependency, so it lives in the # FREE project. Found missing by diffing FMRIB's installer output (conda package fsl-fastconfounds 0.9.0) against our RPMs. %global pypi_name fastconfounds Name: python-%{pypi_name} Version: 0.9.0 Release: 1%{?dist} Summary: Generate confounds from UK Biobank image-derived phenotypes License: Apache-2.0 URL: https://git.fmrib.ox.ac.uk/fsl/fastconfounds Source0: https://git.fmrib.ox.ac.uk/fsl/fastconfounds/-/archive/%{version}/%{pypi_name}-%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: fastconfounds takes UK Biobank image-derived phenotypes (IDPs) and raw confound variables and generates a set of processed confounds relevant to those IDPs (date-drift, time-of-day, nonlinear and interaction terms), selected by fast forward selection, for deconfounding IDPs in regression or before correlation. It can also process data from other studies if the input files are arranged suitably.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} # FMRIB builds from a git checkout, where setuptools-scm adds every tracked file to the wheel; a release tarball has no git metadata and # upstream's package-data glob is relative to the package, so "fastconfounds/*.txt" matches nothing and the column maps would be left out grep -q '"fastconfounds" = \["fastconfounds/\*.txt"\]' pyproject.toml sed -i 's#"fastconfounds" = \["fastconfounds/\*.txt"\]#"fastconfounds" = ["*.txt"]#' pyproject.toml %generate_buildrequires # the tarball has no git metadata, so setuptools-scm must be told the version export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check %pyproject_check_import # the column maps are read at run time (load.py: f'{THIS_DIR}/{prefix}_columns.txt'); without the %%prep fix this assertion fails (red, seen) test "$(ls %{buildroot}%{python3_sitelib}/%{pypi_name}/*_columns.txt | wc -l)" -ge 6 test -s %{buildroot}%{python3_sitelib}/%{pypi_name}/field.txt PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/fastconfounds --help >/dev/null %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/fastconfounds %changelog * Fri Oct 09 2026 Morgan Hough - 0.9.0-1 - Initial package: FMRIB's fastconfounds 0.9.0, the version the FSL 6.0.7.23 manifest ships. Pure Python, Apache-2.0, free project. - %%prep widens upstream's package-data glob ("fastconfounds/*.txt" matched nothing in a tarball build, so the column maps the code reads at run time were not installed; FMRIB's conda build gets them from git). %%check asserts they are present; red without the fix.