diff options
author | David McInnis | 2015-09-13 23:06:51 -0700 |
---|---|---|
committer | David McInnis | 2015-09-13 23:06:51 -0700 |
commit | 299a086d56675243221813b1f93fe9a50c4bf223 (patch) | |
tree | b874da34ef84d57f67388123a63ca230c0564eab | |
download | aur-299a086d56675243221813b1f93fe9a50c4bf223.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4c1a3502eac3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = python-theano + pkgdesc = Definition and optimized evaluation of mathematical expressions on Numpy arrays. + pkgver = 0.7.0 + pkgrel = 1 + url = http://www.deeplearning.net/software/theano/ + arch = any + license = BSD + checkdepends = python-nose + checkdepends = python2-nose + makedepends = python-distribute + makedepends = python2-distribute + depends = python + depends = python-numpy + depends = python2 + depends = python2-numpy + optdepends = python-sympy + optdepends = python-pycuda + optdepends = python-pydot + optdepends = python2-sympy + optdepends = python2-pycuda + optdepends = python2-pydot + source = http://pypi.python.org/packages/source/T/Theano/Theano-0.7.0.tar.gz + sha256sums = 05b0f6d2467735abea13bdc5c2c1ce3c53f1b89f9ebc5a43abdf71f88cf818b3 + +pkgname = python-theano + depends = python + depends = python-numpy + +pkgname = python2-theano + depends = python2 + depends = python2-numpy + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aff65a8b2f8b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: David McInnis<anntzer dot lee at gmail dot com> + +pkgbase="python-theano" +pkgname=("python-theano" "python2-theano") +_pkgname="Theano" +pkgver="0.7.0" +pkgrel="1" +pkgdesc='Definition and optimized evaluation of mathematical expressions on Numpy arrays.' +arch=('any') +url='http://www.deeplearning.net/software/theano/' +license=('BSD') +depends=('python' 'python-numpy' + 'python2' 'python2-numpy') +makedepends=('python-distribute' 'python2-distribute') +checkdepends=('python-nose' 'python2-nose') +optdepends=('python-sympy' 'python-pycuda' 'python-pydot' + 'python2-sympy' 'python2-pycuda' 'python2-pydot') +source=("http://pypi.python.org/packages/source/T/Theano/Theano-${pkgver}.tar.gz") +sha256sums=('05b0f6d2467735abea13bdc5c2c1ce3c53f1b89f9ebc5a43abdf71f88cf818b3') + +prepare() { + cd "$srcdir/" + cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-py2" + cd "${_pkgname}-${pkgver}" + sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + -i $(find . -name '*.py') +} + +build() { + msg "Building Python 2" + cd "$srcdir/${_pkgname}-${pkgver}-py2" + python2 setup.py build + cp -f build/scripts-2.7/* bin/ + + + msg "Building Python 3" + cd "$srcdir/${_pkgname}-${pkgver}" + python setup.py build + cp -f build/scripts-3.4/* bin/ +} + +check() { + msg "Checking Python 2" + cd "$srcdir/${_pkgname}-${pkgver}-py2"/build/lib/theano/ + ../../scripts-2.7/theano-nose -v + + + msg "Checking Python 3" + cd "$srcdir/${_pkgname}-${pkgver}"/build/lib/theano/ + ../../scripts-3.4/theano-nose -v + +} + +package_python2-theano() { + depends=('python2' 'python2-numpy') + cd "$srcdir/${_pkgname}-${pkgver}-py2" + python2 setup.py install --root="$pkgdir"/ --optimize=1 + mv "${pkgdir}/usr/bin/theano-cache" "${pkgdir}/usr/bin/theano2-cache" + mv "${pkgdir}/usr/bin/theano-nose" "${pkgdir}/usr/bin/theano2-nose" + mv "${pkgdir}/usr/bin/theano-test" "${pkgdir}/usr/bin/theano2-test" + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-theano" +} + +package_python-theano() { + depends=('python' 'python-numpy') + cd "$srcdir/${_pkgname}-${pkgver}" + python setup.py install --root="$pkgdir"/ --optimize=1 + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-theano" +}
\ No newline at end of file |