summaryrefslogtreecommitdiff
path: root/dev-python/numpy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
commit185fa19bbf68a4d4dca534d2b46729207a177f16 (patch)
treea8a537b82fda83a0799c2ca9887f212558363aa7 /dev-python/numpy
parentc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (diff)
gentoo resync : 11.05.2021
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/Manifest7
-rw-r--r--dev-python/numpy/metadata.xml1
-rw-r--r--dev-python/numpy/numpy-1.20.3.ebuild140
3 files changed, 147 insertions, 1 deletions
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
index da3557e5929e..b05ab8a7f266 100644
--- a/dev-python/numpy/Manifest
+++ b/dev-python/numpy/Manifest
@@ -1,8 +1,13 @@
AUX numpy-1.20.1-no-hardcode-blasv2.patch 2582 BLAKE2B 5057f925a12e6703ab5d9d4c342db80f7f5a7f02a5b5884bd9fac574dcadb9234901b08b1b2ca5bc5ba0345a58e896a241e3a48b4b050b2f5a1063324359d84c SHA512 4418b9c5ed3842848bc06a56ebbd7cd9261657e407775374f2f060944522128d8a5178888def6e4cf42ff6d81082d9cc1425d9553c5334ad4e728d0df9b86bc8
AUX numpy-1.20.2-fix-ccompiler-tests.patch 1616 BLAKE2B 3e2796029854207187322b1061201e7f014472c64d8c66a2dd3f82ec2eed7311f5cc3351d98aeb4b8b75d95608853066a30394e5316bb91e443744f33d66966b SHA512 5ed01b466a0da96b5d7c56b78e420d6c589c48c20053b9da66344384fa93048f90e281d3ed5caa9325f6afe00ff48841b24abc926c75aacb8a6bd5418ed32117
DIST numpy-1.20.2.zip 7756879 BLAKE2B 8b76942e04701e164029b145fed1747de72142ea4f5a8aa7472a01caeeed5e0b5b6d9e543106f9786e231df5a8afe3b7ad9256e69873e4f8876c659114bc494e SHA512 337a66d68c965da06f757a89b58d30b83ec0b2f3c7a3bb39496e5031e50fee6c4f2ec090202c3da9a20613864ea46d032ae75af1de5c33eebe515133ef37d40c
+DIST numpy-1.20.3.zip 7761912 BLAKE2B a4da49f7c1aadca299acb1b6d92deb4f50b1881c4b131cd389524a88ffc70179b2acdc88235dccd1ffd09879893db45b16bf2f54ced9b9639b806e85f7346285 SHA512 897be1cd6f3880711149dcedd838357e2d937a3c5f36b2a0db6ceed341654acf96b8b775610e1b43bdb6eacb987bbc51aaa8906244ca02cc8c2eae359ccef405
DIST numpy-html-1.16.4.zip 12097069 BLAKE2B db1f897342fbc80a761fbaee7b0eee3761dbfa04ef6c46a137bb2392caaec8256580467ce06498cceeada2639151a1ec75dafab484d64cb897c008727d6d32a5 SHA512 c44c5e1e0cb22f9dd46fe9e302030292d85e567456178fee296746a414271634e906509fb6665ac63fbfebdd13c5383574f0aa47b4fbc639063da31addc3316a
+DIST numpy-html-1.20.3.zip 22936526 BLAKE2B 9c0bf4edea0c34640a2f2d84f117aa383f8690f5c99eb9c504aa27c07195c1e5a4219efc798398d8de709803b67d4a41a2739b1319b6dd7aeba3e70e817c2488 SHA512 181ff49fcde40f2d260e480d4a90bd8b439aecafef4ea581749b5a432c7e8c163b1714a97fd447c512b550d5bf3d9b104c575b4939eb5c8b7b70bbce1153982a
DIST numpy-ref-1.16.4.pdf 5176571 BLAKE2B 9a875ebd1473b241d463d810a6d191581aef961158f2f82959671b554ace3ad482795e4f3e1cb7dd4632cff926c1e864c675a7624fb0f4e4f297948bf50f0564 SHA512 983ba0f34a70c011886bdbc9fd8f3f75a3a967ca29217acc76fa46e7da391296a5628c9a557ac76efb393271abfb8ee4f376d401c1cc1e5c30622e54b9325d09
+DIST numpy-ref-1.20.3.pdf 7362241 BLAKE2B bf17564d7aea0db25ca9ef6b24dbbd25093c09e2a93bb60b69220d4e666024c50f3373fdb65aac510c06420dc415102d552fb0435e1986330ffdc41e9e356098 SHA512 316e645402125ca41d1e8b4da33374703f4379c31cf572c8ad429e0e89b6968776f480f9159bce53b9fdec918f03b82e5bb6446f127f43f138d6c0990191af5a
DIST numpy-user-1.16.4.pdf 596203 BLAKE2B da3ad1f0ec1c965d20656f73a970911cbb58efa73a5df89e2e6485e0dd763f483e35eea1395ac919bf35d496fb216cee954fc5d31edebc1796a24a2a7a2d12b9 SHA512 3083008547213bfa98ffa5cd8e2cea13f6947f42d83aef61502a2a852b0d5f27d727c76b42d281d7a2f4f76c78e88b12ee3d9b164b39fe1f0213ace7097357d6
+DIST numpy-user-1.20.3.pdf 4977046 BLAKE2B 3548463cc878645bb169255d3332681685d0f05e02abf4cfcdd03773826d34f5a25c020240652839867a76258b25ca601ed292462f80bdf18b92ecfb46710487 SHA512 f6c37152228eac1fb69ddfc3a37454066ed678d57f12a587e0edcfe0adb390cc0b470384c2751033f7407bac44df9f69b0da4f3da1c300e6fc02231035ff634c
EBUILD numpy-1.20.2.ebuild 3734 BLAKE2B 2a4dd063c94eb074c8ce3f60039710d4426f1f8e0be2be1419af23a791bdee32cb52aaf03084741fdb4d6a849b9e6c4f08aea3d642178361e5d1dd8329ca9f3d SHA512 541e3a324ef2f06236c78b5578a338b0084e1067b2fdd214f95bb579f706e6db91fe00513999deaffd5e7bb4736e49326c8f919e4c1b3b7b8c1dd473364032b9
-MISC metadata.xml 876 BLAKE2B 5e257d6ea3c59c5819d854db7b7db3ebff53b5c87b5ce9348786085f09db12aa6fc8fa86393b9e6c06760ac0d9f36a52fdfb1865c9d1d9ad5526d74d3d53e8b1 SHA512 d35d0954ff8f21e370edeab3ce3e5ab501bf216c93399e807ede6f1910ba0ea41359425bf894d813a39442fb92a724fe83ec8a5c64e6bd97de9422f67700d549
+EBUILD numpy-1.20.3.ebuild 3620 BLAKE2B cecd9f66ae407dfde773acab8599b03039ec5aebd4cc6d7f7595487a40b4b940ddd4d40ef73b81ee5750037204849ba1d4c22c36cc567f4124bbf041249597be SHA512 607134d85ccd121f581cbedf8f46a0adbe843193a96b9b4341adcd1d0253f154b2be19bdd4a54ab7b4c8daa8c031141d8fdf35aa0be631b0d36a89eb887f7407
+MISC metadata.xml 934 BLAKE2B 948b9a948cddc46d20d672992bf73ddb1e59ba18f470acf805c78f561249e7bce2cec1cb1affe63aad447f2f0ad627147cf05ca04ac3c321781255357de92d63 SHA512 404bc31423a1093c19dd535aa3cd5a6b925f4ef1699f9991ae19b46495c46ac4ab3b0b1995f62ea8bc5de15889b975dfcdc416360978508b837d4d5d518dfeeb
diff --git a/dev-python/numpy/metadata.xml b/dev-python/numpy/metadata.xml
index 28902614586a..d16c69eb8aaf 100644
--- a/dev-python/numpy/metadata.xml
+++ b/dev-python/numpy/metadata.xml
@@ -18,6 +18,7 @@
It is the successor of Numeric and numarray.
</longdescription>
<upstream>
+ <remote-id type="github">dev-python/numpy</remote-id>
<remote-id type="pypi">numpy</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/numpy/numpy-1.20.3.ebuild b/dev-python/numpy/numpy-1.20.3.ebuild
new file mode 100644
index 000000000000..10bbd07b87e7
--- /dev/null
+++ b/dev-python/numpy/numpy-1.20.3.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="threads(+)"
+
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs
+
+DOC_PV=${PV}
+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 ~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.21[${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}"/numpy-1.20.1-no-hardcode-blasv2.patch
+ "${FILESDIR}"/numpy-1.20.2-fix-ccompiler-tests.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() {
+ 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
+
+ # disable fuzzed tests
+ find numpy/*/tests -name '*.py' -exec sed -i \
+ -e 's:def \(.*_fuzz\):def _\1:' {} + || die
+ # very memory- and disk-hungry
+ sed -i -e 's:test_large_zip:_&:' numpy/lib/tests/test_io.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ export MAKEOPTS=-j1 #660754
+
+ distutils-r1_python_compile ${NUMPY_FCONFIG}
+}
+
+python_test() {
+ distutils_install_for_testing --single-version-externally-managed \
+ --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
+
+ cd "${TEST_DIR}/lib" || die
+ epytest
+}
+
+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
+}