%global pypi_name abagen Name: python-%{pypi_name} Version: 0.1.3 Release: 1%{?dist} Summary: Allen Human Brain Atlas gene expression, mapped to brain parcellations License: BSD-3-Clause URL: https://github.com/netneurolab/abagen Source0: %{pypi_source %{pypi_name} %{version}} # The vendored versioneer.py calls configparser.SafeConfigParser, removed in Python # 3.12, so the sdist cannot be built at all on a current Python. Patch0: abagen-versioneer-configparser.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %description abagen turns the Allen Human Brain Atlas microarray data into regional gene expression matrices: it fetches the donor data, applies the probe-selection, normalisation and sample-assignment choices that the literature disagrees about, and writes a region-by-gene matrix for whatever parcellation you hand it. The point is that those choices are explicit and reproducible rather than buried in a script. This is the freely licensed sibling of neuromaps from the same lab, and the natural bridge between imaging and transcriptomics. %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{_description} The Allen Atlas donor data is downloaded on first use rather than shipped: it is roughly four gigabytes and has its own terms of use. %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l abagen %check # The test suite downloads donor data from the Allen API, so it cannot run here. # Import every module instead; that is what catches a missing dependency. %pyproject_check_import -e 'abagen.tests*' # The command line interface is the documented entry point, and it parses its # arguments against the full option set, so this exercises more than an import. PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/abagen --help >/dev/null %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst %{_bindir}/abagen %changelog * Sun Sep 27 2026 Morgan Hough - 0.1.3-1 - Initial package. BSD-3-Clause, so it goes in the main repository rather than alongside neuromaps in nonfree; nibabel, numpy, pandas and scipy are all in Fedora, so nothing is bundled and nothing needed packaging first. - Relevant to the lab's own work: this is the imaging-to-transcriptomics bridge, and it pairs with the organoid RNA-seq direction rather than only with surface analysis.