%global srcname cellmlmanip Name: python-%{srcname} Version: 0.3.8 Release: 1%{?dist} Summary: CellML loading and model equation manipulation License: BSD-3-Clause URL: https://github.com/ModellingWebLab/cellmlmanip # The GitHub tag, not the PyPI sdist: the sdist leaves out tests/__init__.py, # tests/shared.py and all 50 CellML test models, so none of the suite can run # from it (five test files fail at collection on a relative import). The # package directory is byte-identical between the two. Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check BuildRequires: python3-pytest %global _description %{expand: cellmlmanip loads a CellML 1.0 or 1.1 model and turns it into a sympy model that can be inspected and rewritten: units are checked with Pint, equations are held as sympy expressions, RDF annotations are read with rdflib, and the graph of dependencies between variables is kept in networkx. It can convert units, eliminate intermediate variables, fix removable singularities and print the model as code. It is the CellML loader of the Web Lab and of Chaste's code generator, and the CellML side of the Physiome tools, next to libCellML and Myokit.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # The Pint cap (<0.26) is upstream's "occasional breaking changes" guard. Fedora # rawhide has pint 0.26.1, so dnf finds nothing for it; the full suite below is # the evidence on each chroot. grep -qF '"Pint>=0.24, <0.26",' pyproject.toml || { echo "Pint cap not found" >&2; exit 1; } sed -i 's/"Pint>=0.24, <0.26",/"Pint>=0.24",/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # setuptools' package discovery also installs the repository's requirements/ # directory (a helper script for CI) as a top-level package, which rpm then # finds unpackaged. It is not part of cellmlmanip. rm -rf %{buildroot}%{python3_sitelib}/requirements %pyproject_save_files -l %{srcname} %check # Upstream's suite, whole and offline: 253 passed on Fedora 44's sympy 1.14.0 # and Pint 0.25 (the pyproject caps are Pint <0.26 and sympy <1.15, which # Fedora 44 sits inside). No cases are deselected. %pytest -q tests %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %license LICENSE %changelog * Fri Oct 23 2026 Morgan Hough - 0.3.8-1 - Initial package: cellmlmanip 0.3.8 (BSD-3-Clause, read from LICENSE). Net-new to Fedora; pure Python. - Source is the GitHub tag because the PyPI sdist ships no usable tests. - No runtime floors need relaxing: lxml, networkx, Pint (>=0.24,<0.26), rdflib and sympy (>=1.10,<1.15) are all satisfied by Fedora 44. - 253 passed, 0 failed, 0 deselected, offline with loopback up. - Remove the top-level requirements/ package the build installs: the first Copr build passed all 253 tests and then failed on unpackaged files. - Drop the Pint <0.26 cap: rawhide ships pint 0.26.1 and the rawhide build failed on the unsatisfiable requirement. The suite runs on whatever Pint the chroot has.