## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 %bcond_without tests # Do not build docs, bundle JS etc. # Point to upstream docs instead %global desc %{expand: \ Brian2 is a simulator for spiking neural networks available on almost all platforms. The motivation for this project is that a simulator should not only save the time of processors, but also the time of scientists. It is the successor of Brian1 and shares its approach of being highly flexible and easily extensible. It is based on a code generation framework that allows to execute simulations using other programming languages and/or on different devices. Please report issues to the github issue tracker (https://github.com/brian-team/brian2/issues) or to the brian support mailing list (http://groups.google.com/group/briansupport/) Documentation for Brian2 can be found at http://brian2.readthedocs.org} Name: python-brian2 Version: 2.5.4 Release: %autorelease Summary: A clock-driven simulator for spiking neural networks License: CECILL-2.0 URL: https://briansimulator.org Source0: %pypi_source Brian2 # update pyproject to discover all packages, otherwise it only includes the top # level brian2 package # https://github.com/brian-team/brian2/pull/1492 Patch: pyproject.patch BuildRequires: gcc-c++ gcc BuildRequires: gsl-devel %description %{desc} %package -n python3-brian2 Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm Suggests: %{py3_dist ipython} %py_provides python3-brian2 %description -n python3-brian2 %{desc} %package doc Summary: %{summary} BuildArch: noarch %description doc Documentation and examples for %{name}. %prep %autosetup -n Brian2-%{version} sed -i -e '/oldest-supported-numpy/ d' \ pyproject.toml # Remove unnecessary files find . -name ".gitignore" -print -delete rm -rvf Brian2.egg-info rm -f brian2/synapses/cythonspikequeue.cpp # Correct shebang for examples find examples -name "*.py" -print -exec sed -i 's|^#!/usr/bin/env python|#!/usr/bin/python3|' '{}' \; %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires -r %{?with_tests:-x test} %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_install %pyproject_save_files -l "brian2*" %check %pyproject_check_import -e brian2.hears -t %if %{with tests} export PYTHONDONTWRITEBYTECODE=1 # https://github.com/brian-team/brian2/blob/master/dev/continuous-integration/run_test_suite.py # https://brian2.readthedocs.io/en/stable/developer/guidelines/testing.html # prevent direct import pushd ../ PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitearch}/ %{python3} -c 'import brian2; brian2.test(test_openmp=True, test_GSL=True, test_codegen_independent=True, test_in_parallel=["codegen_independent", "numpy", "cpp_standalone"])' popd %endif # remove pytest_cache rm -rf $RPM_BUILD_ROOT/%{python3_sitearch}/brian2/{tests,}/.pytest_cache/ %files -n python3-brian2 -f %{pyproject_files} %doc README.rst %files doc %license LICENSE %doc examples %changelog * Tue Jan 02 2024 Benjamin A. Beasley - 2.5.4-3 - Assert that the .dist-info directory contains a license file * Mon Nov 06 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.5.4-1 - feat: update to 2.5.4 (fixes rh#2216804) * Sun Nov 05 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.5.1-5 - chore: add packit * Fri Jul 21 2023 Fedora Release Engineering - 2.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jun 30 2023 Python Maint - 2.5.1-3 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jan 12 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.5.1-1 - feat: update to 2.5.1 (fixes rhbz#2100481) * Fri Jul 22 2022 Fedora Release Engineering - 2.5.0.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek - 2.5.0.3-4 - Rebuilt for pyparsing-3.0.9 * Fri Jun 17 2022 Python Maint - 2.5.0.3-3 - Rebuilt for Python 3.11 * Wed Mar 02 2022 Ankur Sinha (Ankur Sinha Gmail) - 2.5.0.3-2 - chore: update pytest cache removal command for pytest 7 (fixes #rhbz2059948) * Sat Feb 19 2022 Ankur Sinha (Ankur Sinha Gmail) - 2.5.0.3-1 - feat: update to 2.5.0.3 (fixes rhbz#2038870) * Fri Jan 21 2022 Fedora Release Engineering - 2.5.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 04 2022 Ankur Sinha (Ankur Sinha Gmail) - 2.5.0.1-1 - feat: update to 2.5.0.1 * Fri Jul 23 2021 Fedora Release Engineering - 2.4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.4.2-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 2.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Nov 28 2020 Ankur Sinha - 2.4.2-1 - Update to 2.4.2 * Tue Sep 29 2020 Ankur Sinha - 2.4.1-1 - Update to 2.4.1 * Fri Sep 04 2020 Ankur Sinha - 2.4-1 - Update to 2.4 * Wed Jul 29 2020 Fedora Release Engineering - 2.3.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 2.3.0.2-2 - Rebuilt for Python 3.9 * Tue Apr 07 2020 Ankur Sinha - 2.3.0.2-1 - Update to latest release * Sat Apr 04 2020 Ankur Sinha - 2.3.0.1-1 - Update to latest upstream release * Sat Feb 01 2020 Ankur Sinha - 2.3-1 - Update to latest release * Thu Jan 30 2020 Fedora Release Engineering - 2.2.2.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 2.2.2.1-4 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 2.2.2.1-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 2.2.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Wed Apr 10 2019 Ankur Sinha - 2.2.2.1-1 - Update to latest upstream release - Remove AUTHORS, tutorials that are no longer included in tar * Sat Feb 02 2019 Fedora Release Engineering - 2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Nov 10 2018 Ankur Sinha - 2.2-1 - Initial build