%global srcname vivarium-core Name: python-%{srcname} Version: 1.6.5 Release: 1%{?dist} Summary: Framework for composing and simulating multi-scale models of cells # LICENSE.txt in the sdist is the full Apache License 2.0 text. PyPI's metadata says # "License: MIT" and carries an MIT classifier; the file is the grant and the metadata is # a stale label, so this follows the file. License: Apache-2.0 URL: https://github.com/vivarium-collective/vivarium-core Source: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %global _description %{expand: Vivarium is a framework for building multi-scale, agent-based and process-based models of cells and their environments. Models are written as processes that read and write to a shared hierarchical store; the engine schedules them, handles their timescales, and emits the results. It is the composition and simulation framework of the Build-A-Cell toolchain, beside BioCRNpyler, bioscrape and SubSBML. Upstream's `emitter` can write to a MongoDB database; the package works without one, using the in-memory emitter.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Upstream caps python_requires at <3.14, with classifiers stopping at 3.13. That is the # range it was TESTED on, not a measured break: run with the cap bypassed on Python 3.14.7 # (f44) and 3.15.0rc2 (f45), every import passes and 110 of the 115 upstream tests pass, # identically on both (the other five are listed in %%check). Left in place the cap makes # the package uninstallable on every Fedora release this COPR builds for. DELETE WHEN # upstream lifts the cap. n=$(grep -c "python_requires='>=3.10, <3.14'," setup.py || true) [ "$n" = 1 ] || { echo "ERROR: expected exactly one python_requires line, found $n" >&2; exit 1; } sed -i "s/python_requires='>=3.10, <3.14',/python_requires='>=3.10',/" setup.py # An `if`, not `grep -q ... && { ...; exit 1; }`: when the cap is gone grep returns 1, and as # the LAST command of %%prep that 1 becomes the script's exit status and fails the build. if grep -q "<3.14" setup.py; then echo "ERROR: python_requires cap is still in setup.py" >&2; exit 1; fi %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files vivarium %check %pyproject_check_import # Upstream keeps most of its tests INSIDE the module files (test_* functions beside the code), # which pytest's default collection skips: the default finds 12 of 115. -o python_files='*.py' # collects them all. Run against the INSTALLED package from a scratch directory, because # `python -m pytest` puts the current directory first on sys.path and the source tree would # otherwise shadow the buildroot. # # Excluded, and why (counts measured on f44 and f45): # * -k ... the tests that talk to a MongoDB server or its emitter; there is none in a build # * test_large_emits, test_query_db -> pymongo.errors: need that same server # * plots/topology.py::test_merge_port_topology -> IndexError raised inside networkx's own # draw_networkx_nodes ("boolean index did not match"): vivarium passes node_shape in a form # networkx 3.6.1 indexes differently. A plotting incompatibility, not a Python-version one, # and the same on 3.14 and 3.15. Report upstream; delete the deselect when it is fixed. # Result with these exclusions: 110 passed. cd "$(mktemp -d)" # Deselected by NAME with -k, not by --deselect node id: against an installed package the node # ids carry the install path, so an exact-path --deselect can silently match nothing. %pytest --pyargs vivarium -o python_files='*.py' \ -k "not mongo and not Mongo and not database and not emitter and not Database and not test_large_emits and not test_query_db and not test_merge_port_topology" %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE.txt %doc README.md AUTHORS.md %changelog * Mon Oct 05 2026 Morgan Hough - 1.6.5-1 - Initial package: vivarium-core 1.6.5, one of the four projects on the Build-A-Cell tutorial-models page (the other three, biocrnpyler, bioscrape and subsbml, are already built here). It was recorded as blocked by python_requires <3.14. - That cap is metadata, not a measured failure, so %%prep removes it with a guard that fails the build if upstream reformats setup.py. Evidence: with the cap bypassed on Python 3.14.7 and 3.15.0rc2, all imports pass and 110 of 115 upstream tests pass on both. - %%check runs the in-module tests (115, not the 12 default collection finds) against the installed package, and excludes five: two need a MongoDB server, two more are selected out by the same keyword filter, and test_merge_port_topology fails inside networkx 3.6.1's own plotting code. - Licence follows LICENSE.txt (Apache-2.0); PyPI metadata says MIT.