diff options
-rw-r--r-- | python2-pyopencl/.gitignore | 1 | ||||
-rw-r--r-- | python2-pyopencl/LICENSE.txt | 20 | ||||
-rw-r--r-- | python2-pyopencl/PKGBUILD | 47 |
3 files changed, 68 insertions, 0 deletions
diff --git a/python2-pyopencl/.gitignore b/python2-pyopencl/.gitignore new file mode 100644 index 000000000..d487aebd1 --- /dev/null +++ b/python2-pyopencl/.gitignore @@ -0,0 +1 @@ +pyopencl diff --git a/python2-pyopencl/LICENSE.txt b/python2-pyopencl/LICENSE.txt new file mode 100644 index 000000000..3ce400f9d --- /dev/null +++ b/python2-pyopencl/LICENSE.txt @@ -0,0 +1,20 @@ +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/python2-pyopencl/PKGBUILD b/python2-pyopencl/PKGBUILD new file mode 100644 index 000000000..7e9682eeb --- /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 +} |