Commit c795105a authored by Stuart Cardall's avatar Stuart Cardall Committed by Natanael Copa

community/py-opencl: update to 2017.1.1 / add python3 subpkg

parent 4e7a6efe
...@@ -2,31 +2,54 @@ ...@@ -2,31 +2,54 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> # Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-opencl pkgname=py-opencl
_pkgreal=${pkgname/-/} _pkgreal=${pkgname/-/}
pkgver=2016.2.1 pkgver=2017.1.1
pkgrel=0 pkgrel=0
pkgdesc="Python wrapper for OpenCL" pkgdesc="Python wrapper for OpenCL"
url="https://pypi.python.org/pypi/pyopencl" url="https://pypi.python.org/pypi/pyopencl"
arch="all !s390x" arch="all !s390x"
license="MIT" license="MIT"
depends="python2" depends="py-mako"
depends_dev="$pkgname" makedepends="python2-dev python3-dev py-setuptools py-mako py-numpy ctags libffi-dev mesa-dev opencl-headers
makedepends="python2-dev py-setuptools py-mako py-numpy ctags libffi-dev mesa-dev opencl-headers opencl-icd-loader-dev" opencl-icd-loader-dev py-cparser py-cffi"
subpackages="$pkgname-dev" 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" source="https://files.pythonhosted.org/packages/source/${_pkgreal:0:1}/$_pkgreal/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver" builddir="$srcdir/$_pkgreal-$pkgver"
build() { build() {
cd "$builddir" cd "$builddir"
python2 configure.py --cl-enable-gl --python-exe=python2 || return 1 python2 setup.py build
make || return 1 python3 setup.py build
python2 setup.py test
} }
package() { 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" 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" sha512sums="2f8288aafc4c0a0e7eeb8088747faa7c80fa002790cb4cd0af227d8930ff95da3b0f4f7d0c9164d56f73b81c39e4bd0c442b35a6253f4a3e83ab060d06b16a3d pyopencl-2017.1.1.tar.gz"
sha256sums="3fcb59ab9c85e08d96a24388a736cc3d0bbd9608efff96ecb25d3124fde6f4b7 pyopencl-2016.2.1.tar.gz"
sha512sums="a135311acd999e618e39a52139f93e7e9833c7068282b84be099ff74ac6c96abb2bcd0b54eee01197643525aac18a28bf7ccc62877dc403265fa88d4bea9f3ab pyopencl-2016.2.1.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment