diff options
author | Jon Gjengset | 2015-11-05 12:50:18 -0500 |
---|---|---|
committer | Jon Gjengset | 2015-11-05 12:50:18 -0500 |
commit | 89ca386e2ce1e46beee75163a53b5e1346a70e37 (patch) | |
tree | 27ede665f4fdca97e0a49434c1911184431c1141 | |
download | aur-89ca386e2ce1e46beee75163a53b5e1346a70e37.tar.gz |
Initial working version
-rw-r--r-- | .SRCINFO | 42 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 88 |
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..67b73f612b89 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,42 @@ +pkgbase = python-theano-git + pkgdesc = Definition and optimized evaluation of mathematical expressions on Numpy arrays. + pkgver = rel.0.7.1a1.r1287.4260bbf + 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-pycuda + optdepends = python-pydot + optdepends = python2-pycuda + optdepends = python2-pydot + provides = python-theano + provides = python2-theano + conflicts = python-theano + conflicts = python2-theano + source = python-theano::git+https://github.com/Theano/Theano.git + sha256sums = SKIP + +pkgname = python-theano-git + depends = python + depends = python-numpy + optdepends = python-pycuda + optdepends = python-pydot + provides = python-theano + conflicts = python-theano + +pkgname = python2-theano-git + depends = python2 + depends = python2-numpy + optdepends = python2-pycuda + optdepends = python2-pydot + provides = python2-theano + conflicts = python2-theano + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..df5d6e2d9558 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +src/ +pkg/ +*.pkg.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..eb1939199013 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: Jon Gjengset <jon@thesquareplanet.com> +# Original author: David McInnis<davidm@eagles.ewu.edu> + +pkgbase="python-theano-git" +pkgname=("python-theano-git" "python2-theano-git") +_pkgname="Theano" +pkgver=rel.0.7.1a1.r1287.4260bbf +pkgrel=1 +pkgdesc='Definition and optimized evaluation of mathematical expressions on Numpy arrays.' +arch=('any') +url='http://www.deeplearning.net/software/theano/' +license=('BSD') +conflicts=('python-theano' 'python2-theano') +provides=('python-theano' 'python2-theano') +depends=('python' 'python-numpy' + 'python2' 'python2-numpy') +makedepends=('python-distribute' 'python2-distribute') +checkdepends=('python-nose' 'python2-nose') +optdepends=('python-pycuda' 'python-pydot' + 'python2-pycuda' 'python2-pydot') +source=("python-theano::git+https://github.com/Theano/Theano.git") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgbase%-git}" + printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" + +} + +prepare() { + cd "$srcdir/" + cp -a "${pkgbase%-git}" "${pkgbase%-git}-py2" + cd "${pkgbase%-git}-py2" + 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/${pkgbase%-git}-py2" + python2 setup.py build + cp -f build/scripts-2*/* bin/ + + + msg "Building Python 3" + cd "$srcdir/${pkgbase%-git}" + python setup.py build + cp -f build/scripts-3*/* bin/ +} + +# Check always fails on non-64 bit platforms. Check frequently fails if optional dependencies are present +# Even if check succeeds it takes hours to complete +# +#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-git() { + depends=('python2' 'python2-numpy') + optdepends=('python2-pycuda' 'python2-pydot') + provides=('python2-theano') + conflicts=('python2-theano') + cd "$srcdir/${pkgbase%-git}-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-git() { + depends=('python' 'python-numpy') + optdepends=('python-pycuda' 'python-pydot') + provides=('python-theano') + conflicts=('python-theano') + cd "$srcdir/${pkgbase%-git}" + python setup.py install --root="$pkgdir"/ --optimize=1 + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-theano" +} |