Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/numpy/
Date: Tue, 15 Dec 2015 15:46:42
Message-Id: 1450194394.0280d4a259b2cb4393da0fb377422a667e611d73.jlec@gentoo
1 commit: 0280d4a259b2cb4393da0fb377422a667e611d73
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 15 15:46:10 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 15 15:46:34 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0280d4a2
7
8 dev-python/numpy: Version Bump
9
10 fixes performance regressions
11
12 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=567938
13
14 Package-Manager: portage-2.2.26
15 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
16
17 dev-python/numpy/Manifest | 1 +
18 dev-python/numpy/numpy-1.10.2.ebuild | 155 +++++++++++++++++++++++++++++++++++
19 dev-python/numpy/numpy-9999.ebuild | 138 +++++++++++++++++++++++++++++++
20 3 files changed, 294 insertions(+)
21
22 diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
23 index 6baec64..2ec2993 100644
24 --- a/dev-python/numpy/Manifest
25 +++ b/dev-python/numpy/Manifest
26 @@ -1,4 +1,5 @@
27 DIST numpy-1.10.1.tar.gz 4048478 SHA256 8b9f453f29ce96a14e625100d3dcf8926301d36c5f622623bf8820e748510858 SHA512 ea717bac913a8e63bf93822bddbfe7701a3de00051bf3c7020f5e22756987becb5a2f96a6a52a36fc7c2b856815a782e450099688ce86b21fa94b0076b9ef376 WHIRLPOOL 7671368bec55c7f53ffa78a509946acc998e6f4223da4f3429b82a5a38b5e0277a0f89773ec2335f8e46b5c695620a4119af5ab59734184054c31b11841de44b
28 +DIST numpy-1.10.2.tar.gz 4055005 SHA256 23a3befdf955db4d616f8bb77b324680a80a323e0c42a7e8d7388ef578d8ffa9 SHA512 040db49593f3c53c9b43301eacffc3b5817310f1dbb91fd650efcf5ba65ce7e217549dc5268bc56846f19f1a03dd19470989005aa176531af44d602b3546b007 WHIRLPOOL 30c4b365aac6623241afd72fc30d3a543183205eb23db1366937e39fc50dee862923dd249775fee67cce0199940a57ec1423f1cb0e65ff7c65764c7969d7a76f
29 DIST numpy-1.8.2.tar.gz 3792998 SHA256 6d487fc724780d66746bde264ea71f5cd77d3a39e52ee2b073dcaed63bc669db SHA512 996e6b8e2d42f223e44660f56bf73eb8ab124f400d89218f8f5e4d7c9860ada44a4d7c54526137b0695c7a10f36e8834fbf0d42b7cb20bcdb5d5c245d673385c WHIRLPOOL 0d3a05b1e3c0a1ceb0a7b4818406dbb45506e5f25bc2727d4ff44cc0a0520e6556b3c68ae24dbca37ba9d67ae2defbb3ff9c906d4c2635b29ed44452d70e8311
30 DIST numpy-1.9.2.tar.gz 3986067 SHA256 325e5f2b0b434ecb6e6882c7e1034cc6cdde3eeeea87dbc482575199a6aeef2a SHA512 70470ebb9afef5dfd0c83ceb7a9d5f1b7a072b1a9b54b04f04f5ed50fbaedd5b4906bd500472268d478f94df9e749a88698b1ff30f2d80258e7f3fec040617d9 WHIRLPOOL 59f5dc52cb95c7ce80fec3a7feac6cfda1d149596bf6d95c18bd8314e31a8df494b2b470c4cc3d8c296c9fc11c718d70d5b9b5344337175ca75496504c0fd201
31 DIST numpy-1.9.3.tar.gz 3984430 SHA256 c3b74d3b9da4ceb11f66abd21e117da8cf584b63a0efbd01a9b7e91b693fbbd6 SHA512 32531cd8d1480a50812454ef8e3b68c0f84b2a4bc5de0df1457070db7f6fd94cdb50e6479a85fa4d1dc569a10d28f6864d5069fcf2a32fa20fa8803476a3df8c WHIRLPOOL a0235594e793625d5e3cef57956f4710587158885f39d7d1267c9845b12fb1d39fb9987ec095720c2d285c7c726383a15471f3629b739b77186470e2c40ba093
32
33 diff --git a/dev-python/numpy/numpy-1.10.2.ebuild b/dev-python/numpy/numpy-1.10.2.ebuild
34 new file mode 100644
35 index 0000000..79f9a89
36 --- /dev/null
37 +++ b/dev-python/numpy/numpy-1.10.2.ebuild
38 @@ -0,0 +1,155 @@
39 +# Copyright 1999-2015 Gentoo Foundation
40 +# Distributed under the terms of the GNU General Public License v2
41 +# $Id$
42 +
43 +EAPI=5
44 +
45 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
46 +PYTHON_REQ_USE="threads(+)"
47 +
48 +FORTRAN_NEEDED=lapack
49 +
50 +inherit distutils-r1 eutils flag-o-matic fortran-2 multilib multiprocessing toolchain-funcs versionator
51 +
52 +DOC_PV="1.9.1"
53 +DOC_P="${PN}-${DOC_PV}"
54 +
55 +DESCRIPTION="Fast array and numerical python library"
56 +HOMEPAGE="http://www.numpy.org/"
57 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
58 + doc? (
59 + http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
60 + http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
61 + http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
62 + )"
63 +# It appears the docs haven't been upgraded, still @ 1.8.1
64 +LICENSE="BSD"
65 +SLOT="0"
66 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
67 +IUSE="doc lapack test"
68 +
69 +RDEPEND="
70 + dev-python/setuptools[${PYTHON_USEDEP}]
71 + lapack? ( virtual/cblas virtual/lapack )"
72 +DEPEND="${RDEPEND}
73 + doc? ( app-arch/unzip )
74 + lapack? ( virtual/pkgconfig )
75 + test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
76 +
77 +# Uses distutils.command.config.
78 +DISTUTILS_IN_SOURCE_BUILD=1
79 +
80 +PATCHES=(
81 + "${FILESDIR}"/${PN}-1.9.2-no-hardcode-blas.patch
82 +)
83 +
84 +src_unpack() {
85 + default
86 + if use doc; then
87 + unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
88 + fi
89 +}
90 +
91 +pc_incdir() {
92 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
93 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
94 +}
95 +
96 +pc_libdir() {
97 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
98 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
99 +}
100 +
101 +pc_libs() {
102 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
103 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
104 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
105 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
106 +}
107 +
108 +python_prepare_all() {
109 + if use lapack; then
110 + append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
111 + local libdir="${EPREFIX}"/usr/$(get_libdir)
112 + cat >> site.cfg <<-EOF
113 + [blas]
114 + include_dirs = $(pc_incdir cblas)
115 + library_dirs = $(pc_libdir cblas blas):${libdir}
116 + blas_libs = $(pc_libs cblas blas)
117 + [lapack]
118 + library_dirs = $(pc_libdir lapack):${libdir}
119 + lapack_libs = $(pc_libs lapack)
120 + EOF
121 + else
122 + export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
123 + fi
124 +
125 + export CC="$(tc-getCC) ${CFLAGS}"
126 +
127 + append-flags -fno-strict-aliasing
128 +
129 + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
130 + # with the subtle difference that we don't want to break Darwin where
131 + # -shared is not a valid linker argument
132 + if [[ ${CHOST} != *-darwin* ]]; then
133 + append-ldflags -shared
134 + fi
135 +
136 + # only one fortran to link with:
137 + # linking with cblas and lapack library will force
138 + # autodetecting and linking to all available fortran compilers
139 + append-fflags -fPIC
140 + if use lapack; then
141 + NUMPY_FCONFIG="config_fc --noopt --noarch"
142 + # workaround bug 335908
143 + [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
144 + fi
145 +
146 + # don't version f2py, we will handle it.
147 + sed -i -e '/f2py_exe/s:+os\.path.*$::' numpy/f2py/setup.py || die
148 +
149 + # we don't have f2py-3.3
150 + sed \
151 + -e "/f2py_cmd/s:'f2py'.*:'f2py':g" \
152 + -i numpy/tests/test_scripts.py || die
153 +
154 + sed \
155 + -e "s:\"cblas\":\"$(pc_libs cblas)\":g" \
156 + -i numpy/distutils/system_info.py || die
157 +
158 + distutils-r1_python_prepare_all
159 +}
160 +
161 +python_compile() {
162 + distutils-r1_python_compile -j $(makeopts_jobs) ${NUMPY_FCONFIG}
163 +}
164 +
165 +python_test() {
166 + distutils_install_for_testing ${NUMPY_FCONFIG}
167 +
168 + cd "${TMPDIR}" || die
169 + ${EPYTHON} -c "
170 +import numpy, sys
171 +r = numpy.test(label='full', verbose=3)
172 +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
173 +}
174 +
175 +python_install() {
176 + distutils-r1_python_install ${NUMPY_FCONFIG}
177 +}
178 +
179 +python_install_all() {
180 + distutils-r1_python_install_all
181 +
182 + dodoc COMPATIBILITY DEV_README.txt THANKS.txt
183 +
184 + if use doc; then
185 + dohtml -r "${WORKDIR}"/html/*
186 + dodoc "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
187 + fi
188 +
189 + # absent in 1.9
190 + #docinto f2py
191 + #dodoc numpy/f2py/docs/*.txt
192 + #doman numpy/f2py/f2py.1
193 +}
194
195 diff --git a/dev-python/numpy/numpy-9999.ebuild b/dev-python/numpy/numpy-9999.ebuild
196 new file mode 100644
197 index 0000000..e170cb9
198 --- /dev/null
199 +++ b/dev-python/numpy/numpy-9999.ebuild
200 @@ -0,0 +1,138 @@
201 +# Copyright 1999-2015 Gentoo Foundation
202 +# Distributed under the terms of the GNU General Public License v2
203 +# $Id$
204 +
205 +EAPI=5
206 +
207 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
208 +PYTHON_REQ_USE="threads(+)"
209 +
210 +FORTRAN_NEEDED=lapack
211 +
212 +inherit distutils-r1 eutils flag-o-matic fortran-2 git-r3 multilib multiprocessing toolchain-funcs versionator
213 +
214 +DOC_PV="1.9.1"
215 +DOC_P="${PN}-${DOC_PV}"
216 +
217 +DESCRIPTION="Fast array and numerical python library"
218 +HOMEPAGE="http://www.numpy.org/"
219 +SRC_URI=""
220 +EGIT_REPO_URI="https://github.com/numpy/numpy.git"
221 +
222 +LICENSE="BSD"
223 +SLOT="0"
224 +KEYWORDS=""
225 +IUSE="lapack test"
226 +
227 +RDEPEND="
228 + dev-python/setuptools[${PYTHON_USEDEP}]
229 + lapack? ( virtual/cblas virtual/lapack )"
230 +DEPEND="${RDEPEND}
231 + lapack? ( virtual/pkgconfig )
232 + test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
233 +
234 +# Uses distutils.command.config.
235 +DISTUTILS_IN_SOURCE_BUILD=1
236 +
237 +PATCHES=(
238 + "${FILESDIR}"/${PN}-1.9.2-no-hardcode-blas.patch
239 +)
240 +
241 +pc_incdir() {
242 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
243 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
244 +}
245 +
246 +pc_libdir() {
247 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
248 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
249 +}
250 +
251 +pc_libs() {
252 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
253 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
254 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
255 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
256 +}
257 +
258 +python_prepare_all() {
259 + if use lapack; then
260 + append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
261 + local libdir="${EPREFIX}"/usr/$(get_libdir)
262 + cat >> site.cfg <<-EOF
263 + [blas]
264 + include_dirs = $(pc_incdir cblas)
265 + library_dirs = $(pc_libdir cblas blas):${libdir}
266 + blas_libs = $(pc_libs cblas blas)
267 + [lapack]
268 + library_dirs = $(pc_libdir lapack):${libdir}
269 + lapack_libs = $(pc_libs lapack)
270 + EOF
271 + else
272 + export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
273 + fi
274 +
275 + export CC="$(tc-getCC) ${CFLAGS}"
276 +
277 + append-flags -fno-strict-aliasing
278 +
279 + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
280 + # with the subtle difference that we don't want to break Darwin where
281 + # -shared is not a valid linker argument
282 + if [[ ${CHOST} != *-darwin* ]]; then
283 + append-ldflags -shared
284 + fi
285 +
286 + # only one fortran to link with:
287 + # linking with cblas and lapack library will force
288 + # autodetecting and linking to all available fortran compilers
289 + append-fflags -fPIC
290 + if use lapack; then
291 + NUMPY_FCONFIG="config_fc --noopt --noarch"
292 + # workaround bug 335908
293 + [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
294 + fi
295 +
296 + # don't version f2py, we will handle it.
297 + sed -i -e '/f2py_exe/s:+os\.path.*$::' numpy/f2py/setup.py || die
298 +
299 + # we don't have f2py-3.3
300 + sed \
301 + -e "/f2py_cmd/s:'f2py'.*:'f2py':g" \
302 + -i numpy/tests/test_scripts.py || die
303 +
304 + sed \
305 + -e "s:\"cblas\":\"$(pc_libs cblas)\":g" \
306 + -i numpy/distutils/system_info.py || die
307 +
308 + distutils-r1_python_prepare_all
309 +}
310 +
311 +python_compile() {
312 + distutils-r1_python_compile -j $(makeopts_jobs) ${NUMPY_FCONFIG}
313 +}
314 +
315 +python_test() {
316 + distutils_install_for_testing ${NUMPY_FCONFIG}
317 +
318 + cd "${TMPDIR}" || die
319 + ${EPYTHON} -c "
320 +import numpy, sys
321 +r = numpy.test(label='full', verbose=3)
322 +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
323 +}
324 +
325 +python_install() {
326 + distutils-r1_python_install ${NUMPY_FCONFIG}
327 +}
328 +
329 +python_install_all() {
330 + distutils-r1_python_install_all
331 +
332 + dodoc COMPATIBILITY DEV_README.txt THANKS.txt
333 +
334 + # absent in 1.9
335 + #docinto f2py
336 + #dodoc numpy/f2py/docs/*.txt
337 + #doman numpy/f2py/f2py.1
338 +}