aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-opencl/APKBUILD
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2017-06-02 17:49:36 +0000
committerShiz <hi@shiz.me>2017-06-03 19:42:17 +0200
commita8863590bd5251ca7e78bee4ee6cdb9125a08bb2 (patch)
tree483794d1e05bf0ecba747e4c82a5b7dbf1e7ffdc /community/py-opencl/APKBUILD
parent7b97ea8f64acb32326e9b9dc2ccb87611d7b3c99 (diff)
downloadaports-a8863590bd5251ca7e78bee4ee6cdb9125a08bb2.tar.bz2
aports-a8863590bd5251ca7e78bee4ee6cdb9125a08bb2.tar.xz
community/py-opencl: update to 2017.1.1 / add python3 subpkg
Diffstat (limited to 'community/py-opencl/APKBUILD')
-rw-r--r--community/py-opencl/APKBUILD47
1 files changed, 35 insertions, 12 deletions
diff --git a/community/py-opencl/APKBUILD b/community/py-opencl/APKBUILD
index 6d6106ddf0..9ab00c977e 100644
--- a/community/py-opencl/APKBUILD
+++ b/community/py-opencl/APKBUILD
@@ -2,31 +2,54 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-opencl
_pkgreal=${pkgname/-/}
-pkgver=2016.2.1
+pkgver=2017.1.1
pkgrel=0
pkgdesc="Python wrapper for OpenCL"
url="https://pypi.python.org/pypi/pyopencl"
arch="all !ppc64le !s390x"
license="MIT"
-depends="python2"
-depends_dev="$pkgname"
-makedepends="python2-dev py-setuptools py-mako py-numpy ctags libffi-dev mesa-dev opencl-headers opencl-icd-loader-dev"
-subpackages="$pkgname-dev"
+depends="py-mako"
+makedepends="python2-dev python3-dev py-setuptools py-mako py-numpy ctags libffi-dev mesa-dev opencl-headers
+ opencl-icd-loader-dev py-cparser py-cffi"
+checkdepends="py-six py-decorator pytest py-py"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgreal:0:1}/$_pkgreal/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
build() {
cd "$builddir"
- python2 configure.py --cl-enable-gl --python-exe=python2 || return 1
- make || return 1
- python2 setup.py test
+ python2 setup.py build
+ python3 setup.py build
}
package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ _py python3
+ depends="${depends//py-/py3-}"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+check() {
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build || return 1
+ python2 setup.py test
}
-md5sums="ccc20e6c228e03c36081553adc21bd27 pyopencl-2016.2.1.tar.gz"
-sha256sums="3fcb59ab9c85e08d96a24388a736cc3d0bbd9608efff96ecb25d3124fde6f4b7 pyopencl-2016.2.1.tar.gz"
-sha512sums="a135311acd999e618e39a52139f93e7e9833c7068282b84be099ff74ac6c96abb2bcd0b54eee01197643525aac18a28bf7ccc62877dc403265fa88d4bea9f3ab pyopencl-2016.2.1.tar.gz"
+sha512sums="2f8288aafc4c0a0e7eeb8088747faa7c80fa002790cb4cd0af227d8930ff95da3b0f4f7d0c9164d56f73b81c39e4bd0c442b35a6253f4a3e83ab060d06b16a3d pyopencl-2017.1.1.tar.gz"