Notification time stamped 2021-12-31 10:49:58 UTC
From 5e3dbe34108c79ace30c51b3d1b49e1d9432caa5 Mon Sep 17 00:00:00 2001
From: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Dec 31 2021 10:49:39 +0000
Subject: feat: update to 0.10.0
---
diff --git a/.gitignore b/.gitignore
index 0fc777d..d5c8c3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/PyNN-0.9.6.tar.gz
+/PyNN-0.10.0.tar.gz
diff --git a/0001-Disable-nest-extension-build-by-setup.patch
b/0001-Disable-nest-extension-build-by-setup.patch
index d77aa19..ec59a3b 100644
--- a/0001-Disable-nest-extension-build-by-setup.patch
+++ b/0001-Disable-nest-extension-build-by-setup.patch
@@ -1,26 +1,22 @@
-From 5c4d2751b7696569e1ac6688d1610ef6755046f7 Mon Sep 17 00:00:00 2001
+From 1f381ba3cf7c75f315459af5757293c2ffb1b1a2 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Sat, 9 Jan 2021 19:09:03 +0000
-Subject: [PATCH 1/3] Disable nest extension build by setup
+Date: Wed, 29 Dec 2021 09:53:14 +0000
+Subject: [PATCH 1/2] Disable nest extension build by setup
---
setup.py | 73 --------------------------------------------------------
1 file changed, 73 deletions(-)
diff --git a/setup.py b/setup.py
-index 46ba7d9c..90e1f848 100644
+index 3c12f649..be670f15 100644
--- a/setup.py
+++ b/setup.py
-@@ -2,7 +2,6 @@
+@@ -2,81 +2,9 @@
try:
from setuptools import setup
- from setuptools.command.build_py import build_py as _build
- from setuptools import version
- if version.__version__ > '20.5':
- tests_req = ['mpi4py',
'scipy;python_version>="3.4"',
-@@ -12,77 +11,6 @@ try:
- tests_req = ['mpi4py', 'Cheetah3']
+ tests_req = ["mpi4py", "scipy", "matplotlib",
"Cheetah3", "h5py"]
except ImportError:
from distutils.core import setup
- from distutils.command.build_py import build_py as _build
@@ -34,9 +30,8 @@ index 46ba7d9c..90e1f848 100644
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
- universal_newlines=True,
- cwd=working_directory)
-- result = p.wait()
-- stdout = p.stdout.readlines()
-- return result, stdout
+- stdout, stderr = p.communicate()
+- return p.returncode, stdout.split("\n")
-
-
-class build(_build):
@@ -77,7 +72,8 @@ index 46ba7d9c..90e1f848 100644
- print("Unable to compile NEST extensions. Output was:")
- print(' '.join([''] + stdout))
- else:
-- result, stdout = run_command("make install",
nest_build_dir) # should really move this to install stage
+- # should really move this to install stage
+- result, stdout = run_command("make install",
nest_build_dir)
- if result != 0:
- print("Unable to install NEST extensions. Output
was:")
- print(' '.join([''] + stdout))
@@ -97,14 +93,14 @@ index 46ba7d9c..90e1f848 100644
setup(
-@@ -121,7 +49,6 @@ setup(
- 'Programming Language :: Python :: 3.7',
+@@ -113,7 +41,6 @@ setup(
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering'],
- cmdclass={'build_py': build},
- install_requires=['numpy>=1.13.0', 'lazyarray>=0.3.4',
'neo>=0.8.0',
+ install_requires=['numpy>=1.16.1', 'lazyarray>=0.5.0',
'neo>=0.10.0',
'quantities>=0.12.1'],
extras_require={
--
-2.29.2
+2.33.1
diff --git a/0002-Remove-nest-ext-doc-generation.patch
b/0002-Remove-nest-ext-doc-generation.patch
deleted file mode 100644
index 5c81c1f..0000000
--- a/0002-Remove-nest-ext-doc-generation.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 98a8fa2e7ab7cad00daf41c77835ae1cfd07e5d7 Mon Sep 17 00:00:00 2001
-From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Sat, 9 Jan 2021 23:28:54 +0000
-Subject: [PATCH 2/3] Remove nest ext doc generation
-
----
- pyNN/nest/extensions/CMakeLists.txt | 13 -------------
- 1 file changed, 13 deletions(-)
-
-diff --git a/pyNN/nest/extensions/CMakeLists.txt b/pyNN/nest/extensions/CMakeLists.txt
-index b31f47b1..e7c0a507 100644
---- a/pyNN/nest/extensions/CMakeLists.txt
-+++ b/pyNN/nest/extensions/CMakeLists.txt
-@@ -247,19 +247,6 @@ install( TARGETS ${MODULE_NAME}_lib DESTINATION
${CMAKE_INSTALL_LIBDIR} )
- install( FILES ${MODULE_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
- install( DIRECTORY sli DESTINATION ${CMAKE_INSTALL_DATADIR} )
-
--# Install help.
--set( HELPDIRS "${PROJECT_SOURCE_DIR}:${PROJECT_SOURCE_DIR}/sli" )
--install( CODE
-- "execute_process(COMMAND ${CMAKE_COMMAND}
-- -DDOC_DIR='${CMAKE_INSTALL_FULL_DOCDIR}'
-- -DDATA_DIR='${CMAKE_INSTALL_FULL_DATADIR}'
-- -DHELPDIRS='${HELPDIRS}'
-- -DINSTALL_DIR='${CMAKE_INSTALL_PREFIX}'
-- -P ${CMAKE_INSTALL_FULL_DOCDIR}/generate_help.cmake
-- WORKING_DIRECTORY \"${PROJECT_BINARY_DIR}\"
-- )"
-- )
--
- message( "" )
- message( "-------------------------------------------------------" )
- message( "${MODULE_NAME} Configuration Summary" )
---
-2.29.2
-
diff --git a/0002-fix-correct-sized-import.patch b/0002-fix-correct-sized-import.patch
new file mode 100644
index 0000000..6162ee6
--- /dev/null
+++ b/0002-fix-correct-sized-import.patch
@@ -0,0 +1,42 @@
+From a577b00c49691ed9549e9d20a95583ea2231b89e Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Wed, 29 Dec 2021 19:15:55 +0000
+Subject: [PATCH 2/2] fix: correct sized import
+
+---
+ pyNN/parameters.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/pyNN/parameters.py b/pyNN/parameters.py
+index a7d06b11..627cd439 100644
+--- a/pyNN/parameters.py
++++ b/pyNN/parameters.py
+@@ -6,7 +6,10 @@ Parameter set handling
+ """
+
+ import numpy as np
+-import collections
++try:
++ from collections import Sized
++except ImportError:
++ from collections.abc import Sized
+ from pyNN.core import is_listlike
+ from pyNN import errors
+ from pyNN.random import RandomDistribution, NativeRNG
+@@ -296,11 +299,11 @@ class ParameterSpace(object):
+ raise errors.NonExistentParameterError(name,
+ model_name,
+
valid_parameter_names=self.schema.keys())
+- if issubclass(expected_dtype, ArrayParameter) and isinstance(value,
collections.Sized):
++ if issubclass(expected_dtype, ArrayParameter) and isinstance(value,
Sized):
+ if len(value) == 0:
+ value = ArrayParameter([])
+ elif not isinstance(value[0], ArrayParameter): # may be a more
generic way to do it, but for now this special-casing seems like the most robust approach
+- if isinstance(value[0], collections.Sized): # e.g. list of
tuples
++ if isinstance(value[0], Sized): # e.g. list of tuples
+ value = type(value)([ArrayParameter(x) for x in value])
+ else:
+ value = ArrayParameter(value)
+--
+2.33.1
+
diff --git a/0003-Use-correct-comparison-operator.patch
b/0003-Use-correct-comparison-operator.patch
deleted file mode 100644
index 161045d..0000000
--- a/0003-Use-correct-comparison-operator.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From fbe7f1d5dd80b2ed1dbe3a8314fea5baca62b905 Mon Sep 17 00:00:00 2001
-From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Tue, 9 Feb 2021 10:21:04 +0000
-Subject: [PATCH 3/3] Use correct comparison operator
-
----
- pyNN/recording/__init__.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pyNN/recording/__init__.py b/pyNN/recording/__init__.py
-index d00b5523..a4fb2dd7 100644
---- a/pyNN/recording/__init__.py
-+++ b/pyNN/recording/__init__.py
-@@ -259,7 +259,7 @@ class Recorder(object):
- description=self.population.describe(),
- rec_datetime=datetime.now()) # would be nice to get the
time at the start of the recording, not the end
- variables_to_include = set(self.recorded.keys())
-- if variables is not 'all':
-+ if variables != 'all':
- variables_to_include = variables_to_include.intersection(set(variables))
- for variable in variables_to_include:
- if variable == 'spikes':
---
-2.29.2
-
diff --git a/python-pynn.spec b/python-pynn.spec
index bfddfbf..dac8380 100644
--- a/python-pynn.spec
+++ b/python-pynn.spec
@@ -3,9 +3,9 @@
# Tests
#
https://github.com/NeuralEnsemble/PyNN/blob/master/ci/test_script.sh
-# Use nose, so disabled by default, but tested locally with --with-tests
+# Use nose, so disabled by default, but tested locally with --with-nosetests
# Issue filed upstream:
https://github.com/NeuralEnsemble/PyNN/issues/705
-%bcond_with tests
+%bcond_with nosetests
# Issue filed about warnings while compiling NEURON mod files:
#
https://github.com/NeuralEnsemble/PyNN/issues/707
@@ -43,7 +43,7 @@ Mailing list:
https://groups.google.com/forum/?fromgroups#!forum/neuralensemble
This package supports the NEURON, NEST, and Brian simulators.}
Name: python-pynn
-Version: 0.9.6
+Version: 0.10.0
Release: %autorelease
Summary: A package for simulator-independent specification of neuronal network
models
@@ -59,26 +59,22 @@ ExcludeArch: mips64r2 mips32r2
# Disable pynn's way of building extensions
# We do it ourselves
Patch0: 0001-Disable-nest-extension-build-by-setup.patch
-# outdated: does not work any more
-Patch1: 0002-Remove-nest-ext-doc-generation.patch
-# Use correct operator
-# Sent upstream:
https://github.com/NeuralEnsemble/PyNN/pull/706
-Patch2: 0003-Use-correct-comparison-operator.patch
+# Merged upstream:
https://github.com/NeuralEnsemble/PyNN/pull/744
+Patch1: 0002-fix-correct-sized-import.patch
-# For NEST extensions
+# For extensions
+BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: git-core
BuildRequires: gsl-devel
BuildRequires: libneurosim-devel
BuildRequires: ncurses-devel
-BuildRequires: nest
-BuildRequires: nest-headers
+BuildRequires: nest-devel >= 3.0
BuildRequires: neuron-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: readline-devel
-%if %{with tests}
BuildRequires: python3-brian2
BuildRequires: python3-cheetah
BuildRequires: %{py3_dist h5py}
@@ -89,13 +85,15 @@ BuildRequires: %{py3_dist neo}
BuildRequires: %{py3_dist nose}
BuildRequires: %{py3_dist nose-testconfig}
BuildRequires: %{py3_dist numpy}
-BuildRequires: python3-nest
+BuildRequires: python3-nest >= 3.0
+BuildRequires: nest >= 3.0
BuildRequires: python3-neuron
BuildRequires: %{py3_dist quantities}
%if %{with mpich}
BuildRequires: python3-mpi4py-mpich
-BuildRequires: python3-nest-mpich
+BuildRequires: python3-nest-mpich >= 3.0
+BuildRequires: nest-mpich >= 3.0
BuildRequires: python3-neuron-mpich
BuildRequires: rpm-mpi-hooks
BuildRequires: mpich
@@ -104,13 +102,14 @@ BuildRequires: mpich-devel
%if %{with openmpi}
BuildRequires: python3-mpi4py-openmpi
-BuildRequires: python3-nest-openmpi
+BuildRequires: python3-nest-openmpi >= 3.0
+BuildRequires: nest-openmpi >= 3.0
BuildRequires: python3-neuron-openmpi
BuildRequires: rpm-mpi-hooks
BuildRequires: openmpi
BuildRequires: openmpi-devel
%endif
-%endif
+
%{?python_enable_dependency_generator}
@@ -179,18 +178,42 @@ mv
$RPM_BUILD_ROOT/%{python3_sitelib}/PyNN-%{version}-py%{python3_version}.egg-i
rm -rf $RPM_BUILD_ROOT/%{python3_sitearch}/pyNN/nest/extensions
%check
-%if %{with tests}
+%py3_check_import pyNN pyNN.nest pyNN.neuron pyNN.brian2
+
+%if %{with nosetests}
+pushd test
+export
PYTHONPATH=$PYTHONPATH:$RPM_BUILD_ROOT/%{python3_sitearch}:$RPM_BUILD_ROOT/%{python3_sitelib}
+nosetests-%{python3_version} -e backends --verbosity=3 --tests=unittests
+unset PYTHONPATH
+popd
+%endif
+
%if %{with mpich}
%{_mpich_load}
-%{__python3} setup.py nosetests -e backends -v --tests=test/unittests
+export
PYTHONPATH=$PYTHONPATH:$RPM_BUILD_ROOT/%{python3_sitearch}:$RPM_BUILD_ROOT/%{python3_sitelib}:$RPM_BUILD_ROOT/$MPI_PYTHON3_SITEARCH:$MPI_PYTHON3_SITEARCH
+%py3_check_import pyNN pyNN.nest pyNN.neuron pyNN.brian2
+
+%if %{with nosetests}
+pushd test
+nosetests-%{python3_version} -e backends --verbosity=3 --tests=unittests
+popd
%{_mpich_unload}
%endif
+unset PYTHONPATH
+%endif
%if %{with openmpi}
%{_openmpi_load}
-%{__python3} setup.py nosetests -e backends -v --tests=test/unittests
+export
PYTHONPATH=$PYTHONPATH:$RPM_BUILD_ROOT/%{python3_sitearch}:$RPM_BUILD_ROOT/%{python3_sitelib}:$RPM_BUILD_ROOT/$MPI_PYTHON3_SITEARCH:$MPI_PYTHON3_SITEARCH
+%py3_check_import pyNN pyNN.nest pyNN.neuron pyNN.brian2
+
+%if %{with nosetests}
+pushd test
+nosetests-%{python3_version} -e backends --verbosity=3 --tests=unittests
+popd
%{_openmpi_unload}
%endif
+unset PYTHONPATH
%endif
# These files are NEURON files that are required by PyNN to run bits using the NEURON
backend
diff --git a/sources b/sources
index 050d1cc..8d8253a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (PyNN-0.9.6.tar.gz) =
0c937ac4b057a3df9b771cffe8c9def5d5a5856f3f522301ff7a7b372b45bfb34fa4f4f140fdec0524bdbf376a6766437a7f0305b3b21f4785eb37cb3dbf6925
+SHA512 (PyNN-0.10.0.tar.gz) =
c59097fb032efc0d2d612774cc7d9bea55ff616705f12dad99171a70f1670aa3d471ba2d332ac1191163520f0657d22665eba071e5992fe4821b63f73bf28e8c
https://src.fedoraproject.org/rpms/python-pynn/c/5e3dbe34108c79ace30c51b3...