Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/numpy/
Date: Thu, 04 Jun 2020 06:24:09
Message-Id: 1591251830.54a7cd95270d1bbc6069b2128a57fd52e02d7d29.mgorny@gentoo
1 commit: 54a7cd95270d1bbc6069b2128a57fd52e02d7d29
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 4 05:55:04 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 4 06:23:50 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54a7cd95
7
8 dev-python/numpy: Bump to 1.18.5
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/numpy/Manifest | 1 +
13 dev-python/numpy/numpy-1.18.5.ebuild | 145 +++++++++++++++++++++++++++++++++++
14 2 files changed, 146 insertions(+)
15
16 diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
17 index f633ce3aed9..6c8f53d39a2 100644
18 --- a/dev-python/numpy/Manifest
19 +++ b/dev-python/numpy/Manifest
20 @@ -1,6 +1,7 @@
21 DIST numpy-1.16.5.zip 5138208 BLAKE2B f5511650e66939a6ce21cfad7874aecdeb6c07a70b32419a808956e42c7819d82bb364f1632da91b4d8a5237001c8ae3cbdcac10651fa0acca9558bdeafb5437 SHA512 6dd790ff57fdb7e7b0bddb47ea2b70b2667edefe632548ec68934e12a16af4a51bed9726e495c4993aad4c448dc4a204d0a087577d43dcfc9fa0164eb1d4b898
22 DIST numpy-1.17.4.zip 6366657 BLAKE2B 89f729bb0740fa721dfe8d1165094a96302fde1e8c272689c11cb4a9bb39d11afaf6eda3ded8a370333b47b9d1ee25e8cb0a602c8cf44964612342c50ea5824f SHA512 f3264be7152437d71718da4728222962013ebd7fe02288d5063f1c763d1c4eee26485c27e8088f4dff79a4d491bc9f191849748c6007d093d22e89c6bff317f3
23 DIST numpy-1.18.3.zip 5435268 BLAKE2B aaf14627ca24e27806e6a5498a8b91f85c2582794db2ef2ec315e88b107435aeb2e8f288c68ba00593150787d6deb887faa029f850df4c6cb65426499f7ee83f SHA512 afb14dec81ade556e10b7de372e9d7b01b4bf246609c5eea26ad76ce93e6d9caa95479ae70dbfb725f28ac4802f94203c92e1e991852d2866b5225fc9d68e68d
24 +DIST numpy-1.18.5.zip 5441636 BLAKE2B d11bbf3c38a4194942d024ef82d63aa80a3d9044480a54e1b25d57b26f4dd7936b8ddd9c8b2636e307392c96fc51cb687e7a0e32ea7df9c85d46d80be45bdb46 SHA512 ea1896535016d3b207152c503005bf82095cc82c263f7f32ea75ce2d9394724f9700cf2265f9fb1f38169c37a0fe63ef97e88f84637f11758c52c624eec3d141
25 DIST numpy-html-1.16.4.zip 12097069 BLAKE2B db1f897342fbc80a761fbaee7b0eee3761dbfa04ef6c46a137bb2392caaec8256580467ce06498cceeada2639151a1ec75dafab484d64cb897c008727d6d32a5 SHA512 c44c5e1e0cb22f9dd46fe9e302030292d85e567456178fee296746a414271634e906509fb6665ac63fbfebdd13c5383574f0aa47b4fbc639063da31addc3316a
26 DIST numpy-ref-1.16.4.pdf 5176571 BLAKE2B 9a875ebd1473b241d463d810a6d191581aef961158f2f82959671b554ace3ad482795e4f3e1cb7dd4632cff926c1e864c675a7624fb0f4e4f297948bf50f0564 SHA512 983ba0f34a70c011886bdbc9fd8f3f75a3a967ca29217acc76fa46e7da391296a5628c9a557ac76efb393271abfb8ee4f376d401c1cc1e5c30622e54b9325d09
27 DIST numpy-user-1.16.4.pdf 596203 BLAKE2B da3ad1f0ec1c965d20656f73a970911cbb58efa73a5df89e2e6485e0dd763f483e35eea1395ac919bf35d496fb216cee954fc5d31edebc1796a24a2a7a2d12b9 SHA512 3083008547213bfa98ffa5cd8e2cea13f6947f42d83aef61502a2a852b0d5f27d727c76b42d281d7a2f4f76c78e88b12ee3d9b164b39fe1f0213ace7097357d6
28
29 diff --git a/dev-python/numpy/numpy-1.18.5.ebuild b/dev-python/numpy/numpy-1.18.5.ebuild
30 new file mode 100644
31 index 00000000000..eb27fd1bee0
32 --- /dev/null
33 +++ b/dev-python/numpy/numpy-1.18.5.ebuild
34 @@ -0,0 +1,145 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PYTHON_COMPAT=( python3_{6..9} )
41 +PYTHON_REQ_USE="threads(+)"
42 +
43 +FORTRAN_NEEDED=lapack
44 +
45 +DISTUTILS_USE_SETUPTOOLS=rdepend
46 +
47 +inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs
48 +
49 +DOC_PV="1.16.4"
50 +DESCRIPTION="Fast array and numerical python library"
51 +HOMEPAGE="https://www.numpy.org"
52 +SRC_URI="
53 + mirror://pypi/${PN:0:1}/${PN}/${P}.zip
54 + doc? (
55 + https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-html.zip -> numpy-html-${DOC_PV}.zip
56 + https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-ref.pdf -> numpy-ref-${DOC_PV}.pdf
57 + https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-user.pdf -> numpy-user-${DOC_PV}.pdf
58 + )"
59 +LICENSE="BSD"
60 +SLOT="0"
61 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
62 +IUSE="doc lapack"
63 +
64 +RDEPEND="
65 + lapack? (
66 + >=virtual/cblas-3.8
67 + >=virtual/lapack-3.8
68 + )
69 +"
70 +BDEPEND="
71 + ${RDEPEND}
72 + app-arch/unzip
73 + >=dev-python/cython-0.29.15[${PYTHON_USEDEP}]
74 + lapack? ( virtual/pkgconfig )
75 + test? (
76 + >=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
77 + >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
78 + >=dev-python/cffi-1.14.0[${PYTHON_USEDEP}]
79 + )
80 +"
81 +
82 +PATCHES=(
83 + "${FILESDIR}"/${PN}-1.17.4-no-hardcode-blasv2.patch
84 +)
85 +
86 +distutils_enable_tests pytest
87 +
88 +src_unpack() {
89 + default
90 + if use doc; then
91 + unzip -qo "${DISTDIR}"/numpy-html-${DOC_PV}.zip -d html || die
92 + fi
93 +}
94 +
95 +python_prepare_all() {
96 + if use lapack; then
97 + local incdir="${EPREFIX}"/usr/include
98 + local libdir="${EPREFIX}"/usr/$(get_libdir)
99 + cat >> site.cfg <<-EOF || die
100 + [blas]
101 + include_dirs = ${incdir}
102 + library_dirs = ${libdir}
103 + blas_libs = cblas,blas
104 + [lapack]
105 + library_dirs = ${libdir}
106 + lapack_libs = lapack
107 + EOF
108 + else
109 + export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
110 + fi
111 +
112 + export CC="$(tc-getCC) ${CFLAGS}"
113 +
114 + append-flags -fno-strict-aliasing
115 +
116 + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
117 + # with the subtle difference that we don't want to break Darwin where
118 + # -shared is not a valid linker argument
119 + if [[ ${CHOST} != *-darwin* ]]; then
120 + append-ldflags -shared
121 + fi
122 +
123 + # only one fortran to link with:
124 + # linking with cblas and lapack library will force
125 + # autodetecting and linking to all available fortran compilers
126 + append-fflags -fPIC
127 + if use lapack; then
128 + NUMPY_FCONFIG="config_fc --noopt --noarch"
129 + # workaround bug 335908
130 + [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
131 + fi
132 +
133 + # don't version f2py, we will handle it.
134 + sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
135 +
136 + # disable fuzzed tests
137 + find numpy/*/tests -name '*.py' -exec sed -i \
138 + -e 's:def \(.*_fuzz\):def _\1:' {} + || die
139 + # very memory- and disk-hungry
140 + sed -i -e 's:test_large_zip:_&:' numpy/lib/tests/test_io.py || die
141 +
142 + distutils-r1_python_prepare_all
143 +}
144 +
145 +python_compile() {
146 + export MAKEOPTS=-j1 #660754
147 +
148 + distutils-r1_python_compile ${NUMPY_FCONFIG}
149 +}
150 +
151 +python_test() {
152 + distutils_install_for_testing --single-version-externally-managed \
153 + --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
154 +
155 + cd "${TMPDIR}" || die
156 +
157 + "${EPYTHON}" -c "
158 +import numpy, sys
159 +r = numpy.test(label='full', verbose=3)
160 +sys.exit(0 if r else 1)" || die "Tests fail with ${EPYTHON}"
161 +}
162 +
163 +python_install() {
164 + # https://github.com/numpy/numpy/issues/16005
165 + local mydistutilsargs=( build_src )
166 + distutils-r1_python_install ${NUMPY_FCONFIG}
167 + python_optimize
168 +}
169 +
170 +python_install_all() {
171 + local DOCS=( LICENSE.txt README.md THANKS.txt )
172 +
173 + if use doc; then
174 + local HTML_DOCS=( "${WORKDIR}"/html/. )
175 + DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
176 + fi
177 +
178 + distutils-r1_python_install_all
179 +}