summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Dewar2019-05-08 15:05:26 +0100
committerAlex Dewar2019-05-08 15:05:26 +0100
commit65119946b5f25ea660aa4b5d5eb2057268c45982 (patch)
treecf145b3ea8cbfc3c267f8919a4080c7097445b84
parent74b852f52a73b74bfc75cdbd2e05dfa2a8f51739 (diff)
downloadaur-65119946b5f25ea660aa4b5d5eb2057268c45982.tar.gz
Add pygenn
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD40
2 files changed, 39 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1816ef9173b4..dc6f49bc3aab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,16 @@
pkgbase = genn_cpu_only
- pkgdesc = GeNN: GPU-enhanced neural networks (version 4, without CUDA support)
+ pkgdesc = GeNN: GPU-enhanced neural networks (version 4; without CUDA backend)
pkgver = 4.0.0_RC1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/genn-team/genn
arch = x86_64
license = GPL
makedepends = doxygen
+ makedepends = python
+ makedepends = python-numpy
+ makedepends = swig
+ optdepends = python: for pygenn
+ optdepends = python-numpy: for pygenn
provides = genn
conflicts = genn
options = staticlibs
diff --git a/PKGBUILD b/PKGBUILD
index fbfe0b2d529c..161b82a027e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,60 @@
# Maintainer: Alex Dewar <a.dewar@sussex.ac.uk>
pkgname=genn_cpu_only
pkgver=4.0.0_RC1
-pkgrel=1
-pkgdesc="GeNN: GPU-enhanced neural networks (version 4, without CUDA support)"
+pkgrel=2
+pkgdesc="GeNN: GPU-enhanced neural networks (version 4; without CUDA backend)"
arch=(x86_64)
url="https://github.com/genn-team/genn"
license=('GPL')
-makedepends=(doxygen)
+makedepends=(doxygen python python-numpy swig)
+optdepends=("python: for pygenn" "python-numpy: for pygenn")
+options=(staticlibs !emptydirs)
provides=(genn)
conflicts=(genn)
-options=(staticlibs !emptydirs)
source=("$url/archive/${pkgver//_/-}.tar.gz")
sha256sums=('b94c0b8c05d8525987f9d4279478dd41f68e8d9824cb5344adb5fbe257b38e99')
+# Make sure we aren't building with CUDA support
+export CUDA_PATH=
+
+prepare() {
+ cd genn-${pkgver//_/-}
+
+ # Set output dir
+ sed -i "s|/usr/local|$pkgdir/usr|" Makefile
+
+ # Delete tmp files
+ find . -name '*~' -delete
+}
+
build() {
cd genn-${pkgver//_/-}
# Generate documentation with doxygen
- ./makedoc
+ msg2 "Generating documentation"
+ ./makedoc > /dev/null
# Build libgenn.a etc.
- sed -i 's|/usr/local|'$pkgdir'/usr|' Makefile
- CPU_ONLY=1 CUDA_PATH= make
+ make
+
+ # Build pygenn
+ make DYNAMIC=1 LIBRARY_DIRECTORY=`pwd`/pygenn/genn_wrapper/
+ python setup.py build
}
package() {
cd genn-${pkgver//_/-}
# Install libs and headers
- CPU_ONLY=1 CUDA_PATH= PREFIX="$pkgdir"/usr/ make install
+ PREFIX="$pkgdir"/usr/ make install
# Install documentation
mkdir -p "$pkgdir"/usr/share/genn/documentation
cp -rf documentation/html/* "$pkgdir"/usr/share/genn/documentation
+
+ # Copy userproject folder
+ cp -R userproject "$pkgdir"/usr/src/genn
+
+ # Install pygenn
+ python setup.py install --prefix=/usr --root="$pkgdir"
}