blob: 582b07712565dc23e5ee82e258729140e2cac86a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
# Maintainer: mcgyver <newsletter.sergio@gmail.com>
pkgbase=python-spynnaker-git
pkgname=('python-spynnaker-git')
pkgver=1
pkgrel=1
pkgdesc="Spinnaker implementation of PyNN"
arch=('any')
url="https://pypi.org/project/sPyNNaker/#files"
license=('GPL')
makedepends=('python' 'python-setuptools' 'git')
depends=('python' 'python-lazyarray' 'python-neo' 'python-quantities' 'python-lxml' 'python-jsonschema' 'python-future' 'python-sortedcontainers' 'python-sortedcollections' 'python-requests' 'python-numpy' 'python-scipy' 'python-matplotlib')
source=(
"spalloc::git+https://github.com/SpiNNakerManchester/spalloc.git"
"SpiNNaker_DataSpecification::git+https://github.com/SpiNNakerManchester/DataSpecification.git"
"SpiNNaker_PACMAN::git+https://github.com/SpiNNakerManchester/PACMAN.git"
"SpiNNMachine::git+https://github.com/SpiNNakerManchester/SpiNNMachine.git"
"SpiNNMan::git+https://github.com/SpiNNakerManchester/SpiNNMan.git"
"SpiNNUtilities::git+https://github.com/SpiNNakerManchester/SpiNNUtils.git"
"sPyNNaker::git+https://github.com/SpiNNakerManchester/sPyNNaker.git"
"SpiNNFrontEndCommon::git+https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git"
"spinn_common::git+https://github.com/SpiNNakerManchester/spinn_common.git"
"spinnaker_tools::git+https://github.com/SpiNNakerManchester/spinnaker_tools.git"
"SpiNNakerGraphFrontEnd::git+https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git"
"https://files.pythonhosted.org/packages/source/P/PyNN/PyNN-0.9.5.tar.gz"
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'91af2126b639a6a795bfc2709ac49423278c4794b6d0da143908b9afcb415f80')
pkgver() {
printf "%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s.%s" $(git -C sPyNNaker rev-list --count HEAD) $(git -C sPyNNaker rev-parse --short HEAD) $(git -C SpiNNFrontEndCommon rev-list --count HEAD) $(git -C SpiNNFrontEndCommon rev-parse --short HEAD) $(git -C spinn_common rev-list --count HEAD) $(git -C spinn_common rev-parse --short HEAD) $(git -C spinnaker_tools rev-list --count HEAD) $(git -C spinnaker_tools rev-parse --short HEAD) $(git -C SpiNNakerGraphFrontEnd rev-list --count HEAD) $(git -C SpiNNakerGraphFrontEnd rev-parse --short HEAD) $(git -C spalloc rev-list --count HEAD) $(git -C spalloc rev-parse --short HEAD) $(git -C SpiNNaker_DataSpecification rev-list --count HEAD) $(git -C SpiNNaker_DataSpecification rev-parse --short HEAD) $(git -C SpiNNaker_PACMAN rev-list --count HEAD) $(git -C SpiNNaker_PACMAN rev-parse --short HEAD) $(git -C SpiNNMachine rev-list --count HEAD) $(git -C SpiNNMachine rev-parse --short HEAD) $(git -C SpiNNMan rev-list --count HEAD) $(git -C SpiNNMan rev-parse --short HEAD) $(git -C SpiNNUtilities rev-list --count HEAD) $(git -C SpiNNUtilities rev-parse --short HEAD)
}
prepare()
{
# cd "${srcdir}/SpiNNFrontEndCommon/c_common/front_end_common_lib/"
# sed -i "s/python/python2/" Makefile
# sed -i "s/python/python2/" local.mk
cd "${srcdir}/spinnaker_tools"
sed -i "s/==/=/" setup
sed -i "s/^SPINN_DIRS.*/\ \ &/" setup
sed -i '/\ \ SPINN_DIRS/ i SHELL=\`readlink /proc/\$\$/exe | xargs basename\`' setup
sed -i '/\ \ SPINN_DIRS/ i \ ' setup
sed -i '/\ \ SPINN_DIRS/ i if [ \"$SHELL\" = \"zsh\" ]; then' setup
sed -i '/\ \ SPINN_DIRS/ i \ \ SPINN_DIRS=\`cd \"\$(dirname \"\${(%):-\%N}\")\";pwd -P\`' setup
sed -i '/\ \ SPINN_DIRS.*BASH_SOURCE.*/ i else' setup
sed -i '/\ \ SPINN_DIRS.*BASH_SOURCE.*/ a fi' setup
source $PWD/setup
make clean
make || exit $?
cd ..
cd spinn_common
make clean
make install-clean
make || exit $?
make install
cd ..
cd SpiNNFrontEndCommon/c_common/
cd front_end_common_lib/
make install-clean
cd ..
make clean
PYTHONPATH="${srcdir}/SpiNNUtilities/" make || exit $?
make install
cd ../..
cd sPyNNaker/neural_modelling/
source $PWD/setup.bash
make clean
PYTHONPATH="${srcdir}/SpiNNUtilities/" make || exit $?
cd ../../SpiNNakerGraphFrontEnd/gfe_examples/
make clean
PYTHONPATH="${srcdir}/SpiNNUtilities/" make || exit $?
cd ../../SpiNNakerGraphFrontEnd/gfe_integration_tests/
make clean
PYTHONPATH="${srcdir}/SpiNNUtilities/" make || exit $?
echo "Neural model compilation completed"
}
#package_python2-spynnaker-git() {
# cd "${srcdir}/spalloc"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNaker_DataSpecification"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNaker_PACMAN"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNMachine"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNMan"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNUtilities"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNFrontEndCommon"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/SpiNNakerGraphFrontEnd"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/${_name}"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/PyNN-0.9.5"
# python2 setup.py install --root="${pkgdir}"
#
# cd "${srcdir}/spynnaker8"
# python2 setup.py install --root="${pkgdir}"
#
#
# python2sitepackagesdir=`python2 -c "import site; print(site.getsitepackages()[0])"`
#
# echo -n "directory to install python2 packages: "
# echo ${python2sitepackagesdir}
#
# cd "${pkgdir}/${python2sitepackagesdir}"
# currentpath=`pwd`
# python2 -c "import sys; import os; sys.path.insert(0,os.getcwd()); import spynnaker8.setup_pynn"
#
## if [ -d "${pkgdir}/${python2sitepackagesdir}/pyNN/nest/_build/" ]; then
## cd "${pkgdir}/${python2sitepackagesdir}/pyNN/nest/_build/"
## mv pynn_extensions.so "${pkgdir}/usr/lib"
## mv libpynn_extensions.so "${pkgdir}/usr/lib"
## fi
#
# cd "${pkgdir}/usr/bin"
# mv get_cores_in_run_state get_cores_in_run_state2
# mv spalloc spalloc2
# mv spalloc-job spalloc-job2
# mv spalloc-machine spalloc-machine2
# mv spalloc-ps spalloc-ps2
# mv spalloc-where-is spalloc-where-is2
#}
package_python-spynnaker-git() {
cd "${srcdir}/spalloc"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNaker_DataSpecification"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNaker_PACMAN"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNMachine"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNMan"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNUtilities"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNFrontEndCommon"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/SpiNNakerGraphFrontEnd"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/sPyNNaker"
python setup.py install --root="${pkgdir}"
cd "${srcdir}/PyNN-0.9.5"
python setup.py install --root="${pkgdir}"
python3sitepackagesdir=`python -c "import site; print(site.getsitepackages()[0])"`
echo -n "directory to install python3 packages: "
echo ${python3sitepackagesdir}
# if [ -d "${pkgdir}/${python3sitepackagesdir}/pyNN/nest/_build/" ]; then
# cd "${pkgdir}/${python3sitepackagesdir}/pyNN/nest/_build/"
# rm pynn_extensions.so
# rm libpynn_extensions.so
# fi
}
|