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: Sun, 11 Oct 2015 07:05:38
Message-Id: 1444547116.254104a98827e53e09b2da563d77091dbd4ad0d9.jlec@gentoo
1 commit: 254104a98827e53e09b2da563d77091dbd4ad0d9
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 10 19:06:52 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 07:05:16 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=254104a9
7
8 dev-python/numpy: Version Bump
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/numpy/Manifest | 1 +
14 dev-python/numpy/numpy-1.10.0_p2.ebuild | 154 ++++++++++++++++++++++++++++++++
15 2 files changed, 155 insertions(+)
16
17 diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
18 index 330b8dd..888858f 100644
19 --- a/dev-python/numpy/Manifest
20 +++ b/dev-python/numpy/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST numpy-1.10.0.post2.tar.gz 4082399 SHA256 2ebd29edb2f1a4a19e86cfc27c1b2283314d57509b2bfc6606b4f05d620c230b SHA512 60a4fc0ed07b8944cf7994c2fcf24eae49c659cc387d5dd5c824054fd82d9542bb07afa34a89a71bdb4a52a33b00f6eff845b611b12cf147a52308fa517730b0 WHIRLPOOL 855c6a0026c7d23d212b94beda676d191752ff22ff58305bc7a460513bfa19bc32e561ceb6d38b94065c3e7e315a7341840bf21c5ca7c748befb53af221a969a
23 DIST numpy-1.8.0.tar.gz 3779617 SHA256 2764d0819acc77e9ff81b060fe7f69530b0d85c26ac9d162639b787cb227d253 SHA512 ec3d002ed786335e8748983261c96f88a9f1520fc345ad5b810dc02a5e126e15fe5afb02bed1f4b43d580a1da39583d86b84f57dc456b0702653e34e5357c857 WHIRLPOOL 8796d90795ddec62e6d72be433ea00917a63ef39cf3fe81e094f653e1863b69ecdce812995877f78e4324434141b03e2ceb3f872ed4e023b19c6bd9bcc294ac2
24 DIST numpy-1.8.1.tar.gz 3794076 SHA256 3d722fc3ac922a34c50183683e828052cd9bb7e9134a95098441297d7ea1c7a9 SHA512 39ef9e13f8681a2c2ba3d74ab96fd28c5669e653308fd1549f262921814fa7c276ce6d9fb65ef135006584c608bdf3db198d43f66c9286fc7b3c79803dbc1f57 WHIRLPOOL 10615c0c70c153156034447e9c3f2b70b0259173a44af3b5cc641dd31c0af71ef1053a9cc7938deff5edb899ae2666b2b3109491d7394f03d1a81cb19722d398
25 DIST numpy-1.8.2.tar.gz 3792998 SHA256 6d487fc724780d66746bde264ea71f5cd77d3a39e52ee2b073dcaed63bc669db SHA512 996e6b8e2d42f223e44660f56bf73eb8ab124f400d89218f8f5e4d7c9860ada44a4d7c54526137b0695c7a10f36e8834fbf0d42b7cb20bcdb5d5c245d673385c WHIRLPOOL 0d3a05b1e3c0a1ceb0a7b4818406dbb45506e5f25bc2727d4ff44cc0a0520e6556b3c68ae24dbca37ba9d67ae2defbb3ff9c906d4c2635b29ed44452d70e8311
26
27 diff --git a/dev-python/numpy/numpy-1.10.0_p2.ebuild b/dev-python/numpy/numpy-1.10.0_p2.ebuild
28 new file mode 100644
29 index 0000000..f7fdd3d
30 --- /dev/null
31 +++ b/dev-python/numpy/numpy-1.10.0_p2.ebuild
32 @@ -0,0 +1,154 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=5
38 +
39 +PYTHON_COMPAT=( python2_7 python3_{3,4} )
40 +
41 +FORTRAN_NEEDED=lapack
42 +
43 +inherit distutils-r1 eutils flag-o-matic fortran-2 multilib multiprocessing toolchain-funcs versionator
44 +
45 +DOC_PV="1.9.1"
46 +DOC_P="${PN}-${DOC_PV}"
47 +
48 +DESCRIPTION="Fast array and numerical python library"
49 +HOMEPAGE="http://www.numpy.org/"
50 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P/_p/.post}.tar.gz
51 + doc? (
52 + http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
53 + http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
54 + http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
55 + )"
56 +# It appears the docs haven't been upgraded, still @ 1.8.1
57 +LICENSE="BSD"
58 +SLOT="0"
59 +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"
60 +IUSE="doc lapack test"
61 +
62 +RDEPEND="
63 + dev-python/setuptools[${PYTHON_USEDEP}]
64 + lapack? ( virtual/cblas virtual/lapack )"
65 +DEPEND="${RDEPEND}
66 + doc? ( app-arch/unzip )
67 + lapack? ( virtual/pkgconfig )
68 + test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
69 +
70 +# Uses distutils.command.config.
71 +DISTUTILS_IN_SOURCE_BUILD=1
72 +
73 +PATCHES=(
74 + "${FILESDIR}"/${PN}-1.9.2-no-hardcode-blas.patch
75 +)
76 +
77 +src_unpack() {
78 + default
79 + mv "${WORKDIR}"/* "${S}" || die
80 +
81 + if use doc; then
82 + unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
83 + fi
84 +}
85 +
86 +pc_incdir() {
87 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
88 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
89 +}
90 +
91 +pc_libdir() {
92 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
93 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
94 +}
95 +
96 +pc_libs() {
97 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
98 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
99 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
100 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
101 +}
102 +
103 +python_prepare_all() {
104 + if use lapack; then
105 + append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
106 + local libdir="${EPREFIX}"/usr/$(get_libdir)
107 + # make sure _dotblas.so gets built
108 + sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
109 + cat >> site.cfg <<-EOF
110 + [blas]
111 + include_dirs = $(pc_incdir cblas)
112 + library_dirs = $(pc_libdir cblas blas):${libdir}
113 + blas_libs = $(pc_libs cblas blas)
114 + [lapack]
115 + library_dirs = $(pc_libdir lapack):${libdir}
116 + lapack_libs = $(pc_libs lapack)
117 + EOF
118 + else
119 + export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
120 + fi
121 +
122 + export CC="$(tc-getCC) ${CFLAGS}"
123 +
124 + append-flags -fno-strict-aliasing
125 +
126 + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
127 + # with the subtle difference that we don't want to break Darwin where
128 + # -shared is not a valid linker argument
129 + if [[ ${CHOST} != *-darwin* ]]; then
130 + append-ldflags -shared
131 + fi
132 +
133 + # only one fortran to link with:
134 + # linking with cblas and lapack library will force
135 + # autodetecting and linking to all available fortran compilers
136 + append-fflags -fPIC
137 + if use lapack; then
138 + NUMPY_FCONFIG="config_fc --noopt --noarch"
139 + # workaround bug 335908
140 + [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
141 + fi
142 +
143 + # don't version f2py, we will handle it.
144 + sed -i -e '/f2py_exe/s:+os\.path.*$::' numpy/f2py/setup.py || die
145 +
146 + # we don't have f2py-3.3
147 + sed \
148 + -e "/f2py_cmd/s:'f2py'.*:'f2py':g" \
149 + -i numpy/tests/test_scripts.py || die
150 +
151 + distutils-r1_python_prepare_all
152 +}
153 +
154 +python_compile() {
155 + distutils-r1_python_compile -j $(makeopts_jobs) ${NUMPY_FCONFIG}
156 +}
157 +
158 +python_test() {
159 + distutils_install_for_testing ${NUMPY_FCONFIG}
160 +
161 + cd "${TMPDIR}" || die
162 + ${EPYTHON} -c "
163 +import numpy, sys
164 +r = numpy.test(label='full', verbose=3)
165 +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
166 +}
167 +
168 +python_install() {
169 + distutils-r1_python_install ${NUMPY_FCONFIG}
170 +}
171 +
172 +python_install_all() {
173 + distutils-r1_python_install_all
174 +
175 + dodoc COMPATIBILITY DEV_README.txt THANKS.txt
176 +
177 + if use doc; then
178 + dohtml -r "${WORKDIR}"/html/*
179 + dodoc "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
180 + fi
181 +
182 + # absent in 1.9
183 + #docinto f2py
184 + #dodoc numpy/f2py/docs/*.txt
185 + #doman numpy/f2py/f2py.1
186 +}