%global pypi_name immlib Name: python-%{pypi_name} Version: 0.1.1 Release: 1%{?dist} Summary: Utilities for immutable scientific data and lazy workflows License: MIT URL: https://github.com/noahbenson/immlib Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # The test suite covers immlib's PyTorch interoperability. BuildRequires: python3dist(torch) BuildRequires: python3dist(pytest) %global _description %{expand: immlib collects utilities for working with immutable scientific data: lazy, cached workflow plans built from persistent dictionaries, unit-aware quantities through pint, numeric helpers that treat NumPy arrays, SciPy sparse matrices and PyTorch tensors alike, docstring reuse, and path and cache handling that works for local and cloud storage. pyAFQ builds its processing pipeline on its workflow plans.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} # pyproject.toml has no [build-system] table and the sdist no setup.py, so a # PEP 517 frontend falls back to a legacy build that cannot work. Declare the # setuptools backend the setup.cfg is written for. ! grep -q '^\[build-system\]' pyproject.toml cat >> pyproject.toml <<'TOML' [build-system] requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" TOML %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check %pyproject_check_import # Upstream's suite, less the five tests that download from OSF or GitHub. cd %{_builddir} %pytest -v --pyargs immlib.test -k 'not (test_osf or test_pathstr or test_save or test_url_download or test_can_download_url)' %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Fri Oct 16 2026 Morgan Hough - 0.1.1-1 - Initial package (pyAFQ dependency).