## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## 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 # Switch them off if you want # Best to start with the serial version %bcond mpich 1 %bcond openmpi 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 Gillespies 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-steps Version: 5.1.0 Release: %autorelease Summary: STochastic Engine for Pathway Simulation # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only URL: http://steps.sourceforge.net/ Source0: https://github.com/CNS-OIST/STEPS/archive/%{version}/STEPS-%{version}.tar.gz # they bundle HPC coding conventions as a git submodule %global conv_git_commit 8f8115597817365c5c4fa39e217b3ab0b3640cb2 %global conv_short_commit %(c=%{conv_git_commit}; echo ${c:0:7}) Source1: https://github.com/BlueBrain/hpc-coding-conventions/archive/%{conv_git_commit}/hpc-coding-conventions-%{conv_short_commit}.tar.gz # Patches generated from: https://github.com/sanjayankur31/STEPS/tree/fedora-5.1.0 Patch: 0001-Unbundle-catch.patch # may not be required Patch: 0002-Update-sundials-cmake.patch Patch: 0003-Remove-flags-set-by-project.patch Patch: 0004-Remove-pysteps-flags.patch Patch: 0005-template-matching-collections_hpp.patch Patch: 0006-Correct-MPI-linkage.patch Patch: 0007-Unbundle-gsl-lite.patch # Fedora-specific runtime dependency adjustments (no mpi4py for the # serial build, no version caps on h5py) Patch: 0008-Fedora-runtime-dependencies.patch # Parse the SUNDIALS version from the header instead of compiling and # running a probe (try_run fails with MPI wrappers + hardened PIE links) Patch: 0009-FindSUNDIALS-version-without-try-run.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: boost-devel BuildRequires: make BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: gsl-lite-devel BuildRequires: eigen3-devel BuildRequires: metis-devel BuildRequires: petsc-devel BuildRequires: python3-devel BuildRequires: %{py3_dist build} BuildRequires: %{py3_dist Cython} BuildRequires: %{py3_dist matplotlib} BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist pip} BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist scipy} BuildRequires: %{py3_dist scikit-build-core} BuildRequires: %{py3_dist setuptools} BuildRequires: flexiblas-devel BuildRequires: Random123-devel BuildRequires: zlib-devel # The -static BR is required for tracking of header-only libraries BuildRequires: pkgconfig(easyloggingpp) BuildRequires: easyloggingpp-static BuildRequires: sundials-devel BuildRequires: gmsh-devel BuildRequires: sandia-omega-h-devel %description %{_description} %package -n python3-steps Summary: STochastic Engine for Pathway Simulation Provides: steps = %{version}-%{release} %description -n python3-steps %{_description} %if %{with openmpi} %package -n python3-steps-openmpi Summary: steps built with openmpi BuildRequires: openmpi-devel BuildRequires: petsc-openmpi-devel BuildRequires: python3-mpi4py-openmpi BuildRequires: rpm-mpi-hooks BuildRequires: sundials-openmpi-devel BuildRequires: gmsh-openmpi-devel BuildRequires: sandia-omega-h-openmpi-devel Requires: openmpi # MPI flavor needs its MPI-flavored mpi4py (there is no serial provider); # patch 0008 drops the unconditional mpi4py requirement from the metadata. Requires: python3-mpi4py-openmpi %description -n python3-steps-openmpi %{_description} %endif %if %{with mpich} %package -n python3-steps-mpich Summary: steps built with mpich BuildRequires: mpich-devel BuildRequires: petsc-mpich-devel BuildRequires: python3-mpi4py-mpich BuildRequires: rpm-mpi-hooks BuildRequires: sundials-mpich-devel BuildRequires: gmsh-mpich-devel BuildRequires: sandia-omega-h-mpich-devel Requires: mpich # MPI flavor needs its MPI-flavored mpi4py (there is no serial provider); # patch 0008 drops the unconditional mpi4py requirement from the metadata. Requires: python3-mpi4py-mpich %description -n python3-steps-mpich %{_description} %endif %prep %autosetup -n STEPS-%{version} -N # use the copy that cmake ships instead of the older outdated copy that # upstream bundles rm -rf CMake/FindBLAS.cmake %autopatch -p1 # Remove bundled dependencies that we have unbundled: rm -rvf \ src/third_party/easyloggingpp \ src/third_party/gsl-lite* \ src/third_party/Random123* # extract coding convention tar # can probably use setup macro etc. pushd CMake/hpc-coding-conventions/ cp %SOURCE1 . tar -xvf hpc-coding-conventions*.tar.gz --strip-components=1 rm -f hpc-coding-conventions*.tar.gz popd # Finding an unbundled easylogging++ via pkg_check_modules() doesn’t work quite # the way upstream intended. The CMake variable EASYLOGGINGPP_INCLUDE_DIRS is # not set, but upstream expects to use that to find the source file # easylogging++.cc, and defining it manually # (-DEASYLOGGINGPP_INCLUDE_DIRS:PATH=…) without a corresponding set() in a # CMakeLists.txt somewhere does not seem to work. # # We could patch in “set(EASYLOGGINGPP_INCLUDE_DIRS %%{_includedir})” to the # top-level CMakeLists.txt in the case where USE_BUNDLE_EASYLOGGINGPP is false, # but it’s easier just to symlink the system files to the expected bundled # location and let the build system think it is stil bundled. mkdir -p src/third_party/easyloggingpp/src ln -s %{_includedir}/easylogging++.h %{_includedir}/easylogging++.cc \ src/third_party/easyloggingpp/src/ # NOTE: scikit-build-core manages its own build directory, so no # manual build dirs are created here. %build # Shared environment for all flavors (serial, mpich, openmpi). Each flavor # sets MPI_YES/MPI_SUFFIX/MPI_HOME (and the MPI compilers) before invoking # this, then builds its wheel with %%pyproject_wheel right after it. # Upstream builds via scikit-build-core from the top-level pyproject.toml, # producing a single platform wheel with pure-python files and the compiled # extension module. %global do_steps_env %{expand: \ export STEPS_NO_BUNDLE=true \ export CMAKE_ARGS=" \ -DUSE_BUNDLE_EASYLOGGINGPP:BOOL=ON \ -DUSE_BUNDLE_RANDOM123:BOOL=OFF \ -DUSE_BUNDLE_SUNDIALS:BOOL=OFF \ -DUSE_BUNDLE_OMEGA_H:BOOL=OFF \ -DSUNDIALS_DIR:PATH=%{_prefix} \ -DSUNDIALS_INCLUDE_DIR:PATH=%{_includedir} \ -DSUNDIALS_LIBRARY_DIR:PATH=%{_libdir} \ -DMETIS_DIR:PATH=%{_prefix} \ -DMETIS_INCLUDE_DIR:PATH=%{_includedir} \ -DMETIS_LIBRARY_DIR:PATH=%{_libdir} \ -DUSE_MPI:BOOL=$MPI_YES \ -DSTEPS_USE_DIST_MESH:BOOL=$MPI_YES \ -DUSE_PETSC:BOOL=$MPI_YES \ -DBLA_VENDOR:STRING=FlexiBLAS \ -DBLA_PREFER_PKGCONFIG:BOOL=True \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DSTEPS_INSTALL_PYTHON_DEPS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DTARGET_NATIVE_ARCH:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" \ %set_build_flags \ } # Stash the freshly built wheel in a per-flavor directory and reset the # scikit-build work directory so flavors cannot leak CMake caches, # compilers, or MPI detection into each other. %global do_steps_wheel_finish %{expand: \ mkdir -p wheeldir$MPI_SUFFIX \ mv %{_pyproject_wheeldir}/*.whl wheeldir$MPI_SUFFIX/ \ rm -rf %{_pyproject_builddir} \ } # STEPS_NO_BUNDLE=true above keeps scikit-build-core from pip-installing # bundled dependencies (cmeel-*, petsc): everything comes from system # packages and there is no network access in the buildroot. # Build serial version export MPI_YES="False" export MPI_SUFFIX="" export MPI_HOME=%{_prefix} %do_steps_env # install.strip=false keeps debug info in the compiled extension module # (scikit-build-core strips wheel contents by default, which would leave # find-debuginfo with nothing to do and fail the build). %pyproject_wheel -C install.strip=false %do_steps_wheel_finish # Build mpich version %if %{with mpich} %{_mpich_load} export CC=mpicc export CXX=mpicxx export FC=mpif90 export F77=mpif77 export MPI_YES="True" export MPI_SUFFIX="-mpich" # let Cython resolve "cimport mpi4py.MPI" from the MPI-flavored mpi4py export PYTHONPATH=$MPI_HOME/%{_lib}/python%{python3_version}/site-packages %do_steps_env %pyproject_wheel -C install.strip=false %do_steps_wheel_finish %{_mpich_unload} %endif # Build OpenMPI version %if %{with openmpi} %{_openmpi_load} export CC=mpicc export CXX=mpicxx export FC=mpif90 export F77=mpif77 export MPI_YES="True" export MPI_SUFFIX="-openmpi" # let Cython resolve "cimport mpi4py.MPI" from the MPI-flavored mpi4py export PYTHONPATH=$MPI_HOME/%{_lib}/python%{python3_version}/site-packages %do_steps_env %pyproject_wheel -C install.strip=false %do_steps_wheel_finish %{_openmpi_unload} %endif %install # Manual flavor install for the MPI flavors: mirrors %%pyproject_install # but installs into $MPI_HOME instead of %%{_prefix} and keeps per-flavor # bookkeeping files, since the stock macro hardcodes both the prefix and # the shared wheel/record paths. (The serial flavor keeps using the stock # macros below.) $MPI_SUFFIX selects the stashed wheel and the output paths; # $MPI_HOME comes from the MPI module environment. %global do_steps_install %{expand: \ specifier=$(ls wheeldir$MPI_SUFFIX/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\.whl/\\\1==\\\2/') \ PIP_CONFIG_FILE=/dev/null TMPDIR="%{_pyproject_builddir}" %{__python3} -m pip install --root %{buildroot} --prefix $MPI_HOME --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links wheeldir$MPI_SUFFIX $specifier \ _mpi_sitedir=$MPI_HOME/%{_lib}/python%{python3_version}/site-packages \ _mpi_distinfo=$(echo %{buildroot}$_mpi_sitedir/STEPS-*.dist-info) \ sed -i s/pip/rpm/ $_mpi_distinfo/INSTALLER \ %{__python3} -B %{_rpmconfigdir}/redhat/pyproject_preprocess_record.py --buildroot %{buildroot} --record $_mpi_distinfo/RECORD --output %{_builddir}/pyproject-record$MPI_SUFFIX \ rm -fv $_mpi_distinfo/RECORD \ rm -fv $_mpi_distinfo/REQUESTED \ %{expr:v"0%{?rpmversion}" >= v"4.18.90" ? "RPM_FILES_ESCAPE=4.19" : "RPM_FILES_ESCAPE=4.18" } %{__python3} %{_rpmconfigdir}/redhat/pyproject_save_files.py --output-files %{_builddir}/pyproject-files$MPI_SUFFIX --output-modules %{_builddir}/pyproject-modules$MPI_SUFFIX --buildroot %{buildroot} --sitelib $MPI_HOME/%{_lib}/python%{python3_version}/site-packages --sitearch $MPI_HOME/%{_lib}/python%{python3_version}/site-packages --python-version %{python3_version} --pyproject-record %{_builddir}/pyproject-record$MPI_SUFFIX --prefix $MPI_HOME -L steps stepsblender \ } # Install serial version: restore the stashed wheel for the stock macros. export MPI_SUFFIX="" export MPI_HOME=%{_prefix} mv wheeldir/*.whl %{_pyproject_wheeldir}/ %pyproject_install # Here, "steps" and "stepsblender" are the importable modules. %pyproject_save_files -L steps stepsblender # Install MPICH version %if %{with mpich} %{_mpich_load} export MPI_SUFFIX="-mpich" %do_steps_install %{_mpich_unload} %endif # Install OpenMPI version %if %{with openmpi} %{_openmpi_load} export MPI_SUFFIX="-openmpi" %do_steps_install %{_openmpi_unload} %endif %files -n python3-steps -f %{pyproject_files} %license LICENSE.md %if %{with mpich} %files -n python3-steps-mpich -f %{_builddir}/pyproject-files-mpich %license LICENSE.md %endif %if %{with openmpi} %files -n python3-steps-openmpi -f %{_builddir}/pyproject-files-openmpi %license LICENSE.md %endif %changelog ## START: Generated by rpmautospec * Sun Sep 20 2026 Ankur Sinha (Ankur Sinha Gmail) - 5.1.0-1 - wip * Thu Sep 17 2026 Ankur Sinha (Ankur Sinha Gmail) - 5.0.3-1 - wip: update to 5.0.3 * Wed Jul 22 2026 Python Maint - 3.6.0-53 - Rebuilt for Python 3.15.0b4 ABI change * Thu Jul 16 2026 Fedora Release Engineering - 3.6.0-52 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Thu Jun 04 2026 Python Maint - 3.6.0-51 - Rebuilt for Python 3.15 * Thu Apr 23 2026 Benjamin A. Beasley - 3.6.0-50 - Fix accidental use of non-baseline ISA extensions (-march=native) * Sat Jan 17 2026 Fedora Release Engineering - 3.6.0-49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Wed Nov 12 2025 Benjamin A. Beasley - 3.6.0-48 - Rebuilt for gtest 1.17.0 * Mon Nov 03 2025 Benjamin A. Beasley - 3.6.0-47 - Build as C++17 for compatibility with gtest 1.17 * Sat Oct 18 2025 Antonio Trande - 3.6.0-46 - Rebuild for petsc-3.24.0 * Fri Sep 19 2025 Python Maint - 3.6.0-45 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 3.6.0-44 - Rebuilt for Python 3.14.0rc2 bytecode * Tue Aug 05 2025 Charalampos Stratakis - 3.6.0-43 - Fix compatibility with Cython >= 3.1 - Fixes: rhbz#2377054 * Fri Jul 25 2025 Fedora Release Engineering - 3.6.0-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue Jun 03 2025 Python Maint - 3.6.0-41 - Rebuilt for Python 3.14 * Mon Apr 28 2025 Antonio Trande - 3.6.0-40 - Rebuild for petsc-3.23.0 * Wed Jan 22 2025 Benjamin A. Beasley - 3.6.0-39 - Rebuilt for gtest 1.15.2 * Sat Jan 18 2025 Fedora Release Engineering - 3.6.0-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Jul 29 2024 Miroslav Suchý - 3.6.0-37 - convert GPLv2 license to SPDX * Fri Jul 19 2024 Fedora Release Engineering - 3.6.0-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 3.6.0-35 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 3.6.0-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 3.6.0-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Oct 30 2023 Benjamin A. Beasley - 3.6.0-32 - Rebuild for gtest 1.14.0 * Sun Oct 29 2023 Orion Poplawski - 3.6.0-31 - Rebuild for openmpi 5.0.0, drops C++ API * Fri Jul 21 2023 Fedora Release Engineering - 3.6.0-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 27 2023 Python Maint - 3.6.0-29 - Rebuilt for Python 3.12 * Fri Feb 03 2023 Benjamin A. Beasley - 3.6.0-28 - Leaf package on ix86: drop ix86 support * Tue Jan 24 2023 Benjamin A. Beasley - 3.6.0-27 - Rebuilt for gtest 1.13.0 (fix RHBZ#2164003) - Build with C++14 instead of C++11, since gtest dropped support - Add a missing #include directive for GCC 13 * Tue Jan 24 2023 Benjamin A. Beasley - 3.6.0-26 - Remove old easylogging++ sources from dist-git * Fri Jan 20 2023 Fedora Release Engineering - 3.6.0-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Sep 08 2022 Benjamin A. Beasley - 3.6.0-24 - Tidy up spec file formatting * Thu Sep 08 2022 Benjamin A. Beasley - 3.6.0-23 - Stop numbering patches * Thu Sep 08 2022 Benjamin A. Beasley - 3.6.0-22 - Unbundle easyloggingpp * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-21 - Improve treatment of bundled sundials(2) - Unbundling currently works up to linking, where there are undefined references * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-20 - Use more standard macros where we can * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-19 - Add -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF to match %%%%cmake * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-18 - Use pkgconf to set unbundled gtest flags * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-17 - Simplify patch application * Mon Aug 29 2022 Benjamin A. Beasley - 3.6.0-16 - Better handle bundled easyloggingpp dependency * Thu Aug 18 2022 Benjamin A. Beasley - 3.6.0-15 - Remove unbundled dependencies in %%%%prep * Thu Aug 18 2022 Benjamin A. Beasley - 3.6.0-14 - Remove workaround for pre-flexiblas Fedora versions * Thu Aug 18 2022 Benjamin A. Beasley - 3.6.0-13 - Reduce macro indirection in the spec file * Fri Jul 22 2022 Fedora Release Engineering - 3.6.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sun Jul 10 2022 Ankur Sinha (Ankur Sinha Gmail) - 3.6.0-11 - fix: correct macro * Tue Jul 5 2022 Mamoru TASAKA - 3.6.0-8 - Add more template funtion to match (bug 2046914) * Wed Jun 15 2022 Python Maint - 3.6.0-7 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 3.6.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Oct 18 2021 Antonio Trande - 3.6.0-5 - Rebuild for PETSc-3.16.0 * Sun Sep 05 2021 Benjamin A. Beasley - 3.6.0-4 - Rebuild for gtest 1.11.0 * Fri Jul 23 2021 Fedora Release Engineering - 3.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon Jun 28 2021 Ankur Sinha - 3.6.0-2 - Fix requires * Sat Jun 26 2021 Ankur Sinha - 3.6.0-1 - Merge https://src.fedoraproject.org/rpms/python-steps/pull-request/2 manually - Release 3.6.0 - Update Patch2 - Use bundled cvode-2.6.0 (upstream bug #23) * Fri Jun 04 2021 Python Maint - 3.5.0-10 - Rebuilt for Python 3.10 * Mon May 17 2021 Ankur Sinha - 3.5.0-9 - Rebuild for sundials update * Wed Apr 21 2021 Ankur Sinha - 3.5.0-8 - Rebuild for petsc update * Wed Jan 27 2021 Fedora Release Engineering - 3.5.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Oct 06 2020 Antonio Trande - 3.5.0-6 - Rebuild for sundials-5.4.0 * Thu Aug 27 2020 Iñaki Úcar - 3.5.0-5 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager * Wed Jul 29 2020 Fedora Release Engineering - 3.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jun 25 2020 Ankur Sinha - 3.5.0-3 - Explicitly BR setuptools * Tue May 26 2020 Miro Hrončok - 3.5.0-2 - Rebuilt for Python 3.9 * Sat Apr 04 2020 Ankur Sinha - 3.5.0-1 - Initial rpmbuild ## END: Generated by rpmautospec