aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-09-15 20:38:49 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-09-15 20:38:49 +0200
commit74cb9c3f95a52e96d5c0e204c38d2bd27f4b5d51 (patch)
tree57efc9ab30873ad1dfe340d7a5b9092f43f14ab9 /dev-python
parentsci-misc/irstlm: remove AM_CXXFLAGS, add doc/static-libs use flags (diff)
downloadsci-74cb9c3f95a52e96d5c0e204c38d2bd27f4b5d51.tar.gz
sci-74cb9c3f95a52e96d5c0e204c38d2bd27f4b5d51.tar.bz2
sci-74cb9c3f95a52e96d5c0e204c38d2bd27f4b5d51.zip
dev-python/numba: add version 0.54.0
Package-Manager: Portage-3.0.23, Repoman-3.0.3 RepoMan-Options: --force Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/numba/Manifest1
-rw-r--r--dev-python/numba/numba-0.54.0.ebuild84
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/numba/Manifest b/dev-python/numba/Manifest
index e9b7bd181..83a5ffa15 100644
--- a/dev-python/numba/Manifest
+++ b/dev-python/numba/Manifest
@@ -1 +1,2 @@
DIST numba-0.53.1.tar.gz 2241224 BLAKE2B cbd018aa15b68ec892259b917f2c1cbac66a35ab39c5a67855f1d2e1d4a2a9c88c4af1c92a64c9394a6acda0ab67b4590547f0d6889b812fc7625f9b7954c374 SHA512 85bee593a6cac7faa5c284881b7ab5a0076c5cc8d5e12d23d03b8c738d5bb8b53dd7a10d45555ecaef0f015e9105a51aef1011592a70a4b3123a58c92305d0ba
+DIST numba-0.54.0.tar.gz 2263308 BLAKE2B 263334786a1bbdec91186e85de5a5a3b003f704be1e925c0c46f5797a0d2c56b1c86760f40e83c2b36fd68a97601fb9ec0df70fac9a5efdc7b2d33a9c19666eb SHA512 c8091e4209ae7005ac04ea8c6f9c0e534b46f38cdfe692db562bb374beff71162c353d597f12a70edcf572792c71e1955e25de60edd69bf4b6a1a0e22b3dff90
diff --git a/dev-python/numba/numba-0.54.0.ebuild b/dev-python/numba/numba-0.54.0.ebuild
new file mode 100644
index 000000000..125b20daf
--- /dev/null
+++ b/dev-python/numba/numba-0.54.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..9} )
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit optfeature multiprocessing distutils-r1
+
+DESCRIPTION="NumPy aware dynamic Python compiler using LLVM"
+HOMEPAGE="https://numba.pydata.org/
+ https://github.com/numba"
+SRC_URI="https://github.com/numba/numba/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="openmp threads"
+
+RDEPEND="
+ >=dev-python/llvmlite-0.37.0[${PYTHON_USEDEP}]
+ <dev-python/llvmlite-0.38.0
+ >=dev-python/numpy-1.17.0[${PYTHON_USEDEP}]
+ threads? ( >=dev-cpp/tbb-2019.5 )
+"
+BDEPEND="
+ dev-python/pip[${PYTHON_USEDEP}]
+ dev-python/versioneer[${PYTHON_USEDEP}]
+"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+distutils_enable_tests unittest
+distutils_enable_sphinx docs/source dev-python/numpydoc dev-python/sphinx_rtd_theme
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.52.0-skip_tests.patch"
+)
+
+pkg_setup() {
+ if ! use openmp; then
+ export NUMBA_DISABLE_OPENMP=1 || die
+ else
+ unset NUMBA_DISABLE_OPENMP || die
+ fi
+ if ! use threads; then
+ export NUMBA_DISABLE_TBB=1 || die
+ else
+ unset NUMBA_DISABLE_TBB || die
+ export TBBROOT="${EPREFIX}/usr" || die
+ fi
+}
+
+python_prepare_all() {
+ # This conf.py only works in a git repo
+ if use doc; then
+ git init -q || die
+ git config user.email "larry@gentoo.org" || die
+ git config user.name "Larry the Cow" || die
+ git add . || die
+ git commit -m "init" || die
+ fi
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ # FIXME: parallel python building fails. See Portage bug #614464 and
+ # gentoo/sci issue #1080.
+ export MAKEOPTS=-j1 || die
+ distutils-r1_python_compile
+}
+
+# https://numba.pydata.org/numba-doc/latest/developer/contributing.html?highlight=test#running-tests
+python_test() {
+ distutils_install_for_testing
+ ${EPYTHON} setup.py build_ext --inplace || die \
+ "${EPYTHON} failed to build_ext"
+ ${EPYTHON} runtests.py -m $(makeopts_jobs) || die \
+ "${EPYTHON} failed unittests"
+}
+
+pkg_postinst() {
+ optfeature "compile cuda code" dev-util/nvidia-cuda-sdk
+}