%global srcname autoreduce Name: python-%{srcname} Version: 0.9 Release: 1%{?dist} Summary: Automated model reduction of nonlinear dynamical systems License: BSD-3-Clause URL: https://github.com/ayush9pandey/AutoReduce Source: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # No python3dist() tag in Fedora for the PyPI name python-libsbml (see %%prep). BuildRequires: python3-libsbml # %%check BuildRequires: python3-pytest %global _description %{expand: autoreduce takes a nonlinear ODE model, written by hand, read from SBML or exported from BioCRNpyler, and reduces it: quasi-steady-state approximation over every choice of fast species, time-scale separation, conservation-law elimination and Hill-function approximations. It reports which reduced models stay close to the full one. It is the model-reduction companion of BioCRNpyler and bioscrape in the Build-A-Cell toolchain.} %description %_description %package -n python3-%{srcname} Summary: %{summary} # Runtime dependency rpm cannot generate: Fedora's python3-libsbml carries no # python3dist() tag for the PyPI name python-libsbml. It belongs here and not # in the preamble -- this spec never builds a python-autoreduce package. Requires: python3-libsbml %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # python-libsbml has no dist tag in Fedora; declared by hand above. Upstream # floors it at 5.21.1; Fedora 43 to 45 carry 5.20.5. autoreduce uses libsbml to # read an SBML document into species, parameters and reactions, which 5.20 does # identically: %%check reads the SBML test models against 5.20.5. grep -q '"python-libsbml>=5.21.1", ' pyproject.toml || { echo "python-libsbml dependency not found" >&2; exit 1; } sed -i 's/"python-libsbml>=5.21.1", //' pyproject.toml # requires-python is ">=3.9,<=3.14.7": a ceiling on the patch release upstream # last tested, which excludes Fedora 44's 3.14.8 and pip refuses to install. # Nothing in the package is tied to a patch release; %%check is the evidence. grep -q 'requires-python = ">=3.9,<=3.14.7"' pyproject.toml || { echo "requires-python not found" >&2; exit 1; } sed -i 's/requires-python = ">=3.9,<=3.14.7"/requires-python = ">=3.9"/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Upstream's suite: 32 pass, 4 skip. The skips are the optional integrations # (python-control and PyDMD, which the build root does not install) and the two notebook runs, # which need nbformat and nbconvert. %pytest -q tests %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %license LICENSE %changelog * Fri Oct 23 2026 Morgan Hough - 0.9-1 - Initial package: autoreduce 0.9 (BSD-3-Clause, read from LICENSE). Net-new to Fedora; pure Python. - Two upstream metadata defects handled in %%prep: requires-python caps at <=3.14.7, which excludes Fedora 44's 3.14.8 (pip: "requires a different Python: 3.14.8 not in '<=3.14.7,>=3.9'"); and python-libsbml>=5.21.1, which has no dist tag in Fedora and is above the 5.20.5 on 43 to 45. - Offline on f44 with Fedora's libsbml 5.20.5: 32 passed, 4 skipped, 0 failed.