Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopencl/
Date: Mon, 21 Feb 2022 15:40:25
Message-Id: 1645458011.193b55597c6f7e069dab855bcaf95c3152248e69.marecki@gentoo
1 commit: 193b55597c6f7e069dab855bcaf95c3152248e69
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 21 12:29:39 2022 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 21 15:40:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=193b5559
7
8 dev-python/pyopencl: add 2022.1
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 dev-python/pyopencl/Manifest | 1 +
13 dev-python/pyopencl/pyopencl-2022.1.ebuild | 57 ++++++++++++++++++++++++++++++
14 2 files changed, 58 insertions(+)
15
16 diff --git a/dev-python/pyopencl/Manifest b/dev-python/pyopencl/Manifest
17 index 8c0b9caec76e..13b577749c8c 100644
18 --- a/dev-python/pyopencl/Manifest
19 +++ b/dev-python/pyopencl/Manifest
20 @@ -1 +1,2 @@
21 DIST pyopencl-2021.2.13.tar.gz 452397 BLAKE2B 8764fe1caf14e73b39aa455e7ea9e00b1733df4ef0d21fd1e2b6383db60eae33a1e1569d71dbd56617dc463e31426e3814cfe0201f8c891293fb32f4fad6a96e SHA512 16b527f69d4fa8bb8dd16cea67e7403893c813c625e0eb1f465fa8a94c9e4a878a5d5d589592b017bb548e1ff7ec5c36c79acd3cb55dee57592ca360a524ac7c
22 +DIST pyopencl-2022.1.tar.gz 452537 BLAKE2B 0d4d178a6bdf14dc3769dcb78c42bc894c0a443a6811fe9b25dedbc4a43debc06d1a1c32cb2a0df06fe16d1b2e78e65ef4f3ca8e9931be39384b3c8c813336de SHA512 e873807e757c19b59dbac2a0522fbb9c6e8af955d62bdcf06d8f3d792db3c9d2ce15372a6eefdca5b3f6756c35a85b5ff8d7dc1b6449bfd12c2b588576dd6f24
23
24 diff --git a/dev-python/pyopencl/pyopencl-2022.1.ebuild b/dev-python/pyopencl/pyopencl-2022.1.ebuild
25 new file mode 100644
26 index 000000000000..239c5dd9b960
27 --- /dev/null
28 +++ b/dev-python/pyopencl/pyopencl-2022.1.ebuild
29 @@ -0,0 +1,57 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{8..10} )
36 +DISTUTILS_USE_PEP517=setuptools
37 +
38 +inherit distutils-r1
39 +
40 +DESCRIPTION="Python wrapper for OpenCL"
41 +HOMEPAGE="https://mathema.tician.de/software/pyopencl/
42 + https://pypi.org/project/pyopencl/"
43 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64"
48 +IUSE="examples opengl"
49 +
50 +DEPEND=">=virtual/opencl-2"
51 +RDEPEND="${DEPEND}
52 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
53 + >=dev-python/mako-0.3.6[${PYTHON_USEDEP}]
54 + dev-python/numpy[${PYTHON_USEDEP}]
55 + >=dev-python/pytools-2021.2.7[${PYTHON_USEDEP}]"
56 +# libglvnd is only needed for the headers
57 +BDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
58 + >=dev-python/pybind11-2.5.0[${PYTHON_USEDEP}]
59 + opengl? ( media-libs/libglvnd )"
60 +
61 +# The test suite fails if there are no OpenCL platforms available, and
62 +# even if there is one (which requires the presence of both an OpenCL
63 +# runtime *and* hardware supported by it - simply emerging any runtime
64 +# is not enough) the vast majority of tests end up skipped because by
65 +# default the portage user hasn't got sufficient privileges to talk
66 +# to the GPU.
67 +RESTRICT="test"
68 +
69 +python_configure_all() {
70 + local myconf=()
71 + if use opengl; then
72 + myconf+=(--cl-enable-gl)
73 + fi
74 +
75 + "${EPYTHON}" configure.py \
76 + "${myconf[@]}"
77 +}
78 +
79 +python_install_all() {
80 + if use examples; then
81 + dodoc -r examples
82 + docompress -x /usr/share/doc/${PF}/examples
83 + fi
84 +
85 + distutils-r1_python_install_all
86 +}