commit:     637367f767d4b193c29897bafa8aa51788a7f09e
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  5 14:53:22 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Jun  5 15:10:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=637367f7

dev-python/numexpr: add version 2.7.3, enable py3.10

Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/numexpr/Manifest             |  1 +
 dev-python/numexpr/numexpr-2.7.3.ebuild | 48 +++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/dev-python/numexpr/Manifest b/dev-python/numexpr/Manifest
index 062ed0316ca..e7aa2857e37 100644
--- a/dev-python/numexpr/Manifest
+++ b/dev-python/numexpr/Manifest
@@ -1 +1,2 @@
 DIST numexpr-2.7.2.r1.gh.tar.gz 119099 BLAKE2B 
d424dd89761ecdad3e5a35a5c8b41f089c6eb7c9ca10a4309fb489bb7ab60c0b77863c1675583014265c057e27f3b9584a35e0ac6232044ed5f8b8c32fd330d6
 SHA512 
d786aeb3597a6b2196e92f364934a0bbc518c7973252c38f1e93c317d55220270b5d61320d7a465c87da979ec68e988b25182d527e0e96aa3a898f20a6997802
+DIST numexpr-2.7.3.tar.gz 114113 BLAKE2B 
95dca4fbd3148bbf198f82827a63fac3e9de29f677457f2ad45040e24a38bb05e4e09738efa0cac793970e18bdcd252e2744da96062217fd35b4054b10112989
 SHA512 
8234a65ce96ea0a2f20cce7dce3de652362a9edc86af2e7a333cdd8ecd87866f75970859ff39b04d529acc062b806cc8c64f262c318edd2897200d7e54b429e7

diff --git a/dev-python/numexpr/numexpr-2.7.3.ebuild 
b/dev-python/numexpr/numexpr-2.7.3.ebuild
new file mode 100644
index 00000000000..78f0a10f547
--- /dev/null
+++ b/dev-python/numexpr/numexpr-2.7.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Fast numerical array expression evaluator for Python and NumPy"
+HOMEPAGE="https://github.com/pydata/numexpr";
+SRC_URI="https://github.com/pydata/numexpr/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="mkl"
+
+RDEPEND="
+       >=dev-python/numpy-1.6[${PYTHON_USEDEP}]
+       mkl? ( sci-libs/mkl )
+"
+
+python_prepare_all() {
+       # TODO: mkl can be used but it fails for me
+       # only works with mkl in tree. newer mkl will use pkgconfig
+       if use mkl; then
+               use amd64 && local ext="_lp64"
+               cat > site.cfg <<- _EOF_ || die
+                       [mkl]
+                       library_dirs = ${MKLROOT}/lib/em64t
+                       include_dirs = ${MKLROOT}/include
+                       mkl_libs = mkl_solver${ext}, mkl_intel${ext}, \
+                       mkl_intel_thread, mkl_core, iomp5
+               _EOF_
+       fi
+
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       pushd "${BUILD_DIR}"/lib >/dev/null || die
+       "${EPYTHON}" \
+               -c "import sys,numexpr; sys.exit(0 if 
numexpr.test().wasSuccessful() else 1)" \
+               || die
+       pushd >/dev/null || die
+}

Reply via email to