summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-01-02 22:43:02 +0000
committerRutherther <rutherther@ditigal.xyz>2026-01-25 21:20:59 +0100
commit8cd522db2b3e2b95b1397d0e398b8615158eab9c (patch)
tree4f2c30fc58c22a84c39ae054f55140607355c176 /gnu
parent64714dcd176dc73bca85bb218be8f6c178fc4ac2 (diff)
gnu: python-brian2: Update to 2.10.1.
* gnu/packages/machine-learning.scm (python-brian2): Update to 2.10.1. [arguments] <test-flags>: Run portion of tests. <phases>: Use default 'check; add 'relax-requirements. [propagated-inputs]: Remove python-py-cpuinfo; add python-packaging. [native-inputs]: Remove python-wheel; add python-pytest-timeout and python-setuptools-scm. Fixes: guix/guix#2568 Change-Id: Iad4d1bc211069fccbec7eb9b0082bf2ea73c8e41 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm56
1 files changed, 34 insertions, 22 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index eba573fe35e..1b3d0a8aa67 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -6428,37 +6428,49 @@ fi"
(define-public python-brian2
(package
(name "python-brian2")
- (version "2.5.1")
+ (version "2.10.1")
(source (origin
(method url-fetch)
- (uri (pypi-uri "Brian2" version))
+ (uri (pypi-uri "brian2" version))
(sha256
(base32
- "1g48hzn3cdsvfjgz64s3kvh5d5287ggjxdyacb7wh2n5nd5iqlf7"))))
+ "0kqvw716q26liifjds807nxz17xbzrqwhvyp34j3d4i115xivln1"))))
(build-system pyproject-build-system)
(arguments
(list
+ ;; tests: 104 passed, 2 skipped, 16 warnings
+ #:test-flags
+ ;; Tests hang during collection with higher number of threads.
+ #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+ ;; XXX: The complete test suite is massive, run a simple test
+ ;; that uses the main simulation elements and force code
+ ;; generation to use Cython.
+ "tests/test_synapses.py")
#:phases
#~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (setenv "HOME" "/tmp")
- ;; Must be run in a different directory, otherwise compiled
- ;; modules are not found.
- (with-directory-excursion "/tmp"
- ;; Invoking brian2.test() is preferred to running pytest.
- (invoke "python" "-c"
- "import brian2, sys; sys.exit(0 if brian2.test() else 1)"))))))))
- (propagated-inputs (list python-cython ; Required by codegen.
- python-jinja2
- python-numpy
- python-py-cpuinfo
- python-pyparsing
- ;; Required by codegen.
- python-setuptools
- python-sympy))
- (native-inputs (list python-pytest python-pytest-xdist python-wheel))
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "pyproject.toml"
+ ;; 'cython>=0.29.21,<3.1.4',
+ ((">=0.29.21,<3.1.4") ""))))
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "HOME" "/tmp")
+ (copy-recursively "brian2/tests" "tests")
+ (delete-file-recursively "brian2"))))))
+ (native-inputs
+ (list python-pytest
+ python-pytest-timeout
+ python-pytest-xdist
+ python-setuptools-scm))
+ (propagated-inputs
+ (list python-cython
+ python-jinja2
+ python-numpy
+ python-packaging
+ python-pyparsing
+ python-setuptools
+ python-sympy))
(home-page "https://briansimulator.org/")
(synopsis "Clock-driven simulator for spiking neural networks")
(description