From c626eb560c5e96d56509b855e1870ddecfe6af23 Mon Sep 17 00:00:00 2001
From: Donald Buczek <buczek@molgen.mpg.de>
Date: Fri, 16 Feb 2018 09:55:51 +0100
Subject: [PATCH] python-2.7.14: Add libgpuarray/pygpu

---
 python-2.7.14-2.build.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh
index 3a7966f..f7f6179 100755
--- a/python-2.7.14-2.build.sh
+++ b/python-2.7.14-2.build.sh
@@ -111,7 +111,7 @@ EOF2
 		python setup.py install
 )
 
-pip install Cython	# for metaseq
+pip install Cython	# for metaseq,pygpu
 pip install pycurl	# for metaseq
 pip install metaseq
 
@@ -120,6 +120,21 @@ pip install HTSeq
 
 # for sasse: Theano and tensorflow (cuda version)
 
+# install libgpuarray/pygpu for Tensorflow
+(
+	VER=0.7.5
+	cd build
+	test -e libgpuarray-$VER.tar.gz || wget -O libgpuarray-$VER.tar.gz https://codeload.github.com/Theano/libgpuarray/tar.gz/v$VER
+	test -d libgpuarray-$VER || tar xf libgpuarray-$VER.tar.gz
+	cd libgpuarray-$VER
+	test -d Build || mkdir Build
+	cmake -DCMAKE_INSTALL_PREFIX=$PREFIX .
+	make
+	make install
+	python setup.py build_ext -L $PREFIX/lib -I $PREFIX/include
+	python setup.py install
+)
+
 pip install Theano
 pip install tensorflow-gpu