## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## 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 0 %bcond openmpi 0 # Defined early because it is used in %generate_buildrequires # Best to use && so that if anything in the chain fails, the build also fails # straight away %global do_cmake_config %{expand: \ echo echo "*** BUILDING steps-%{version}$MPI_COMPILE_TYPE ***" echo %set_build_flags export CXXFLAGS="${CXXFLAGS-} $(pkgconf --cflags gtest_main) $(pkgconf --libs gtest_main)" pushd build$MPI_COMPILE_TYPE && cmake \\\ -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} \\\ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ -DPYTHON_INSTALL_PREFIX:PATH=$MPI_PYTHON3_SITEARCH \\\ -DCMAKE_SKIP_RPATH:BOOL=ON \\\ -DUSE_MPI:BOOL=$MPI_YES \\\ -DSTEPS_USE_DIST_MESH=$MPI_YES \\\ -DUSE_PETSC:BOOL=$MPI_YES \\\ -DBLA_VENDOR:STRING=FlexiBLAS \\\ -DBLA_PREFER_PKGCONFIG:BOOL=True \\\ -DBUILD_SHARED_LIBS:BOOL="ON" \\\ %if "%{_lib}" == "lib64" -DLIB_SUFFIX=64 ../ && %else -DLIB_SUFFIX="" ../ && %endif popd || exit -1 } %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.0.3 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.0.3 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-Disable-python-install.patch Patch: 0006-template-matching-collections_hpp.patch Patch: 0007-Correct-MPI-linkage.patch Patch: 0008-Unbundle-gsl-lite.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: boost-devel BuildRequires: make BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig(gtest_main) BuildRequires: catch2-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 pytest} BuildRequires: %{py3_dist scipy} 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: rpm-mpi-hooks BuildRequires: sundials-openmpi-devel BuildRequires: gmsh-openmpi-devel BuildRequires: sandia-omega-h-openmpi-devel Requires: 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: rpm-mpi-hooks BuildRequires: sundials-mpich-devel BuildRequires: gmsh-mpich-devel BuildRequires: sandia-omega-h-mpich-devel Requires: 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 # gtest/gmock 1.13.0 requires C++14 or later sed -r -i 's/(CXX_DIALECT_OPT_CXX)11/\114/' CMakeLists.txt # 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/ # Build directories mkdir build %if %{with openmpi} mkdir build-openmpi %endif %if %{with mpich} mkdir build-mpich %endif # need to run cmake once for the python project files to be correctly configured %generate_buildrequires # Build serial version, dummy arguments export MPI_COMPILE_TYPE="" export MPI_COMPILER=serial export MPI_SUFFIX="" export MPI_HOME=%{_prefix} export MPI_BIN=%{_bindir} export MPI_PYTHON3_SITEARCH=%{python3_sitearch} export MPI_YES="False" %{do_cmake_config} pushd pysteps %pyproject_buildrequires popd %build %global do_make_build %{expand: \ %make_build -C build$MPI_COMPILE_TYPE && pushd pysteps %pyproject_wheel popd } # Build serial version, dummy arguments export MPI_COMPILE_TYPE="" export MPI_COMPILER=serial export MPI_SUFFIX="" export MPI_HOME=%{_prefix} export MPI_BIN=%{_bindir} export MPI_PYTHON3_SITEARCH=%{python3_sitearch} export MPI_YES="False" %{do_cmake_config} %{do_make_build} # 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_COMPILE_TYPE="-mpich" %{do_cmake_config} %{do_make_build} %{_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_COMPILE_TYPE="-openmpi" %{do_cmake_config} %{do_make_build} %{_openmpi_unload} %endif %install # Install everything %global do_install %{expand: \ echo echo "*** INSTALLING steps-%{version}$MPI_COMPILE_TYPE ***" echo %make_install CPPROG="cp -p" -C build$MPI_COMPILE_TYPE || exit -1 } # install serial version export MPI_COMPILE_TYPE="" export MPI_SUFFIX="" export MPI_HOME=%{_prefix} export MPI_BIN=%{_bindir} export MPI_YES="False" export MPI_COMPILE_TYPE="" export MPI_PYTHON3_SITEARCH="%{python3_sitearch}" %{do_install} # macro doesn't work inside another global pushd pysteps %pyproject_install popd # Install MPICH version %if %{with mpich} %{_mpich_load} export MPI_YES="True" export MPI_COMPILE_TYPE="-mpich" %{do_install} pushd pysteps %pyproject_install popd %{_mpich_unload} %endif # Install OpenMPI version %if %{with openmpi} %{_openmpi_load} export MPI_YES="True" export MPI_COMPILE_TYPE="-openmpi" %{do_install} pushd pysteps %pyproject_install popd %{_openmpi_unload} %endif %files -n python3-steps %license LICENSE.md #%%{python3_sitearch}/steps #%%{python3_sitearch}/steps-%{version}-py%{python3_version}.egg-info %if %{with mpich} %files -n python3-steps-mpich %license LICENSE.md #%%{python3_sitearch}/mpich/steps #%%{python3_sitearch}/mpich/steps-%{version}-py%{python3_version}.egg-info %endif %if %{with openmpi} %files -n python3-steps-openmpi %license LICENSE.md #%%{python3_sitearch}/openmpi/steps #%%{python3_sitearch}/openmpi/steps-%{version}-py%{python3_version}.egg-info %endif %changelog ## START: Generated by rpmautospec * Wed Nov 20 2024 Ankur Sinha (Ankur Sinha Gmail) - 5.0.3-1 - wip * Wed Nov 20 2024 Ankur Sinha (Ankur Sinha Gmail) - 3.6.0-38 - wip: update to 5.0.3 * 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