summaryrefslogtreecommitdiff
path: root/python2-pyopencl/PKGBUILD
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-25 09:46:32 +0200
committerErich Eckner <git@eckner.net>2019-07-25 09:48:58 +0200
commit6c4aba93daba43a5a01a167689d04c297e06dbc9 (patch)
tree32aca599c8ccefae086127eac622f6060ca525c6 /python2-pyopencl/PKGBUILD
parent3925b561a28b4b10dcf5a264858f3f09e13f2c43 (diff)
downloadarchlinuxewe.git.save-6c4aba93daba43a5a01a167689d04c297e06dbc9.tar.xz
python2-pyopencl neu
Diffstat (limited to 'python2-pyopencl/PKGBUILD')
-rw-r--r--python2-pyopencl/PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/python2-pyopencl/PKGBUILD b/python2-pyopencl/PKGBUILD
new file mode 100644
index 00000000..7e9682ee
--- /dev/null
+++ b/python2-pyopencl/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Santiago Torres-Arias <santiago@archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
+
+_pypiname=pyopencl
+pkgname=python2-pyopencl
+pkgver=2019.1
+pkgrel=1
+epoch=1
+pkgdesc="A complete, object-oriented language binding of OpenCL to Python2"
+arch=('i686' 'pentium4' 'x86_64')
+url="https://mathema.tician.de/software/pyopencl"
+license=('MIT' 'Apache' 'BSD')
+depends=('opencl-icd-loader' 'opencl-headers' 'mesa' 'boost-libs')
+makedepends=('ctags' 'boost' 'python-setuptools' 'python2-setuptools' 'python-mako' 'python2-mako'
+ 'python-numpy' 'python2-numpy' 'python-cffi' 'python2-cffi' 'git' 'pybind11')
+checkdepends=('python-six' 'python2-six' 'python-appdirs' 'python2-appdirs'
+ 'python-pytest' 'python-pytools')
+source=("git+https://github.com/inducer/pyopencl.git?signed#tag=v${pkgver}")
+validpgpkeys=("900A958D9A0ACA58B1468F2471AA298BCA171145") # Andreas Ratchke
+sha1sums=('SKIP')
+
+build() {
+ cd "pyopencl"
+ git submodule init && git submodule update
+ python2 ./configure.py --python-exe=python2 --cl-pretend-version=1.2 # --boost-python-libname=boost_python3
+ make
+}
+
+check(){
+ # INFO: to avoid a PLATFORM_NOT_FOUND_KHR error here, you would have to install
+ # the driver of your specific video card in here
+ # checkdepends+=('amdgpu')
+ cd pyopencl
+ PYTHONPATH="$PWD/build/lib.linux-${CARCH}-2.7/" make tests
+}
+
+package() {
+ depends+=('python' 'python-numpy' 'python-mako' 'python-pytools' 'pyopencl-headers' 'python-setuptools' 'python-cffi')
+
+ cd pyopencl
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+
+ rm -fr "${pkgdir}"/usr/include
+
+ install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}