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: Fri, 26 Jun 2020 17:36:01
Message-Id: 1593192911.e8e2dd5b6ee844faf38b3480777f97edc1dd42b5.marecki@gentoo
1 commit: e8e2dd5b6ee844faf38b3480777f97edc1dd42b5
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 26 17:34:34 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 26 17:35:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8e2dd5b
7
8 dev-python/pyopencl: bump to 2020.2
9
10 Builds fine against python3_9.
11
12 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
13
14 dev-python/pyopencl/Manifest | 1 +
15 dev-python/pyopencl/pyopencl-2020.2.ebuild | 56 ++++++++++++++++++++++++++++++
16 2 files changed, 57 insertions(+)
17
18 diff --git a/dev-python/pyopencl/Manifest b/dev-python/pyopencl/Manifest
19 index 7595d500177..995e4b8e628 100644
20 --- a/dev-python/pyopencl/Manifest
21 +++ b/dev-python/pyopencl/Manifest
22 @@ -1,2 +1,3 @@
23 DIST pyopencl-2017.2.tar.gz 350145 BLAKE2B 12c481893158f97dec612256b36e710ab52356c8b5f644f3710b5e34d4d10df3b27137ad76f29543fe16b3da725471e206aa5f69c646a79a65246d6091c686a9 SHA512 49f2ff619d8c214a3962b8444e68ba415dda032abaf9eeab259fcd1b21fbaab10bd057035161baef7f0182995834082218a6667464c01645231a94c88aa5c18b
24 DIST pyopencl-2019.1.2.tar.gz 343805 BLAKE2B 027b231231532403a5e18249bd438e1a5a67805a685e46fd9506f7286957b14068540f93a3733149aeba2a720f6c71e91db74351916ca974739374a05f2d2c74 SHA512 b2850622253f480cafacadbb9d13afea801af9d4dd52679f132fc0e5f1d4c2f4d3bdf83c9ed64c14c19ead75e6d36afa8b57ff52bbea135fc02291b1fe7b8636
25 +DIST pyopencl-2020.2.tar.gz 351600 BLAKE2B 47a733d7a552f5d1f69a1a9710c3262d50c26651ed9f46146829babe28962e236e2c1b9ba3d3d14207f28bdc562323a94ab4c51dbf5fcf1a0b12282b3c6aff50 SHA512 233bbf2e99507d3a832222cc8149bf7ac17332a550e4867f843fcc2b31104d961a3f0d972b0a1878d4716b2da4548f1390560141cd09cb1ba13300c541b058b9
26
27 diff --git a/dev-python/pyopencl/pyopencl-2020.2.ebuild b/dev-python/pyopencl/pyopencl-2020.2.ebuild
28 new file mode 100644
29 index 00000000000..e5fbb9b9f44
30 --- /dev/null
31 +++ b/dev-python/pyopencl/pyopencl-2020.2.ebuild
32 @@ -0,0 +1,56 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{7..9} )
39 +
40 +inherit distutils-r1
41 +
42 +DESCRIPTION="Python wrapper for OpenCL"
43 +HOMEPAGE="https://mathema.tician.de/software/pyopencl
44 + https://pypi.org/project/pyopencl/"
45 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="GPL-2"
48 +SLOT="0"
49 +KEYWORDS="~amd64"
50 +IUSE="examples opengl"
51 +
52 +COMMON="dev-python/numpy[${PYTHON_USEDEP}]"
53 +RDEPEND="${COMMON}
54 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
55 + >=dev-python/decorator-3.2.0[${PYTHON_USEDEP}]
56 + dev-python/mako[${PYTHON_USEDEP}]
57 + >=dev-python/pytools-2017.6[${PYTHON_USEDEP}]
58 + >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
59 + >=virtual/opencl-2"
60 +DEPEND="${COMMON}
61 + dev-python/pybind11[${PYTHON_USEDEP}]"
62 +
63 +# The test suite fails if there are no OpenCL platforms available, and
64 +# even if there is one (which requires the presence of both an OpenCL
65 +# runtime *and* hardware supported by it - simply emerging any runtime
66 +# is not enough) the vast majority of tests end up skipped because by
67 +# default the portage user hasn't got sufficient privileges to talk
68 +# to the GPU.
69 +RESTRICT="test"
70 +
71 +python_configure_all() {
72 + local myconf=()
73 + if use opengl; then
74 + myconf+=(--cl-enable-gl)
75 + fi
76 +
77 + "${EPYTHON}" configure.py \
78 + "${myconf[@]}"
79 +}
80 +
81 +python_install_all() {
82 + if use examples; then
83 + dodoc -r examples
84 + docompress -x /usr/share/doc/${PF}/examples
85 + fi
86 +
87 + distutils-r1_python_install_all
88 +}