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: Thu, 22 Sep 2022 01:33:11
Message-Id: 1663810376.9e55c4f4521aea6fd442c7964826430c167baecc.marecki@gentoo
1 commit: 9e55c4f4521aea6fd442c7964826430c167baecc
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 22 01:32:37 2022 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 22 01:32:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e55c4f4
7
8 dev-python/pyopencl: add 2022.2.3
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 dev-python/pyopencl/Manifest | 1 +
13 dev-python/pyopencl/pyopencl-2022.2.3.ebuild | 65 ++++++++++++++++++++++++++++
14 2 files changed, 66 insertions(+)
15
16 diff --git a/dev-python/pyopencl/Manifest b/dev-python/pyopencl/Manifest
17 index 5f61f35b51dc..fb4e17dbf0e2 100644
18 --- a/dev-python/pyopencl/Manifest
19 +++ b/dev-python/pyopencl/Manifest
20 @@ -1 +1,2 @@
21 DIST pyopencl-2022.1.6.tar.gz 455424 BLAKE2B 03c46bebc4d6093489b0a1501267d5d67b73e9e7fe50f73cec3dd752fbb699adab63e08d60f3a54c8fd215cbb82c81353d28e875b953686b05e188df78cfe237 SHA512 a1e404c4c5f95d111690c969ae5c5d34f0deca2c8b93a5ce4d90e003031af7eb94a7708f878170a9b6e001b899d321f7dfdaa6f7545af3237d30d237d44bb45f
22 +DIST pyopencl-2022.2.3.tar.gz 468218 BLAKE2B d747014c4cdb4d4303aa03fa16606f032b193497cf20909fd9e449f3c02e3d61dce55e44e93e769e4ec8f9c5f859c8d0a0f13bca1f1350dd7a29f6d92bcc3429 SHA512 b16feaa6d8a00cebb4f8c87d2aabed3472c45484eb5ecd530cb8e3478cfc9a41386203ab8cac0450b211f3330c36b3c52846e73a31e346784182f2ca9e6f4123
23
24 diff --git a/dev-python/pyopencl/pyopencl-2022.2.3.ebuild b/dev-python/pyopencl/pyopencl-2022.2.3.ebuild
25 new file mode 100644
26 index 000000000000..e966b7e97d34
27 --- /dev/null
28 +++ b/dev-python/pyopencl/pyopencl-2022.2.3.ebuild
29 @@ -0,0 +1,65 @@
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..11} )
36 +DISTUTILS_USE_PEP517=setuptools
37 +
38 +inherit distutils-r1 multiprocessing
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 ~ppc64"
48 +IUSE="examples opengl"
49 +
50 +COMMON=">=virtual/opencl-2"
51 +# libglvnd is only needed for the headers
52 +DEPEND="${COMMON}
53 + opengl? ( media-libs/libglvnd )"
54 +RDEPEND="${COMMON}
55 + >=dev-python/mako-0.3.6[${PYTHON_USEDEP}]
56 + dev-python/numpy[${PYTHON_USEDEP}]
57 + >=dev-python/platformdirs-2.2.0[${PYTHON_USEDEP}]
58 + >=dev-python/pytools-2021.2.7[${PYTHON_USEDEP}]"
59 +BDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
60 + >=dev-python/pybind11-2.5.0[${PYTHON_USEDEP}]
61 + test? ( dev-libs/pocl )"
62 +
63 +distutils_enable_tests pytest
64 +
65 +python_configure_all() {
66 + local myconf=()
67 + if use opengl; then
68 + myconf+=(--cl-enable-gl)
69 + fi
70 +
71 + "${EPYTHON}" configure.py \
72 + "${myconf[@]}"
73 +}
74 +
75 +python_test() {
76 + # Use dev-libs/pocl for testing; ignore any other OpenCL devices that might be present
77 + local -x PYOPENCL_TEST="portable:pthread"
78 + # Set the number of threads to match MAKEOPTS
79 + local -x POCL_MAX_PTHREAD_COUNT=$(makeopts_jobs)
80 + # Change to the 'test' directory so that python does not try to import pyopencl from the source directory
81 + # (Importing from the source directory fails, because the compiled '_cl' module is only in the build directory)
82 + pushd test >/dev/null || die
83 + epytest
84 + popd >/dev/null || die
85 +}
86 +
87 +python_install_all() {
88 + if use examples; then
89 + dodoc -r examples
90 + docompress -x /usr/share/doc/${PF}/examples
91 + fi
92 +
93 + distutils-r1_python_install_all
94 +}