c9aab32
# We build the python bit separately - their build system doesn't let me build
c9aab32
# and install separately - everything is done at install time
c9aab32
c9aab32
# We do not build the developer documentation with doxygen. Advanced developers
c9aab32
# that develop based on the source git tree can build it themselves
c9aab32
# Switch them off if you want
224e11f
%bcond_without mpich
224e11f
%bcond_without openmpi
eb10d10
224e11f
# Tests include source linters and so on, and require a specific older version
224e11f
# of vera and clang and so forth, so we simply rely on upstream CI here
224e11f
%bcond_with tests
c9aab32
c9aab32
Name:           nest
07272f1
Version:        2.20.1
c9aab32
c9aab32
%global gittag v%{version}
c9aab32
5b4624a
Release:        5%{?dist}
c9aab32
Summary:        The neural simulation tool
c9aab32
c9aab32
License:        GPLv2+
c9aab32
URL:            http://www.nest-simulator.org/
c9aab32
Source0:        https://github.com/%{name}/%{name}-simulator/archive/%{gittag}/%{name}-%{version}.tar.gz
52613e7
Source1:        README-Fedora.md
c9aab32
ef85260
# 1. Let it build and install the cythonised shared object But we still build
ef85260
# our python modules ourselves
c9aab32
ef85260
# 2. The helpindex must be generated after the help files have been installed
ef85260
# to the install location, so we do this manually because the script doesn't
c9aab32
# respect rpmbuildroot and so on
72e9fb5
# Patch0:         %%{name}-0000-disable-pybits.patch
72e9fb5
Patch0:         0001-Disable-python-setups.patch
ef85260
c9aab32
c9aab32
BuildRequires:  ncurses-devel
c9aab32
BuildRequires:  gsl-devel
c9aab32
BuildRequires:  readline-devel
c9aab32
BuildRequires:  python3-devel
c9aab32
BuildRequires:  python3-Cython
c9aab32
BuildRequires:  python3-nose
c9aab32
BuildRequires:  libtool-ltdl-devel
c9aab32
BuildRequires:  cmake
c9aab32
BuildRequires:  libtool
c9aab32
BuildRequires:  doxygen
c9aab32
BuildRequires:  graphviz
c9aab32
BuildRequires:  gcc-c++
224e11f
BuildRequires:  libneurosim-devel
c9aab32
Requires:       %{name}-common
c9aab32
ef85260
%global _description %{expand:
ef85260
NEST is a simulator for spiking neural network models that focuses on the
ef85260
dynamics, size and structure of neural systems rather than on the exact
ef85260
morphology of individual neurons. The development of NEST is coordinated by the
ef85260
NEST Initiative.  NEST is ideal for networks of spiking neurons of any size,
ef85260
for example: Models of information processing e.g. in the visual or auditory
ef85260
cortex of mammals; Models of network activity dynamics, e.g. laminar cortical
ef85260
networks or balanced random networks; Models of learning and plasticity.
ef85260
Please read the README-Fedora.md file provided in each package for information
ef85260
on how these NEST packages are to be used.
ef85260
52613e7
Documentation is available separately in the nest-doc package.
ef85260
}
c9aab32
ef85260
%description %_description
c9aab32
c9aab32
%package common
c9aab32
BuildArch:  noarch
c9aab32
Summary:    Common files for %{name}
c9aab32
ef85260
%description common %_description
c9aab32
cb7e44a
%package headers
cb7e44a
BuildArch:  noarch
cb7e44a
Summary:    Header files for %{name}
cb7e44a
ef85260
%description headers %_description
cb7e44a
c9aab32
%package doc
c9aab32
BuildArch:  noarch
c9aab32
Summary:    Documentation for %{name}
c9aab32
ef85260
%description doc %_description
c9aab32
c9aab32
c9aab32
%package -n python3-%{name}
c9aab32
Summary:    Python3 bindings for nest
c9aab32
Requires:   %{name} = %{version}-%{release}
c9aab32
Requires:   %{name}-common = %{version}-%{release}
798ca49
Requires:   %{py3_dist numpy} %{py3_dist scipy}
798ca49
Recommends: %{py3_dist matplotlib}
798ca49
Recommends: %{py3_dist ipython}
c9aab32
%{?python_provide:%python_provide python3-%{name}}
c9aab32
ef85260
%description -n python3-%{name} %_description
c9aab32
224e11f
%if %{with openmpi}
c9aab32
%package openmpi
c9aab32
Summary:        %{name} built with openmpi
c9aab32
BuildRequires:  openmpi-devel
c9aab32
BuildRequires:  rpm-mpi-hooks
224e11f
BuildRequires:  libneurosim-openmpi-devel
d1e0752
BuildRequires:  MUSIC-openmpi-devel
d1e0752
BuildRequires:  MUSIC-openmpi
c9aab32
Requires:       openmpi
c9aab32
Requires:       %{name}-openmpi-common = %{version}-%{release}
c9aab32
ef85260
%description openmpi %_description
c9aab32
c9aab32
%package openmpi-common
c9aab32
Summary:    Common files for %{name} built with openmpi support
c9aab32
ef85260
%description openmpi-common %_description
c9aab32
cb7e44a
%package openmpi-headers
cb7e44a
Summary:    Header files for %{name} built with openmpi support
cb7e44a
ef85260
%description openmpi-headers %_description
c9aab32
c9aab32
%package -n python3-%{name}-openmpi
c9aab32
Summary:    Python3 bindings for nest with openmpi support
c9aab32
BuildRequires:  rpm-mpi-hooks
c9aab32
Requires:   openmpi
c9aab32
Requires:   %{name}-openmpi = %{version}-%{release}
c9aab32
Requires:   %{name}-openmpi-common = %{version}-%{release}
798ca49
Requires:   %{py3_dist numpy} %{py3_dist scipy}
798ca49
Recommends: %{py3_dist matplotlib}
798ca49
Recommends: %{py3_dist ipython}
c9aab32
%{?python_provide:%python_provide python3-%{name}-openmpi}
c9aab32
ef85260
%description -n python3-%{name}-openmpi %_description
c9aab32
%endif
c9aab32
224e11f
%if %{with mpich}
c9aab32
%package mpich
c9aab32
Summary:        %{name} built with mpich
c9aab32
BuildRequires:  mpich-devel
c9aab32
BuildRequires:  rpm-mpi-hooks
224e11f
BuildRequires:  libneurosim-mpich-devel
d1e0752
BuildRequires:  MUSIC-mpich-devel
d1e0752
BuildRequires:  MUSIC-mpich
c9aab32
Requires:       mpich
c9aab32
Requires:       %{name}-mpich-common = %{version}-%{release}
c9aab32
ef85260
%description mpich %_description
c9aab32
c9aab32
%package mpich-common
c9aab32
Summary:    Common files for %{name} built with mpich support
c9aab32
ef85260
%description mpich-common %_description
c9aab32
cb7e44a
%package mpich-headers
cb7e44a
Summary:    Header files for %{name} built with mpich support
cb7e44a
ef85260
%description mpich-headers %_description
cb7e44a
cb7e44a
c9aab32
%package -n python3-%{name}-mpich
c9aab32
Summary:    Python3 bindings for nest with mpich support
c9aab32
BuildRequires:  rpm-mpi-hooks
c9aab32
Requires:   %{name}-mpich = %{version}-%{release}
c9aab32
Requires:   %{name}-mpich-common = %{version}-%{release}
c9aab32
Requires:   mpich
798ca49
Requires:   %{py3_dist numpy} %{py3_dist scipy}
798ca49
Recommends: %{py3_dist matplotlib}
798ca49
Recommends: %{py3_dist ipython}
c9aab32
%{?python_provide:%python_provide python3-%{name}-mpich}
c9aab32
ef85260
%description -n python3-%{name}-mpich %_description
c9aab32
%endif
c9aab32
c9aab32
%prep
72e9fb5
%autosetup -c -n %{name}-simulator-%{version} -N
52613e7
cp %{SOURCE1} ./ -v
eb10d10
cp %{name}-simulator-%{version}/LICENSE . -v
c9aab32
eb10d10
# Tweaks
eb10d10
pushd %{name}-simulator-%{version}
72e9fb5
# Apply the patch
72e9fb5
%patch0 -p1
c9aab32
# We'll set it ourselves - easier for mpi implementations
c9aab32
sed -i.orig '/PYEXECDIR/ d' cmake/ProcessOptions.cmake
c9aab32
# These files are all in standard locations so we don't need them
c9aab32
# Loading an MPI module sets up PATH correctly
c9aab32
sed -i '/PATH=/ d' extras/nest_vars.sh.in
c9aab32
# Set the correct PYTHONPATH using nest_vars.sh
c9aab32
# loading an MPI module DOES NOT seem to set the python path
c9aab32
sed -i 's|NEST_PYTHON_PREFIX=$NEST_INSTALL_DIR/@PYEXECDIR@|NEST_PYTHON_PREFIX=@PYEXECDIR@|' extras/nest_vars.sh.in
eb10d10
popd
c9aab32
224e11f
# Find py3 version of libneurosim in the py3 builds/packages
224e11f
sed -i 's/pyneurosim/py3neurosim/' %{name}-simulator-%{version}/cmake/FindLibNeurosim.cmake
224e11f
52613e7
# Correct shebangs for py3
52613e7
find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' '{}' \;
cb7e44a
224e11f
%if %{with mpich}
c9aab32
    cp -a %{name}-simulator-%{version} %{name}-simulator-%{version}-mpich
c9aab32
c9aab32
    # Don't generate docs for each build
c9aab32
    sed -i '/add_subdirectory.*doc/ d' %{name}-simulator-%{version}-mpich/CMakeLists.txt
c9aab32
    # Don't install examples and extras for each
c9aab32
    sed -i '/add_subdirectory.*examples/ d' %{name}-simulator-%{version}-mpich/CMakeLists.txt
c9aab32
    # Don't install tests in docdir either
c9aab32
    sed -i '/add_subdirectory.*testsuite/ d' %{name}-simulator-%{version}-mpich/CMakeLists.txt
c9aab32
%endif
c9aab32
224e11f
%if %{with openmpi}
c9aab32
    cp -a %{name}-simulator-%{version} %{name}-simulator-%{version}-openmpi
c9aab32
c9aab32
    # Don't generate docs for these
c9aab32
    sed -i '/add_subdirectory.*doc/ d' %{name}-simulator-%{version}-openmpi/CMakeLists.txt
c9aab32
    # Don't install examples and extras for each
c9aab32
    sed -i '/add_subdirectory.*examples/ d' %{name}-simulator-%{version}-openmpi/CMakeLists.txt
c9aab32
    # Don't install tests in docdir either
c9aab32
    sed -i '/add_subdirectory.*testsuite/ d' %{name}-simulator-%{version}-openmpi/CMakeLists.txt
c9aab32
%endif
c9aab32
c9aab32
%build
5b4624a
# On armv7 we get a failure with LTO.  The log has no useful information in it
5b4624a
# but my guess is we ran out of memory on the builder.  Disable LTO for armv7
5b4624a
%ifarch armv7hl
5b4624a
%define _lto_cflags %{nil}
5b4624a
%endif
5b4624a
aa9566f
%set_build_flags
aa9566f
c9aab32
%global do_cmake_config \
c9aab32
echo  \
c9aab32
echo "*** BUILDING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***"  \
c9aab32
echo  \
52613e7
export PYEXECDIR=$MPI_SITEARCH  \
c9aab32
export PYNEST_CFLAGS="%{optflags}"  \
c9aab32
export PYNEST_CXXFLAGS="%{optflags}"  \
224e11f
%set_build_flags \
c9aab32
pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE  && \
c9aab32
    cmake \\\
c9aab32
        -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
c9aab32
        -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
c9aab32
        -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
c9aab32
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
99131e2
        -DCMAKE_INSTALL_INCLUDEDIR:PATH=$MPI_INCLUDE \\\
99131e2
        -DCMAKE_INSTALL_LIBDIR:PATH=$MPI_LIB \\\
c9aab32
        -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
c9aab32
        -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
c9aab32
        -DCMAKE_SKIP_RPATH:BOOL=ON \\\
c9aab32
        -Dwith-mpi:BOOL=$MPI_YES \\\
c9aab32
        -Dwith-gsl:BOOL=ON \\\
224e11f
        -Dwith-libneurosim:PATH=$MPI_HOME \\\
c9aab32
        -Dwith-python:STRING=$PYTHON_VERSION  \\\
c9aab32
        -DPYEXECDIR:PATH=$MPI_SITEARCH \\\
c9aab32
        -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \\\
c9aab32
        -DBUILD_SHARED_LIBS:BOOL=ON \\\
d1e0752
%if %{music} \
d1e0752
        -Dwith-music:BOOL=ON \\\
d1e0752
        -DMUSIC_INCLUDE_DIR:PATH=$MPI_INCLUDE/music.hh \\\
d1e0752
        -DMUSIC_LIBRARY:PATH=$MPI_LIB/libmusic.so \\\
d1e0752
        -DMUSIC_EXECUTABLE:PATH=$MPI_BIN/music$MPI_SUFFIX \\\
d1e0752
%else \
d1e0752
        -Dwith-music:BOOL=OFF \\\
d1e0752
%endif \
c9aab32
%if "%{_lib}" == "lib64" \
4eba69c
        -DLIB_SUFFIX=64 . && \
c9aab32
%else                      \
4eba69c
        -DLIB_SUFFIX="" . && \
c9aab32
%endif \
c9aab32
popd || exit -1;
c9aab32
c9aab32
%global do_make_build \
d1e0752
    %make_build -C %{name}-simulator-%{version}$MPI_COMPILE_TYPE || exit -1
c9aab32
c9aab32
%global do_pybuild \
c9aab32
pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE  && \
c9aab32
    pushd pynest && \
aa9566f
        $PYTHON_BIN setup.py build \
c9aab32
    popd && \
c9aab32
    pushd topology && \
aa9566f
        $PYTHON_BIN setup.py build \
c9aab32
    popd && \
c9aab32
    pushd extras/ConnPlotter && \
aa9566f
        $PYTHON_BIN setup.py build \
c9aab32
    popd && \
c9aab32
popd || exit -1;
c9aab32
c9aab32
# Build serial version, dummy arguments
d1e0752
# Disable music, which requires MPI to be ON
d1e0752
%global music 0
c9aab32
export MPI_PYTHON3_SITEARCH="%{python3_sitearch}"
c9aab32
export MPI_COMPILER=serial
c9aab32
export MPI_SUFFIX=""
c9aab32
export MPI_HOME=%{_prefix}
c9aab32
export MPI_BIN=%{_bindir}
99131e2
export MPI_INCLUDE=%{_includedir}
99131e2
export MPI_LIB=%{_libdir}
c9aab32
export MPI_YES=OFF
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE=""
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
%{do_cmake_config}
c9aab32
%{do_make_build}
c9aab32
%{do_pybuild}
c9aab32
d1e0752
# Enable music support
d1e0752
%global music 1
52613e7
# Build mpich version
224e11f
%if %{with mpich}
52613e7
%{_mpich_load}
52613e7
export CC=mpicc
52613e7
export CXX=mpicxx
52613e7
export FC=mpif90
52613e7
export F77=mpif77
52613e7
export MPI_YES=ON
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE="-mpich"
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
%{do_cmake_config}
c9aab32
%{do_make_build}
c9aab32
%{do_pybuild}
c9aab32
c9aab32
%{_mpich_unload}
c9aab32
%endif
c9aab32
c9aab32
# Build OpenMPI version
224e11f
%if %{with openmpi}
c9aab32
%{_openmpi_load}
c9aab32
export CC=mpicc
c9aab32
export CXX=mpicxx
c9aab32
export FC=mpif90
c9aab32
export F77=mpif77
c9aab32
export MPI_YES=ON
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE="-openmpi"
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
%{do_cmake_config}
c9aab32
%{do_make_build}
c9aab32
%{do_pybuild}
c9aab32
c9aab32
%{_openmpi_unload}
c9aab32
%endif
c9aab32
c9aab32
%install
52613e7
# Install everything
c9aab32
%global do_install \
c9aab32
echo  \
c9aab32
echo "*** INSTALLING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***"  \
c9aab32
echo  \
d1e0752
    %make_install -C %{name}-simulator-%{version}$MPI_COMPILE_TYPE || exit -1
c9aab32
c9aab32
52613e7
# Only install the pynestkernel
c9aab32
%global do_pynestkernel_install \
c9aab32
pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \
c9aab32
    pushd pynest && \
c9aab32
        install -m 0755 -p -D -t $RPM_BUILD_ROOT/$MPI_SITEARCH/%{name} pynestkernel.so \
c9aab32
    popd && \
c9aab32
popd || exit -1;
c9aab32
52613e7
# Install the other python bits
c9aab32
%global do_pyinstall \
c9aab32
pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \
c9aab32
    pushd pynest && \
c9aab32
        $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT --install-lib=$MPI_SITEARCH && \
c9aab32
    popd && \
c9aab32
    pushd topology && \
c9aab32
        $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT --install-lib=$MPI_SITEARCH && \
c9aab32
    popd && \
c9aab32
    pushd extras/ConnPlotter && \
c9aab32
        $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT && \
c9aab32
    popd && \
c9aab32
popd || exit -1;
c9aab32
c9aab32
c9aab32
# install serial version
c9aab32
export MPI_SUFFIX=""
c9aab32
export MPI_HOME=%{_prefix}
c9aab32
export MPI_BIN=%{_bindir}
c9aab32
export MPI_YES=OFF
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE=""
c9aab32
export MPI_SITEARCH="%{python3_sitearch}"
c9aab32
export PYTHON_BIN="%{__python3}"
52613e7
%{do_install}
c9aab32
%{do_pyinstall}
c9aab32
c9aab32
# Update the helpindex manually
c9aab32
# Should this go in %%post of the doc package maybe?
c9aab32
pushd %{name}-simulator-%{version}/extras/help_generator
52613e7
    %{__python3} -B generate_helpindex.py $RPM_BUILD_ROOT/%{_docdir}/%{name}/
c9aab32
popd
c9aab32
52613e7
52613e7
# Install MPICH version
224e11f
%if %{with mpich}
52613e7
%{_mpich_load}
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE="-mpich"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
export PYTHON_BIN="%{__python3}"
52613e7
%{do_install}
52613e7
%{do_pyinstall}
c9aab32
c9aab32
# Remove duplicated docs
c9aab32
rm -rf $RPM_BUILD_ROOT/%{_libdir}/mpich/share/doc/%{name}
52613e7
# Correct doc location
52613e7
sed -i 's|NEST_DOC_DIR=$NEST_INSTALL_DIR/share/doc/nest|NEST_DOC_DIR=/usr/share/doc/nest/|' $RPM_BUILD_ROOT/$MPI_BIN/nest_vars.sh
c9aab32
# Remove unneeded scripts
c9aab32
rm -rf $RPM_BUILD_ROOT/%{_libdir}/mpich/share/%{name}/{extras,help_generator}
c9aab32
b6af78e
# Rename binaries to add MPI suffix
b6af78e
pushd $RPM_BUILD_ROOT/$MPI_BIN/
b6af78e
    mv -v %{name}{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_vars{,$MPI_SUFFIX}.sh
b6af78e
    mv -v %{name}-config{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_serial{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_indirect{,$MPI_SUFFIX}
b6af78e
    mv -v sli{,$MPI_SUFFIX}
b6af78e
popd
b6af78e
c9aab32
%{_mpich_unload}
c9aab32
%endif
c9aab32
c9aab32
# Install OpenMPI version
224e11f
%if %{with openmpi}
c9aab32
%{_openmpi_load}
c9aab32
# Python 3
52613e7
export MPI_COMPILE_TYPE="-openmpi"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
export PYTHON_BIN="%{__python3}"
52613e7
%{do_install}
52613e7
%{do_pyinstall}
c9aab32
c9aab32
# Remove duplicated docs
c9aab32
rm -rf $RPM_BUILD_ROOT/%{_libdir}/openmpi/share/doc/%{name}
52613e7
# Correct doc location
52613e7
sed -i 's|NEST_DOC_DIR=$NEST_INSTALL_DIR/share/doc/nest|NEST_DOC_DIR=/usr/share/doc/nest/|' $RPM_BUILD_ROOT/$MPI_BIN/nest_vars.sh
c9aab32
# Remove duplicated scripts
c9aab32
rm -rf $RPM_BUILD_ROOT/%{_libdir}/openmpi/share/%{name}/{extras,help_generator}
c9aab32
b6af78e
# Rename binaries to add MPI suffix
b6af78e
pushd $RPM_BUILD_ROOT/$MPI_BIN/
b6af78e
    mv -v %{name}{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_vars{,$MPI_SUFFIX}.sh
b6af78e
    mv -v %{name}-config{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_serial{,$MPI_SUFFIX}
b6af78e
    mv -v %{name}_indirect{,$MPI_SUFFIX}
b6af78e
    mv -v sli{,$MPI_SUFFIX}
b6af78e
popd
c9aab32
%{_openmpi_unload}
c9aab32
%endif
c9aab32
c9aab32
224e11f
%if %{with tests}
c9aab32
%check
c9aab32
%global do_tests \
c9aab32
echo  \
c9aab32
echo "*** TESTING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***"  \
c9aab32
echo  \
c9aab32
source $RPM_BUILD_ROOT/$NEST_BINDIR/nest_vars.sh \
c9aab32
export NEST_DOC_DIR=$RPM_BUILD_ROOT/$NEST_DOC_DIR
c9aab32
export NEST_DATA_DIR=$RPM_BUILD_ROOT/$NEST_DATA_DIR
c9aab32
PATH=$RPM_BUILD_ROOT/$NEST_BINDIR/:$PATH $RPM_BUILD_ROOT/$NEST_DATA_DIR/extras/do_tests.sh --source-dir=SKIP \
c9aab32
nosetests $NEST_PYTHONDIR/nest/tests $NEST_PYTHONDIR/nest/topology/tests
c9aab32
c9aab32
# No sli suite here, since we didn't build it for py3
c9aab32
%global do_tests_3 \
c9aab32
echo  \
c9aab32
echo "*** TESTING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***"  \
c9aab32
echo  \
c9aab32
nosetests-3 $NEST_PYTHONDIR/nest/tests $NEST_PYTHONDIR/nest/topology/tests
c9aab32
c9aab32
52613e7
export MPI_COMPILE_TYPE=""
c9aab32
export NEST_BINDIR="%{_bindir}"
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
export NEST_PYTHONDIR=%{python3_sitearch}
c9aab32
%{do_tests_3}
c9aab32
52613e7
# Test mpich version
224e11f
%if %{with mpich}
c9aab32
%{_mpich_load}
52613e7
export MPI_COMPILE_TYPE="-mpich"
c9aab32
export NEST_BINDIR=$MPI_BIN
c9aab32
export NEST_PYTHONDIR=$MPI_PYTHON3_SITEARCH
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
%{do_tests_3}
c9aab32
c9aab32
%{_mpich_unload}
c9aab32
%endif
c9aab32
52613e7
# Test OpenMPI version
224e11f
%if %{with openmpi}
c9aab32
%{_openmpi_load}
52613e7
export MPI_COMPILE_TYPE="-openmpi"
c9aab32
export PYTHON_VERSION="3"
c9aab32
export PYTHON_BIN="%{__python3}"
c9aab32
export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
c9aab32
%{do_tests_3}
c9aab32
c9aab32
%{_openmpi_unload}
c9aab32
%endif
c9aab32
%endif
c9aab32
c9aab32
%files
c9aab32
%license LICENSE
52613e7
%doc README-Fedora.md
c9aab32
%{_bindir}/%{name}
c9aab32
%{_bindir}/sli
c9aab32
%{_bindir}/%{name}_vars.sh
c9aab32
%{_bindir}/%{name}-config
c9aab32
%{_bindir}/%{name}_serial
c9aab32
%{_bindir}/%{name}_indirect
b6af78e
%{_libdir}/libconngen.so
b6af78e
%{_libdir}/libmodels.so
b6af78e
%{_libdir}/libnest.so
b6af78e
%{_libdir}/libnestkernel.so
b6af78e
%{_libdir}/libnestutil.so
b6af78e
%{_libdir}/libprecise.so
b6af78e
%{_libdir}/librandom.so
b6af78e
%{_libdir}/libsli.so
b6af78e
%{_libdir}/libsli_readline.so
b6af78e
%{_libdir}/libtopology.so
c9aab32
c9aab32
%files common
c9aab32
%{_datadir}/%{name}
c9aab32
cb7e44a
%files headers
cb7e44a
%{_includedir}/%{name}
cb7e44a
c9aab32
%files doc
c9aab32
%doc %{_pkgdocdir}
c9aab32
c9aab32
%files -n python3-%{name}
c9aab32
%{python3_sitearch}/%{name}
f7cdfa1
%{python3_sitearch}/PyNEST-nest_%{version}-py%{python3_version}.egg-info
f7cdfa1
%{python3_sitearch}/Topology-nest_%{version}-py%{python3_version}.egg-info
c9aab32
%{python3_sitelib}/ConnPlotter
f7cdfa1
%{python3_sitelib}/ConnPlotter-0.7a-py%{python3_version}.egg-info
c9aab32
224e11f
%if %{with mpich}
c9aab32
%files mpich
c9aab32
%license LICENSE
52613e7
%doc README-Fedora.md
b6af78e
%{_libdir}/mpich/bin/%{name}_mpich
b6af78e
%{_libdir}/mpich/bin/%{name}_vars_mpich.sh
b6af78e
%{_libdir}/mpich/bin/%{name}-config_mpich
b6af78e
%{_libdir}/mpich/bin/%{name}_serial_mpich
b6af78e
%{_libdir}/mpich/bin/%{name}_indirect_mpich
b6af78e
%{_libdir}/mpich/bin/sli_mpich
b6af78e
%{_libdir}/mpich/lib/libconngen.so
b6af78e
%{_libdir}/mpich/lib/libmodels.so
b6af78e
%{_libdir}/mpich/lib/libnest.so
b6af78e
%{_libdir}/mpich/lib/libnestkernel.so
b6af78e
%{_libdir}/mpich/lib/libnestutil.so
b6af78e
%{_libdir}/mpich/lib/libprecise.so
b6af78e
%{_libdir}/mpich/lib/librandom.so
b6af78e
%{_libdir}/mpich/lib/libsli.so
b6af78e
%{_libdir}/mpich/lib/libsli_readline.so
b6af78e
%{_libdir}/mpich/lib/libtopology.so
c9aab32
c9aab32
%files mpich-common
c9aab32
%{_libdir}/mpich/share/%{name}
c9aab32
cb7e44a
%files mpich-headers
99131e2
%{_includedir}/mpich-%{_arch}/%{name}
cb7e44a
c9aab32
%files -n python3-%{name}-mpich
c9aab32
%license LICENSE
c9aab32
%{python3_sitearch}/mpich/%{name}
f7cdfa1
%{python3_sitearch}/mpich/PyNEST-nest_%{version}-py%{python3_version}.egg-info
f7cdfa1
%{python3_sitearch}/mpich/Topology-nest_%{version}-py%{python3_version}.egg-info
c9aab32
%endif
c9aab32
224e11f
%if %{with openmpi}
c9aab32
%files openmpi
c9aab32
%license LICENSE
52613e7
%doc README-Fedora.md
b6af78e
%{_libdir}/openmpi/bin/%{name}_openmpi
b6af78e
%{_libdir}/openmpi/bin/%{name}_vars_openmpi.sh
b6af78e
%{_libdir}/openmpi/bin/%{name}-config_openmpi
b6af78e
%{_libdir}/openmpi/bin/%{name}_serial_openmpi
b6af78e
%{_libdir}/openmpi/bin/%{name}_indirect_openmpi
b6af78e
%{_libdir}/openmpi/bin/sli_openmpi
b6af78e
%{_libdir}/openmpi/lib/libconngen.so
b6af78e
%{_libdir}/openmpi/lib/libmodels.so
b6af78e
%{_libdir}/openmpi/lib/libnest.so
b6af78e
%{_libdir}/openmpi/lib/libnestkernel.so
b6af78e
%{_libdir}/openmpi/lib/libnestutil.so
b6af78e
%{_libdir}/openmpi/lib/libprecise.so
b6af78e
%{_libdir}/openmpi/lib/librandom.so
b6af78e
%{_libdir}/openmpi/lib/libsli.so
b6af78e
%{_libdir}/openmpi/lib/libsli_readline.so
b6af78e
%{_libdir}/openmpi/lib/libtopology.so
b6af78e
c9aab32
c9aab32
%files openmpi-common
c9aab32
%{_libdir}/openmpi/share/%{name}
c9aab32
cb7e44a
%files openmpi-headers
99131e2
%{_includedir}/openmpi-%{_arch}/%{name}
cb7e44a
c9aab32
%files -n python3-%{name}-openmpi
c9aab32
%license LICENSE
c9aab32
%{python3_sitearch}/openmpi/%{name}
f7cdfa1
%{python3_sitearch}/openmpi/PyNEST-nest_%{version}-py%{python3_version}.egg-info
f7cdfa1
%{python3_sitearch}/openmpi/Topology-nest_%{version}-py%{python3_version}.egg-info
c9aab32
%endif
c9aab32
c9aab32
%changelog
5b4624a
* Mon Aug 10 2020 Jeff Law <law@redhat.com> - 2.20.0-5
5b4624a
- Disable LTO on armv7hl for now
5b4624a
38a2ed2
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.0-4
38a2ed2
- Second attempt - Rebuilt for
38a2ed2
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
38a2ed2
011e5f0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.0-3
011e5f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
011e5f0
5d4e26b
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.20.0-2
5d4e26b
- Rebuilt for Python 3.9
5d4e26b
72e9fb5
* Sat Feb 01 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.20.0-1
72e9fb5
- Update to 2.20.0
72e9fb5
95c8b23
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.0-8
95c8b23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
95c8b23
d1e0752
* Wed Oct 16 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-7
d1e0752
- Rebuild with MUSIC support
d1e0752
- MUSIC requires MPI support to be enabled
d1e0752
a435a06
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.18.0-6
a435a06
- Rebuilt for Python 3.8.0rc1 (#1748018)
a435a06
74cf4ef
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 2.18.0-5
74cf4ef
- Rebuilt for Python 3.8
74cf4ef
fc89b91
* Tue Aug 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.18.0-4
fc89b91
- Rebuilt for GSL 2.6.
fc89b91
494772d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.18.0-3
494772d
- Rebuilt for Python 3.8
494772d
630e5e0
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.0-2
630e5e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
630e5e0
ef85260
* Fri Jul 19 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-1
ef85260
- Update to 2.18
ef85260
- Re-enable 32bit arches
ef85260
- Update patch
ef85260
- Drop py2 support
ef85260
3f2d00a
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.16.0-11
3f2d00a
- Rebuild for readline 8.0
3f2d00a
4187ebc
* Thu Feb 14 2019 Orion Poplawski <orion@nwra.com>
4187ebc
- Rebuild for openmpi 3.1.3
4187ebc
e55743f
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.0-9
e55743f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e55743f
4eba69c
* Wed Jan 23 2019 Björn Esser <besser82@fedoraproject.org> - 2.16.0-8
4eba69c
- Append curdir to CMake invokation. (#1668512)
4eba69c
798ca49
* Sat Dec 29 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-7
798ca49
- Move matplotlib and ipython to weak deps
798ca49
99131e2
* Mon Dec 17 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-6
99131e2
- Correct location of MPI headers
99131e2
- Use CMAKE directives to specify lib location
99131e2
b6af78e
* Fri Dec 14 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-5
b6af78e
- Add required suffixes to MPI binaries
b6af78e
- Explicitly mention all shared objects
b6af78e
224e11f
* Sat Nov 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-4
224e11f
- Use bcond
224e11f
- Enable libneurosim support
224e11f
eb10d10
* Sun Oct 28 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-3
eb10d10
- Spec improvements
eb10d10
- Use release conditional for uniformity
eb10d10
- Create source directories in the build directory
eb10d10
52613e7
* Thu Oct 18 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-2
52613e7
- Make py3 default build
52613e7
- Disable py2 build
52613e7
- Use README file instead of creating it in the spec.
52613e7
- Correct NEST_DOC_DIR to point to correct doc files for all variants (#1639678)
52613e7
cb7e44a
* Fri Oct 05 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-1
cb7e44a
- Exclude 32 bit architectures: https://github.com/nest/nest-simulator/issues/1031
cb7e44a
- Use python version specific shebangs
539ebce
- Update to latest upstream release
cb7e44a
- Place headers in separate packages
539ebce
c9aab32
* Fri Jul 27 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-4
c9aab32
- Improve readme
c9aab32
- Disable tests for the time being while I check builds
c9aab32
c9aab32
* Thu Jul 26 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-3
c9aab32
- Enable tests
c9aab32
- Use autosetup
c9aab32
- Improve description
c9aab32
- Improve make usage
c9aab32
c9aab32
* Tue Jul 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-2
c9aab32
- Enable mpi builds
c9aab32
- Do not make mpi packages noarch, since MPI_HOME is arch dependent
c9aab32
- Do not remove nest config files---the environment variables are used by programs
c9aab32
c9aab32
* Sun Jun 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-1
c9aab32
- Update to latest release
c9aab32
- remove developer docs
c9aab32
- fix build
c9aab32
- improve commands
c9aab32
c9aab32
* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-22.git79b2f01
c9aab32
- Update to latest commit - test tammioppen changes
c9aab32
c9aab32
* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-21.git58fcecb
c9aab32
- Update to latest commit