## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name AstroVascPy # Packaged is arched but has no debuginfo %global debug_package %{nil} Name: python-astrovascpy Version: 0.1.5 Release: %{autorelease} Summary: Simulating blood flow in vasculature %global forgeurl https://github.com/BlueBrain/%{pypi_name} %global tag %{version} %forgemeta License: Apache-2.0 URL: %forgeurl Source: %forgesource # Fix compatibility with pandas 2.x # https://github.com/BlueBrain/AstroVascPy/pull/35 # Rebased patch onto 0.1.5. Patch: %{forgeurl}/pull/35.patch BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-mpi4py-mpich BuildRequires: python3-petsc-mpich BuildRequires: mpich-devel BuildRequires: python3-mpi4py-openmpi BuildRequires: python3-petsc-openmpi BuildRequires: openmpi-devel %global _description %{expand: AstroVascPy is a Python library for computing the blood pressure and flow through the vasculature (whole cortical column). AstroVascPy incorporates the effect of astrocytic endfeet on the blood vessel radii. In particular, AstroVascPy replicates the dynamics of the radius of a vessel due to vasodilation. AstroVascPy uses vascpy Point Graph representation to access the vasculature database stored in h5 file (sonata format). vascpy standardizes the api for the vasculature datasets. PointVasculature (PointGraph) representation is basically a composition of two pandas data frames, one for node properties (x, y, z, radius, other...) and one for edge properties (start_node, end_node, other...).} %description %_description %package -n python3-astrovascpy Summary: %{summary} Requires: python3-mpi4py-runtime Recommends: python3-petsc-mpich if python3-petsc-mpich Recommends: python3-petsc-openmpi if python3-petsc-openmpi %description -n python3-astrovascpy %_description %pyproject_extras_subpkg -n python3-astrovascpy viz %prep %forgeautosetup -p1 # Nothing provides `python3dist(mpi4py)` since it depends on the MPI # provider. We build require both flavors. # Drop version constraint from `pandas`. sed -r \ -e '/mpi4py/ d' \ -e 's/(pandas).*"/\1"/' \ -i setup.py %generate_buildrequires %pyproject_buildrequires -x test,viz %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l astrovascpy %check export BACKEND_SOLVER_BFS=petsc # Test fails for unknow reasons k="${k-}${k+ and }not test_petsc_installation" %{_mpich_load} # Normal test run will skip MPI tests %pytest -v ${k+-k }"${k-}" # MPI tests need to be run with `-n 4` specifically %{py3_test_envvars} mpirun -n 4 \ %{python3} -m pytest -v --with-mpi tests/test_mpi.py %pyproject_check_import %{_mpich_unload} %{_openmpi_load} # Normal test run will skip MPI tests %pytest -v ${k+-k }"${k-}" # MPI tests need to be run with `-n 4` specifically %{py3_test_envvars} mpirun -n 4 \ %{python3} -m pytest -v --with-mpi tests/test_mpi.py %pyproject_check_import %{_openmpi_unload} %files -n python3-astrovascpy -f %{pyproject_files} %doc README.md AUTHORS.txt CHANGELOG.md CITATION.cff %{_bindir}/astrovascpy %changelog ## START: Generated by rpmautospec * Fri May 24 2024 Sandro - 0.1.5-1 - Initial package ## END: Generated by rpmautospec