Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/numba/
Date: Sun, 16 Jan 2022 15:23:25
Message-Id: 1642346546.ebe960677718da5594d78b8c4ccb28006600678d.andrewammerlaan@gentoo
1 commit: ebe960677718da5594d78b8c4ccb28006600678d
2 Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
3 AuthorDate: Sun Jan 16 15:16:01 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 16 15:22:26 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=ebe96067
7
8 dev-python/numba: bump version to 0.55.0
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
12 Closes: https://github.com/gentoo/sci/pull/1137
13 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
14
15 dev-python/numba/numba-0.55.0.ebuild | 85 ++++++++++++++++++++++++++++++++++++
16 1 file changed, 85 insertions(+)
17
18 diff --git a/dev-python/numba/numba-0.55.0.ebuild b/dev-python/numba/numba-0.55.0.ebuild
19 new file mode 100644
20 index 000000000..c700339ad
21 --- /dev/null
22 +++ b/dev-python/numba/numba-0.55.0.ebuild
23 @@ -0,0 +1,85 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=8
28 +
29 +PYTHON_COMPAT=( python3_{8..10} )
30 +
31 +DISTUTILS_USE_SETUPTOOLS=rdepend
32 +inherit optfeature multiprocessing distutils-r1
33 +
34 +DESCRIPTION="NumPy aware dynamic Python compiler using LLVM"
35 +HOMEPAGE="https://numba.pydata.org/
36 + https://github.com/numba"
37 +SRC_URI="https://github.com/numba/numba/archive/${PV}.tar.gz -> ${P}.tar.gz"
38 +
39 +LICENSE="BSD"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
42 +IUSE="openmp threads"
43 +
44 +RDEPEND="
45 + >=dev-python/llvmlite-0.38.0[${PYTHON_USEDEP}]
46 + <=dev-python/llvmlite-0.39.0
47 + >=dev-python/numpy-1.18.0[${PYTHON_USEDEP}]
48 + <dev-python/numpy-1.22[${PYTHON_USEDEP}]
49 + threads? ( >=dev-cpp/tbb-2019.5 )
50 +"
51 +BDEPEND="
52 + dev-python/pip[${PYTHON_USEDEP}]
53 + dev-python/versioneer[${PYTHON_USEDEP}]
54 +"
55 +
56 +DISTUTILS_IN_SOURCE_BUILD=1
57 +distutils_enable_tests unittest
58 +distutils_enable_sphinx docs/source dev-python/numpydoc dev-python/sphinx_rtd_theme
59 +
60 +PATCHES=(
61 + "${FILESDIR}/${PN}-0.52.0-skip_tests.patch"
62 +)
63 +
64 +pkg_setup() {
65 + if ! use openmp; then
66 + export NUMBA_DISABLE_OPENMP=1 || die
67 + else
68 + unset NUMBA_DISABLE_OPENMP || die
69 + fi
70 + if ! use threads; then
71 + export NUMBA_DISABLE_TBB=1 || die
72 + else
73 + unset NUMBA_DISABLE_TBB || die
74 + export TBBROOT="${EPREFIX}/usr" || die
75 + fi
76 +}
77 +
78 +python_prepare_all() {
79 + # This conf.py only works in a git repo
80 + if use doc; then
81 + git init -q || die
82 + git config user.email "larry@g.o" || die
83 + git config user.name "Larry the Cow" || die
84 + git add . || die
85 + git commit -m "init" || die
86 + fi
87 + distutils-r1_python_prepare_all
88 +}
89 +
90 +python_compile() {
91 + # FIXME: parallel python building fails. See Portage bug #614464 and
92 + # gentoo/sci issue #1080.
93 + export MAKEOPTS=-j1 || die
94 + distutils-r1_python_compile
95 +}
96 +
97 +# https://numba.pydata.org/numba-doc/latest/developer/contributing.html?highlight=test#running-tests
98 +python_test() {
99 + distutils_install_for_testing
100 + ${EPYTHON} setup.py build_ext --inplace || die \
101 + "${EPYTHON} failed to build_ext"
102 + ${EPYTHON} runtests.py -m $(makeopts_jobs) || die \
103 + "${EPYTHON} failed unittests"
104 +}
105 +
106 +pkg_postinst() {
107 + optfeature "compile cuda code" dev-util/nvidia-cuda-sdk
108 +}