summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2022-02-21 12:29:39 +0000
committerMarek Szuba <marecki@gentoo.org>2022-02-21 15:40:11 +0000
commit193b55597c6f7e069dab855bcaf95c3152248e69 (patch)
tree8284211fd867e1839f2aae9c28d5d6ac455990c4 /dev-python/pyopencl
parentmail-mta/protonmail-bridge: add 2.1.1, drop 1.8.12 (diff)
downloadgentoo-193b55597c6f7e069dab855bcaf95c3152248e69.tar.gz
gentoo-193b55597c6f7e069dab855bcaf95c3152248e69.tar.bz2
gentoo-193b55597c6f7e069dab855bcaf95c3152248e69.zip
dev-python/pyopencl: add 2022.1
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/pyopencl')
-rw-r--r--dev-python/pyopencl/Manifest1
-rw-r--r--dev-python/pyopencl/pyopencl-2022.1.ebuild57
2 files changed, 58 insertions, 0 deletions
diff --git a/dev-python/pyopencl/Manifest b/dev-python/pyopencl/Manifest
index 8c0b9caec76e..13b577749c8c 100644
--- a/dev-python/pyopencl/Manifest
+++ b/dev-python/pyopencl/Manifest
@@ -1 +1,2 @@
DIST pyopencl-2021.2.13.tar.gz 452397 BLAKE2B 8764fe1caf14e73b39aa455e7ea9e00b1733df4ef0d21fd1e2b6383db60eae33a1e1569d71dbd56617dc463e31426e3814cfe0201f8c891293fb32f4fad6a96e SHA512 16b527f69d4fa8bb8dd16cea67e7403893c813c625e0eb1f465fa8a94c9e4a878a5d5d589592b017bb548e1ff7ec5c36c79acd3cb55dee57592ca360a524ac7c
+DIST pyopencl-2022.1.tar.gz 452537 BLAKE2B 0d4d178a6bdf14dc3769dcb78c42bc894c0a443a6811fe9b25dedbc4a43debc06d1a1c32cb2a0df06fe16d1b2e78e65ef4f3ca8e9931be39384b3c8c813336de SHA512 e873807e757c19b59dbac2a0522fbb9c6e8af955d62bdcf06d8f3d792db3c9d2ce15372a6eefdca5b3f6756c35a85b5ff8d7dc1b6449bfd12c2b588576dd6f24
diff --git a/dev-python/pyopencl/pyopencl-2022.1.ebuild b/dev-python/pyopencl/pyopencl-2022.1.ebuild
new file mode 100644
index 000000000000..239c5dd9b960
--- /dev/null
+++ b/dev-python/pyopencl/pyopencl-2022.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="Python wrapper for OpenCL"
+HOMEPAGE="https://mathema.tician.de/software/pyopencl/
+ https://pypi.org/project/pyopencl/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples opengl"
+
+DEPEND=">=virtual/opencl-2"
+RDEPEND="${DEPEND}
+ >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/mako-0.3.6[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2021.2.7[${PYTHON_USEDEP}]"
+# libglvnd is only needed for the headers
+BDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pybind11-2.5.0[${PYTHON_USEDEP}]
+ opengl? ( media-libs/libglvnd )"
+
+# The test suite fails if there are no OpenCL platforms available, and
+# even if there is one (which requires the presence of both an OpenCL
+# runtime *and* hardware supported by it - simply emerging any runtime
+# is not enough) the vast majority of tests end up skipped because by
+# default the portage user hasn't got sufficient privileges to talk
+# to the GPU.
+RESTRICT="test"
+
+python_configure_all() {
+ local myconf=()
+ if use opengl; then
+ myconf+=(--cl-enable-gl)
+ fi
+
+ "${EPYTHON}" configure.py \
+ "${myconf[@]}"
+}
+
+python_install_all() {
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ distutils-r1_python_install_all
+}