summaryrefslogtreecommitdiff
path: root/dev-python/numpy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-python/numpy
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/Manifest10
-rw-r--r--dev-python/numpy/numpy-1.22.2.ebuild170
-rw-r--r--dev-python/numpy/numpy-1.22.3.ebuild170
3 files changed, 350 insertions, 0 deletions
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
index 3b08bf6264b2..955b2b0e4c34 100644
--- a/dev-python/numpy/Manifest
+++ b/dev-python/numpy/Manifest
@@ -5,16 +5,26 @@ AUX numpy-1.22.1-revert-setuptools-upper-bound.patch 875 BLAKE2B 42df9e28ee83b6a
DIST numpy-1.21.5.zip 10652289 BLAKE2B c5bded91e5d06670ea3ace51560411c61985dd89ff0455b833838320f1714cf788a21a60aefd7a0ff30ad0abb93c9d296f60e637944000efa090b6c259c1f47c SHA512 03affa9d0bbf42a8d35f5454f1527df28539e306dc2b313fa775625201a5fe9eb7376f443bba5d50e08567546708811beb7201819eeb2af5a0653b7d91249f78
DIST numpy-1.22.0.zip 11291139 BLAKE2B 91cd2188aaa59d7be18761b74865295f400e309e34bf79067493221c5f0eb875a5c726dd8e322db84fa9714800347954b6a9896aadf914e87872497f7e65527c SHA512 dcea1a6cd257f6353caccc30b2adb1cf2e9d52191ec9f968839c85b1f776ebf8c5ac8bbf0751c2c6f292ae671e4006d26eb06691ca1504e4d65baf4cec3f9803
DIST numpy-1.22.1.zip 11443674 BLAKE2B 3f2e5fbd449c078fd97670be14e87fd9bccc8418dc37f87199557642f0f951f5fd21b89eff938c30171eda3174c526db91e470e9e9cdc297b8abd9b4fe364ad5 SHA512 0d8b5ffb6f8377b3d6d6cb62fd7eef083f8a3b787542b7887e0d214c6fa78b63b6f726302bca554c0c11c57e4611926c8d8ff4abf5dd59842b8b58086391434d
+DIST numpy-1.22.2.zip 11447735 BLAKE2B 43dee4d06139822b1eec8280591ddbf6629bc8b92c5c279bf2c5e2f5b0afb4c30c2af2e783002a836280dc6affb60f51a49a37821dcf647563aa19b77aa489c8 SHA512 4ad584527d4395404c2d5d8fe5eb1aae1defac39361a987bdaa4d1f133c03fdc32c3d554c0edb544b55946f46fb3121c98526ebc1ee06e174087c727bf9b88d7
+DIST numpy-1.22.3.zip 11451867 BLAKE2B 0212cf2882410f9d9083fe40b3630733d0e407cab32c7aa10affc138e6305fdcba119a7a2d1b6c3dd5b99765d9204afa5ac8e389369ca933e779e5a647271605 SHA512 fdeefd0ffad798a078376fe16ad840551309d3bbf551eca09d92a35048ee75c3739ab0becedb23448d82999da148827e69ded8842201c3dda72b46b4eb9be93f
DIST numpy-html-1.21.0.zip 24270531 BLAKE2B 8a7a531afa559aebeb7a7b7ef94b2248df60a60fdfc190ca002dda625003df8b432fed393d6dd0c0c00fafbeb5064a61e3d99bba1a6c41e1e6e34ce091a43c89 SHA512 a165b95729a13806a03464cf39c20a0e18cfcf7701f05cd7777cd115bfaf0972f7155d201c7bd8d4177c5761f8800c982b3e3c29729a5e9ed356059842a44dcc
DIST numpy-html-1.21.5.zip 24270531 BLAKE2B 8a7a531afa559aebeb7a7b7ef94b2248df60a60fdfc190ca002dda625003df8b432fed393d6dd0c0c00fafbeb5064a61e3d99bba1a6c41e1e6e34ce091a43c89 SHA512 a165b95729a13806a03464cf39c20a0e18cfcf7701f05cd7777cd115bfaf0972f7155d201c7bd8d4177c5761f8800c982b3e3c29729a5e9ed356059842a44dcc
DIST numpy-html-1.22.1.zip 23724824 BLAKE2B 44ea3da0a703a024a629c8413dfffaf760458b185d19452da0e7e23c819e19833291e10ebd07bdda794077574b8852a368036dda8335c2753cd481740497502a SHA512 4077d9974bfd7f2c189025c3740350652e6f8e0b5727fbc9711a1c0118c1e4ecc281d4876baf1c6a5dc802d20178d6b04a2922f14e9c321cd3b68228b1e295c3
+DIST numpy-html-1.22.2.zip 23724824 BLAKE2B 44ea3da0a703a024a629c8413dfffaf760458b185d19452da0e7e23c819e19833291e10ebd07bdda794077574b8852a368036dda8335c2753cd481740497502a SHA512 4077d9974bfd7f2c189025c3740350652e6f8e0b5727fbc9711a1c0118c1e4ecc281d4876baf1c6a5dc802d20178d6b04a2922f14e9c321cd3b68228b1e295c3
+DIST numpy-html-1.22.3.zip 23724824 BLAKE2B 44ea3da0a703a024a629c8413dfffaf760458b185d19452da0e7e23c819e19833291e10ebd07bdda794077574b8852a368036dda8335c2753cd481740497502a SHA512 4077d9974bfd7f2c189025c3740350652e6f8e0b5727fbc9711a1c0118c1e4ecc281d4876baf1c6a5dc802d20178d6b04a2922f14e9c321cd3b68228b1e295c3
DIST numpy-ref-1.21.0.pdf 7326979 BLAKE2B 3c1130a576c46e0705ca1f12e7a3345beb1acdd23de2a81448e4e9755636dec313e277a0d3167dc3b211332b3fc415ac0d96e7c99e859b51a16a589426814182 SHA512 5dd37ca03f1f098fffce80aa6a1a6eb8ec66df4322da1c620bd1f507e89ee2ceb222de32c9b7974f085ddf146f0a789ea8eb27d792a13c1aa8a893c00f94f75f
DIST numpy-ref-1.21.5.pdf 7326979 BLAKE2B 3c1130a576c46e0705ca1f12e7a3345beb1acdd23de2a81448e4e9755636dec313e277a0d3167dc3b211332b3fc415ac0d96e7c99e859b51a16a589426814182 SHA512 5dd37ca03f1f098fffce80aa6a1a6eb8ec66df4322da1c620bd1f507e89ee2ceb222de32c9b7974f085ddf146f0a789ea8eb27d792a13c1aa8a893c00f94f75f
DIST numpy-ref-1.22.1.pdf 7537013 BLAKE2B 702398fddde349901f9303f4788a3ae3cc4bb78b4d310e169fcc6193fd62b33947c89ede45ba9aaea55e74f6a6abc755d3d94428adce9a8163678c6718aec2da SHA512 c1617817f94ccdfe2bbdebdc9c6869beefa1369d5ab0897c1573d8fb5cb3de153f90d5588aae84a0f498fba57ad6bc5c0c5c2c3aefb119e2913e4ddf007cc8e1
+DIST numpy-ref-1.22.2.pdf 7537013 BLAKE2B 702398fddde349901f9303f4788a3ae3cc4bb78b4d310e169fcc6193fd62b33947c89ede45ba9aaea55e74f6a6abc755d3d94428adce9a8163678c6718aec2da SHA512 c1617817f94ccdfe2bbdebdc9c6869beefa1369d5ab0897c1573d8fb5cb3de153f90d5588aae84a0f498fba57ad6bc5c0c5c2c3aefb119e2913e4ddf007cc8e1
+DIST numpy-ref-1.22.3.pdf 7537013 BLAKE2B 702398fddde349901f9303f4788a3ae3cc4bb78b4d310e169fcc6193fd62b33947c89ede45ba9aaea55e74f6a6abc755d3d94428adce9a8163678c6718aec2da SHA512 c1617817f94ccdfe2bbdebdc9c6869beefa1369d5ab0897c1573d8fb5cb3de153f90d5588aae84a0f498fba57ad6bc5c0c5c2c3aefb119e2913e4ddf007cc8e1
DIST numpy-user-1.21.0.pdf 5142404 BLAKE2B d670f1eb0f060599a640c52bdeba53b1758007fc2090a5b8fb6e135e71114149a0085811e4bc21396eabb1123ffb9edd39f8192d0165ab42dd066a9747eb3a3f SHA512 dde264abff1787efd50e913b6facf83522b3344ed88fd15d6fe73ecd44c6a3db1e4ce4251c9674bbcb122f72ab86c64142b2f4f992a6449405041f8e1f5f1ace
DIST numpy-user-1.21.5.pdf 5142404 BLAKE2B d670f1eb0f060599a640c52bdeba53b1758007fc2090a5b8fb6e135e71114149a0085811e4bc21396eabb1123ffb9edd39f8192d0165ab42dd066a9747eb3a3f SHA512 dde264abff1787efd50e913b6facf83522b3344ed88fd15d6fe73ecd44c6a3db1e4ce4251c9674bbcb122f72ab86c64142b2f4f992a6449405041f8e1f5f1ace
DIST numpy-user-1.22.1.pdf 3978348 BLAKE2B 87cc73cb1c406446eb9d86ea6cbaeac6ba13c7d2b2ffd47524483af1698c3efdfaafe61e987624c5ce01939494861413b271e9a96f49abbbe69d634b9be55c95 SHA512 8e04c0c90255038471de6ef0f8f4ed9e356d646b028bb16f667f3c59170eddaa0d86d48226462c5c17b8123b2a28a09982764979e9e76658b4e26cd0a976f3a1
+DIST numpy-user-1.22.2.pdf 3978348 BLAKE2B 87cc73cb1c406446eb9d86ea6cbaeac6ba13c7d2b2ffd47524483af1698c3efdfaafe61e987624c5ce01939494861413b271e9a96f49abbbe69d634b9be55c95 SHA512 8e04c0c90255038471de6ef0f8f4ed9e356d646b028bb16f667f3c59170eddaa0d86d48226462c5c17b8123b2a28a09982764979e9e76658b4e26cd0a976f3a1
+DIST numpy-user-1.22.3.pdf 3978348 BLAKE2B 87cc73cb1c406446eb9d86ea6cbaeac6ba13c7d2b2ffd47524483af1698c3efdfaafe61e987624c5ce01939494861413b271e9a96f49abbbe69d634b9be55c95 SHA512 8e04c0c90255038471de6ef0f8f4ed9e356d646b028bb16f667f3c59170eddaa0d86d48226462c5c17b8123b2a28a09982764979e9e76658b4e26cd0a976f3a1
EBUILD numpy-1.21.5.ebuild 4250 BLAKE2B 566a16851c2b64a2960c578dd462380573c861ce31aae4ae04f298caa7be278a1d81bb315ae45d6d616d9169ce8c83c4e8308e979149b069f7aee909ef114fa5 SHA512 73185b6fb426e2c0851796ec9487992dfc5655f7b2e862ee881e9af2b9e8121beab5b81f315c91faf287f8aa50215956f5ae9298c8a16e7ad0ba8f5fd675bc50
EBUILD numpy-1.22.0-r1.ebuild 4230 BLAKE2B 25c3b4283ea4a58cbcd8c1ef2ea539fa0d378c00a873a633bb81a40d146eb43bda016d98689e9306e4050cab65a265ad5908e8a8a3bbc755d82e42c99a68aa77 SHA512 9aeda8408565e61c7f1b18b909fac304f13b3ab59606a5f5957cc19905803b62656d3035cb7c4588ac37ca150b3d6d2fa1c06c5c882fc02b65d15b418778a750
EBUILD numpy-1.22.1.ebuild 4475 BLAKE2B ee6d48a454d685da1ee4715391c0ca9dbe4072980c09bfa9c21e217a6a94509c3172828f76f0c408ce8c6c3655842a184c1636bf3d923a2bdfb35b6f0667345a SHA512 9f2898c9ab8bb3b2a7007ebd0f7094b844c74b05f64e62418a6ac9ba27f96f7eb7bfaeb480b267f615b4406040e651f16d254afd9db4a2f3e8381e545d341f89
+EBUILD numpy-1.22.2.ebuild 4522 BLAKE2B f3dbd009337631f3f72590d4ed8e1dfd910a624ce7980ec5d20edc7673ddf887e5e18eacb9ac5c33b128beaed1901ba13fddf3ac484d11c791c8e1af3ce7baae SHA512 e32115bf9f08bb1cbe0312ad34bb2a16c98e2b5973f33ae380e7e8ede7f4e0c4943d899fa60addaceb2d563309ea6bcb73000b46291ccf5b4cf33982f8c31d10
+EBUILD numpy-1.22.3.ebuild 4528 BLAKE2B 8d2e68bf05756605080913da10c8681f8a999faf55a7b053f423d6e5db96fce7e333dbdb132aeefc7b18b76df350d04daef353bd2acfdf288ccbfcf4c497722c SHA512 726661ce0555f5471040edb3ea15b6eef9c36fe514c5f8bfc04bc1e511b34e7a0a6d5a1e62c4e3268c414a56f4b890350f01fe0e432a5bceaddcf5b6c896e176
MISC metadata.xml 930 BLAKE2B 8731116ae6d997dc77539b6ff9a8aff2466986888e3fc2c2a77499522360ba5ba11ec61e4eb6756b7cdbb9d7dafe05a862708dcc0735260e8af038a42dea3419 SHA512 1db89ba1a99457bef29a9501e2d14c11904251163172604fe58001048beb477eba5b1e4784c8636d0eb6767614b80a7341823a9d264a5663cc055a5a2c437390
diff --git a/dev-python/numpy/numpy-1.22.2.ebuild b/dev-python/numpy/numpy-1.22.2.ebuild
new file mode 100644
index 000000000000..051c5db86fe2
--- /dev/null
+++ b/dev-python/numpy/numpy-1.22.2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 flag-o-matic fortran-2 toolchain-funcs
+
+DOC_PV=${PV}
+# For when docs aren't ready yet, set to last version
+#DOC_PV=1.22.0
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="https://numpy.org/"
+SRC_URI="
+ mirror://pypi/${PN:0:1}/${PN}/${P}.zip
+ doc? (
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-html.zip -> numpy-html-${DOC_PV}.zip
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-ref.pdf -> numpy-ref-${DOC_PV}.pdf
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-user.pdf -> numpy-user-${DOC_PV}.pdf
+ )"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc lapack"
+
+RDEPEND="
+ lapack? (
+ >=virtual/cblas-3.8
+ >=virtual/lapack-3.8
+ )
+"
+BDEPEND="
+ ${RDEPEND}
+ app-arch/unzip
+ >=dev-python/cython-0.29.24[${PYTHON_USEDEP}]
+ lapack? ( virtual/pkgconfig )
+ test? (
+ >=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
+ >=dev-python/cffi-1.14.0[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.22.0-no-hardcode-blasv2.patch
+)
+
+distutils_enable_tests pytest
+
+src_unpack() {
+ default
+ if use doc; then
+ unzip -qo "${DISTDIR}"/numpy-html-${DOC_PV}.zip -d html || die
+ fi
+}
+
+python_prepare_all() {
+ # Allow use with setuptools 60.x
+ # See numpy-1.22.1-revert-setuptools-upper-bound.patch for details
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
+
+ if use lapack; then
+ local incdir="${EPREFIX}"/usr/include
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
+ cat >> site.cfg <<-EOF || die
+ [blas]
+ include_dirs = ${incdir}
+ library_dirs = ${libdir}
+ blas_libs = cblas,blas
+ [lapack]
+ library_dirs = ${libdir}
+ lapack_libs = lapack
+ EOF
+ else
+ export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
+ fi
+
+ export CC="$(tc-getCC) ${CFLAGS}"
+
+ append-flags -fno-strict-aliasing
+
+ # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
+ # with the subtle difference that we don't want to break Darwin where
+ # -shared is not a valid linker argument
+ if [[ ${CHOST} != *-darwin* ]]; then
+ append-ldflags -shared
+ fi
+
+ # only one fortran to link with:
+ # linking with cblas and lapack library will force
+ # autodetecting and linking to all available fortran compilers
+ append-fflags -fPIC
+ if use lapack; then
+ NUMPY_FCONFIG="config_fc --noopt --noarch"
+ # workaround bug 335908
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
+ fi
+
+ # don't version f2py, we will handle it.
+ sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ export MAKEOPTS=-j1 #660754
+
+ distutils-r1_python_compile ${NUMPY_FCONFIG}
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # very disk- and memory-hungry
+ numpy/lib/tests/test_io.py::test_large_zip
+
+ # precision problems
+ numpy/core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_transcendentals
+
+ # runs the whole test suite recursively, that's just crazy
+ numpy/core/tests/test_mem_policy.py::test_new_policy
+
+ # very slow, unlikely to be practically useful
+ numpy/typing/tests/test_typing.py
+ )
+
+ if use arm && [[ $(uname -m || echo "unknown") == "armv8l" ]] ; then
+ # Degenerate case. arm32 chroot on arm64.
+ # bug #774108
+ EPYTEST_DESELECT+=(
+ numpy/core/tests/test_cpu_features.py::Test_ARM_Features::test_features
+ )
+ fi
+
+ if use x86 ; then
+ EPYTEST_DESELECT+=(
+ # https://github.com/numpy/numpy/issues/18388
+ numpy/core/tests/test_umath.py::TestRemainder::test_float_remainder_overflow
+ # https://github.com/numpy/numpy/issues/18387
+ numpy/random/tests/test_generator_mt19937.py::TestRandomDist::test_pareto
+ )
+ fi
+
+ distutils_install_for_testing --single-version-externally-managed \
+ --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
+
+ cd "${TEST_DIR}/lib" || die
+ epytest -k "not _fuzz"
+}
+
+python_install() {
+ # https://github.com/numpy/numpy/issues/16005
+ local mydistutilsargs=( build_src )
+ distutils-r1_python_install ${NUMPY_FCONFIG}
+ python_optimize
+}
+
+python_install_all() {
+ local DOCS=( LICENSE.txt README.md THANKS.txt )
+
+ if use doc; then
+ local HTML_DOCS=( "${WORKDIR}"/html/. )
+ DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
+ fi
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/numpy/numpy-1.22.3.ebuild b/dev-python/numpy/numpy-1.22.3.ebuild
new file mode 100644
index 000000000000..677b3ea8106b
--- /dev/null
+++ b/dev-python/numpy/numpy-1.22.3.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 flag-o-matic fortran-2 toolchain-funcs
+
+DOC_PV=${PV}
+# For when docs aren't ready yet, set to last version
+#DOC_PV=1.22.0
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="https://numpy.org/"
+SRC_URI="
+ mirror://pypi/${PN:0:1}/${PN}/${P}.zip
+ doc? (
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-html.zip -> numpy-html-${DOC_PV}.zip
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-ref.pdf -> numpy-ref-${DOC_PV}.pdf
+ https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-user.pdf -> numpy-user-${DOC_PV}.pdf
+ )"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc lapack"
+
+RDEPEND="
+ lapack? (
+ >=virtual/cblas-3.8
+ >=virtual/lapack-3.8
+ )
+"
+BDEPEND="
+ ${RDEPEND}
+ app-arch/unzip
+ >=dev-python/cython-0.29.24[${PYTHON_USEDEP}]
+ lapack? ( virtual/pkgconfig )
+ test? (
+ >=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
+ >=dev-python/cffi-1.14.0[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.22.0-no-hardcode-blasv2.patch
+)
+
+distutils_enable_tests pytest
+
+src_unpack() {
+ default
+ if use doc; then
+ unzip -qo "${DISTDIR}"/numpy-html-${DOC_PV}.zip -d html || die
+ fi
+}
+
+python_prepare_all() {
+ # Allow use with setuptools 60.x
+ # See numpy-1.22.1-revert-setuptools-upper-bound.patch for details
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
+
+ if use lapack; then
+ local incdir="${EPREFIX}"/usr/include
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
+ cat >> site.cfg <<-EOF || die
+ [blas]
+ include_dirs = ${incdir}
+ library_dirs = ${libdir}
+ blas_libs = cblas,blas
+ [lapack]
+ library_dirs = ${libdir}
+ lapack_libs = lapack
+ EOF
+ else
+ export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
+ fi
+
+ export CC="$(tc-getCC) ${CFLAGS}"
+
+ append-flags -fno-strict-aliasing
+
+ # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
+ # with the subtle difference that we don't want to break Darwin where
+ # -shared is not a valid linker argument
+ if [[ ${CHOST} != *-darwin* ]]; then
+ append-ldflags -shared
+ fi
+
+ # only one fortran to link with:
+ # linking with cblas and lapack library will force
+ # autodetecting and linking to all available fortran compilers
+ append-fflags -fPIC
+ if use lapack; then
+ NUMPY_FCONFIG="config_fc --noopt --noarch"
+ # workaround bug 335908
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
+ fi
+
+ # don't version f2py, we will handle it.
+ sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ export MAKEOPTS=-j1 #660754
+
+ distutils-r1_python_compile ${NUMPY_FCONFIG}
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # very disk- and memory-hungry
+ numpy/lib/tests/test_io.py::test_large_zip
+
+ # precision problems
+ numpy/core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_transcendentals
+
+ # runs the whole test suite recursively, that's just crazy
+ numpy/core/tests/test_mem_policy.py::test_new_policy
+
+ # very slow, unlikely to be practically useful
+ numpy/typing/tests/test_typing.py
+ )
+
+ if use arm && [[ $(uname -m || echo "unknown") == "armv8l" ]] ; then
+ # Degenerate case. arm32 chroot on arm64.
+ # bug #774108
+ EPYTEST_DESELECT+=(
+ numpy/core/tests/test_cpu_features.py::Test_ARM_Features::test_features
+ )
+ fi
+
+ if use x86 ; then
+ EPYTEST_DESELECT+=(
+ # https://github.com/numpy/numpy/issues/18388
+ numpy/core/tests/test_umath.py::TestRemainder::test_float_remainder_overflow
+ # https://github.com/numpy/numpy/issues/18387
+ numpy/random/tests/test_generator_mt19937.py::TestRandomDist::test_pareto
+ )
+ fi
+
+ distutils_install_for_testing --single-version-externally-managed \
+ --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
+
+ cd "${TEST_DIR}/lib" || die
+ epytest -k "not _fuzz"
+}
+
+python_install() {
+ # https://github.com/numpy/numpy/issues/16005
+ local mydistutilsargs=( build_src )
+ distutils-r1_python_install ${NUMPY_FCONFIG}
+ python_optimize
+}
+
+python_install_all() {
+ local DOCS=( LICENSE.txt README.md THANKS.txt )
+
+ if use doc; then
+ local HTML_DOCS=( "${WORKDIR}"/html/. )
+ DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
+ fi
+
+ distutils-r1_python_install_all
+}