commit: 098795ca6cf10eaa90d174f77439b77076db14ff
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 12 12:10:58 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Dec 12 12:10:58 2022 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=098795ca
dev-python/numba: add 0.56.4
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
.../numba/files/numba-0.56.4-allow-py3.11.patch | 13 ++++
dev-python/numba/metadata.xml | 1 +
dev-python/numba/numba-0.56.4.ebuild | 85 ++++++++++++++++++++++
3 files changed, 99 insertions(+)
diff --git a/dev-python/numba/files/numba-0.56.4-allow-py3.11.patch
b/dev-python/numba/files/numba-0.56.4-allow-py3.11.patch
new file mode 100644
index 000000000..07c1b5d88
--- /dev/null
+++ b/dev-python/numba/files/numba-0.56.4-allow-py3.11.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index 68feca4..1d254ec 100644
+--- a/setup.py
++++ b/setup.py
+@@ -20,7 +20,7 @@ except ImportError:
+
+
+ min_python_version = "3.7"
+-max_python_version = "3.11" # exclusive
++max_python_version = "3.12" # exclusive
+ min_numpy_build_version = "1.11"
+ min_numpy_run_version = "1.18"
+ max_numpy_run_version = "1.24"
diff --git a/dev-python/numba/metadata.xml b/dev-python/numba/metadata.xml
index 43b02aeec..63bc398e0 100644
--- a/dev-python/numba/metadata.xml
+++ b/dev-python/numba/metadata.xml
@@ -11,5 +11,6 @@
</maintainer>
<upstream>
<remote-id type="github">numba/numba</remote-id>
+ <remote-id type="pypi">numba</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/numba/numba-0.56.4.ebuild
b/dev-python/numba/numba-0.56.4.ebuild
new file mode 100644
index 000000000..53b99b45f
--- /dev/null
+++ b/dev-python/numba/numba-0.56.4.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# py3.11 fails to compile:
+# error: ‘CFrame’ does not name a type; did you mean ‘_frame’?
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+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}.gh.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="openmp threads"
+
+RDEPEND="
+ >=dev-python/llvmlite-0.39.0[${PYTHON_USEDEP}]
+ <=dev-python/llvmlite-0.40.0
+ >=dev-python/numpy-1.18.0[${PYTHON_USEDEP}]
+ <dev-python/numpy-1.24[${PYTHON_USEDEP}]
+ threads? ( >=dev-cpp/tbb-2021.1 <dev-cpp/tbb-2021.6 )
+"
+BDEPEND="
+ dev-python/pip[${PYTHON_USEDEP}]
+ dev-python/versioneer[${PYTHON_USEDEP}]
+"
+
+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"
+ "${FILESDIR}/${PN}-0.56.4-allow-py3.11.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 "[email protected]" || 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() {
+ ${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
+}