Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/numba/
Date: Tue, 01 Dec 2020 23:14:54
Message-Id: 1606864480.cfb477681ef2ce2506acffc31b7ae151973e213e.epsilon-0@gentoo
1 commit: cfb477681ef2ce2506acffc31b7ae151973e213e
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Tue Dec 1 23:14:31 2020 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Tue Dec 1 23:14:40 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=cfb47768
7
8 dev-python/numba: version bump to 0.52.0
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
12
13 dev-python/numba/numba-0.52.0.ebuild | 69 ++++++++++++++++++++++++++++++++++++
14 1 file changed, 69 insertions(+)
15
16 diff --git a/dev-python/numba/numba-0.52.0.ebuild b/dev-python/numba/numba-0.52.0.ebuild
17 new file mode 100644
18 index 000000000..5625e679f
19 --- /dev/null
20 +++ b/dev-python/numba/numba-0.52.0.ebuild
21 @@ -0,0 +1,69 @@
22 +# Copyright 1999-2020 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +PYTHON_COMPAT=( python3_{6..9} )
28 +
29 +DISTUTILS_USE_SETUPTOOLS=rdepend
30 +inherit eutils multiprocessing distutils-r1
31 +
32 +DESCRIPTION="NumPy aware dynamic Python compiler using LLVM"
33 +HOMEPAGE="https://numba.pydata.org/
34 + https://github.com/numba"
35 +SRC_URI="https://github.com/numba/numba/archive/${PV}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="BSD"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
40 +IUSE="openmp threads"
41 +
42 +RDEPEND="${PYTHON_DEPS}
43 + >=dev-python/llvmlite-0.35.0[${PYTHON_USEDEP}]
44 + <dev-python/llvmlite-0.36.0
45 + dev-python/numpy[${PYTHON_USEDEP}]
46 + dev-python/pip[${PYTHON_USEDEP}]
47 + dev-python/scipy[${PYTHON_USEDEP}]
48 + threads? ( dev-cpp/tbb )
49 +"
50 +DEPEND="${RDEPEND}"
51 +
52 +DISTUTILS_IN_SOURCE_BUILD=1
53 +distutils_enable_tests unittest
54 +
55 +# doc system is another huge mess, skip it
56 +PATCHES=(
57 + "${FILESDIR}/${P}-skip_tests.patch"
58 +)
59 +
60 +pkg_setup() {
61 + if ! use openmp; then
62 + export NUMBA_DISABLE_OPENMP=1
63 + else
64 + unset NUMBA_DISABLE_OPENMP
65 + fi
66 + if ! use threads; then
67 + export NUMBA_DISABLE_TBB=1
68 + else
69 + unset NUMBA_DISABLE_TBB
70 + export TBBROOT="${EPREFIX}/usr"
71 + fi
72 +}
73 +
74 +# https://numba.pydata.org/numba-doc/latest/developer/contributing.html?highlight=test#running-tests
75 +python_test() {
76 + distutils_install_for_testing
77 + ${EPYTHON} setup.py build_ext --inplace || die \
78 + "${EPYTHON} failed to build_ext"
79 + ${EPYTHON} runtests.py -m $(makeopts_jobs) || die \
80 + "${EPYTHON} failed unittests"
81 +}
82 +
83 +# https://numba.pydata.org/numba-doc/latest/user/installing.html
84 +python_install_all() {
85 + distutils-r1_python_install_all
86 +}
87 +
88 +pkg_postinst() {
89 + optfeature "compile cuda code" dev-util/nvidia-cuda-sdk
90 +}