%global pypi_name abagen Name: python-%{pypi_name} Version: 0.1.3 Release: 2%{?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 # Six modules import pkg_resources, which setuptools removed and Fedora 45 no # longer ships, so abagen was not importable there at all. Patch1: abagen-importlib-resources.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-2 - Replace pkg_resources with importlib.resources. setuptools removed pkg_resources and Fedora 45 no longer provides it, so -1 built on f44 and failed on f45 with ModuleNotFoundError before any of abagen's own logic ran -- abagen/__init__.py reaches it through abagen.mouse, so nothing was importable. - Same defect shape as python-nrtest earlier this week, and the same fix: importlib.resources has been standard library since 3.9, so no version guard is needed. A shim keeps the resource_filename call sites unchanged. * 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.