%global pretty_name STEPS %global module_name steps # Switch them off if you want # Best to start with the serial version %bcond_without mpich %bcond_without openmpi # Do not currently use system sundials # https://bugzilla.redhat.com/show_bug.cgi?id=1820991 %global system_sundials 0 %global _description %{expand: STEPS is a package for exact stochastic simulation of reaction-diffusion systems in arbitrarily complex 3D geometries. Our core simulation algorithm is an implementation of Gillespie's SSA, extended to deal with diffusion of molecules over the elements of a 3D tetrahedral mesh. While it was mainly developed for simulating detailed models of neuronal signaling pathways in dendrites and around synapses, it is a general tool and can be used for studying any biochemical pathway in which spatial gradients and morphology are thought to play a role. STEPS also supports accurate and efficient computational of local membrane potentials on tetrahedral meshes, with the addition of voltage-gated channels and currents. Tight integration between the reaction-diffusion calculations and the tetrahedral mesh potentials allows detailed coupling between molecular activity and local electrical excitability. We have implemented STEPS as a set of Python modules, which means STEPS users can use Python scripts to control all aspects of setting up the model, generating a mesh, controlling the simulation and generating and analyzing output. The core computational routines are still implemented as C/C++ extension modules for maximal speed of execution. STEPS 3.0.0 and above provide early parallel solution for stochastic spatial reaction-diffusion and electric field simulation. Documentation can be found here: http://steps.sourceforge.net/manual/manual_index.html } Name: python-%{module_name} Version: 3.5.0 Release: 1%{?dist} Summary: STochastic Engine for Pathway Simulation License: GPLv2 URL: http://steps.sourceforge.net/ Source0: https://github.com/CNS-OIST/STEPS/archive/%{version}/%{module_name}-%{version}.tar.gz # Header only library, needs cc file # https://raw.githubusercontent.com/amrayn/easyloggingpp/master/src/easylogging%2B%2B.cc Source1: easylogging++.cc # https://raw.githubusercontent.com/amrayn/easyloggingpp/master/src/easylogging%2B%2B.h Source2: easylogging++.h # Patches generated from: https://github.com/sanjayankur31/STEPS/tree/fedora-3.5.0 # use system gtest Patch0: 0001-Unbundle-gtest.patch %if "%{system_sundials}" == "1" # Tweak cmake file to stop looking for SUNDIALS_DIR Patch1: 0002-Update-sundials-cmake.patch %endif # Remove flags they set Patch2: 0003-Remove-flags-set-by-project.patch # Remove pysteps flags Patch3: 0004-Remove-pysteps-flags.patch # We'll install manually, much easier and cleaner Patch4: 0005-Disable-pyinstall.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: gtest-devel BuildRequires: petsc-devel BuildRequires: python3-devel BuildRequires: %{py3_dist Cython} BuildRequires: %{py3_dist numpy} BuildRequires: openblas-devel BuildRequires: Random123-devel %if "%{system_sundials}" == "1" BuildRequires: sundials2-devel %endif %description %{_description} %package -n python3-%{module_name} Summary: STochastic Engine for Pathway Simulation Provides: %{module_name} = %{version}-%{release} %description -n python3-%{module_name} %{_description} %if %{with openmpi} %package -n python3-%{module_name}-openmpi Summary: %{module_name} built with openmpi BuildRequires: openmpi-devel BuildRequires: petsc-openmpi-devel BuildRequires: rpm-mpi-hooks BuildRequires: sundials-openmpi-devel Requires: openmpi %description -n python3-%{module_name}-openmpi %{_description} %endif %if %{with mpich} %package -n python3-%{module_name}-mpich Summary: %{module_name} built with mpich BuildRequires: mpich-devel BuildRequires: petsc-mpich-devel BuildRequires: rpm-mpi-hooks BuildRequires: sundials-mpich-devel Requires: mpich %description -n python3-%{module_name}-mpich %{_description} %endif %prep %autosetup -n %{pretty_name}-%{version} -S git # Easyloggingpp mkdir -pv src/third_party/easyloggingpp/src/ cp %{SOURCE1} src/third_party/easyloggingpp/src/ -v cp %{SOURCE2} src/third_party/easyloggingpp/src/ -v # Correct for sundials2 # sed -i.orig 's|^#include.* - 3.5.0-1 - Initial rpmbuild