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, 22 Sep 2015 08:10:46
Message-Id: 1442909437.7a5514715ef988a654fdf3b2109c8db306ce15bb.jlec@gentoo
1 commit: 7a5514715ef988a654fdf3b2109c8db306ce15bb
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 22 07:33:33 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 22 08:10:37 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a551471
7
8 dev-python/numpy: Version Bump
9
10 Package-Manager: portage-2.2.21
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/numpy/Manifest | 1 +
14 dev-python/numpy/numpy-1.9.3.ebuild | 146 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 147 insertions(+)
16
17 diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
18 index dcd56be..330b8dd 100644
19 --- a/dev-python/numpy/Manifest
20 +++ b/dev-python/numpy/Manifest
21 @@ -4,6 +4,7 @@ DIST numpy-1.8.2.tar.gz 3792998 SHA256 6d487fc724780d66746bde264ea71f5cd77d3a39e
22 DIST numpy-1.9.0.tar.gz 3962108 SHA256 2745b1d64445da3c29a34450320025c11897ae4af77475f861966e98b2cb1a0f SHA512 dc9fb453367bd429336ed7391c0923d0d3af5f8ab26ef8681bc1a9e934ac28e2c9bc30e11f1026c2ea5710a3c4e27188007ee14b194bfca6a03228fad8f3d2fd WHIRLPOOL 5111f5cbb43bd279587f858196fbe86103abde7e8d6536337af51fe4a8371d39057d9ea75ac73ab501ff5c07c5c6e7e4e62f660ca263181e2fee3e6e61718ba9
23 DIST numpy-1.9.1.tar.gz 3978007 SHA256 0075bbe07e30b659ae4415446f45812dc1b96121a493a4a1f8b1ba77b75b1e1c SHA512 8286a55f4bd5f9c16b1252ee64a644fe4a03758d31ef2e16714c2f5c61d96f766fb6ffc98986c58e1db1c2b812a2d10e89eae3442263615e46472418c2d4edd4 WHIRLPOOL 9025fee798b2e0b23af4c5870fd12606de65c91a176e2900ca93ed853767165dfbe7344125aba19a58d031f82880d6347095070ed3585deb8866819c32422751
24 DIST numpy-1.9.2.tar.gz 3986067 SHA256 325e5f2b0b434ecb6e6882c7e1034cc6cdde3eeeea87dbc482575199a6aeef2a SHA512 70470ebb9afef5dfd0c83ceb7a9d5f1b7a072b1a9b54b04f04f5ed50fbaedd5b4906bd500472268d478f94df9e749a88698b1ff30f2d80258e7f3fec040617d9 WHIRLPOOL 59f5dc52cb95c7ce80fec3a7feac6cfda1d149596bf6d95c18bd8314e31a8df494b2b470c4cc3d8c296c9fc11c718d70d5b9b5344337175ca75496504c0fd201
25 +DIST numpy-1.9.3.tar.gz 3984430 SHA256 c3b74d3b9da4ceb11f66abd21e117da8cf584b63a0efbd01a9b7e91b693fbbd6 SHA512 32531cd8d1480a50812454ef8e3b68c0f84b2a4bc5de0df1457070db7f6fd94cdb50e6479a85fa4d1dc569a10d28f6864d5069fcf2a32fa20fa8803476a3df8c WHIRLPOOL a0235594e793625d5e3cef57956f4710587158885f39d7d1267c9845b12fb1d39fb9987ec095720c2d285c7c726383a15471f3629b739b77186470e2c40ba093
26 DIST numpy-html-1.8.0.zip 9779825 SHA256 39e853c1aaa711976333782f465f2579ca66e6698393f6ba79f5cc78317b1203 SHA512 33333c48a3f4d27ccddf6696dce4e346f8729d1f398128b3bfebb8a9d53ded7bb62b63a766319f6e49ba7cf8ca4e1ce252996acd263976ad2990bf9650d71043 WHIRLPOOL 7eea0ad3418c55d6104a4a115fcdcd5eeb291b9fc1237724e10dcbbf95bc7a4a23b519c64976ac405fb4c5abbaae87a6c747f9ad695d08b6326b459ba1fb8a15
27 DIST numpy-html-1.8.1.zip 9703711 SHA256 f7fc3af4dba7b40deabd1828a86ea2e2eb5b9fa17c7ebddd73ee4cb8625105b1 SHA512 1d52c657931f4eebb5325159444aedd969b201f5098855058f1ef632dc8677372d632291154ebc3db9869cdb8abf7eb820eade1a9edba2d6be1ae918cb38c071 WHIRLPOOL e502b1416bad4b189773ba98035dfbeed0dc251d8f9b76e336450f14e8425caf92d55d2b1c2cc5ef9eb2d33eb2bf7cd55e720c1b265e45539b195fea1d7f046c
28 DIST numpy-html-1.9.1.zip 9839137 SHA256 12a24937f8273fcf79090c99b6c4154a0ecfc378386498cf2afe727ea171407c SHA512 647a6be9f93995aca14185e283a2b412678c6e8080fe4f14e7cc9ee63c28eebb64dea6bbe28f30ef6850a5565dd1e06928fd660ac762e9a91454d309eff96ed4 WHIRLPOOL 68c367fd0416d27b1cf43edf7ca48bc8845c02856bbbacdf63c88fe8bbffd5dd86fb3e5cdea8f669dd78adf7bcc4d184953048783802df323126c1b22baf8e92
29
30 diff --git a/dev-python/numpy/numpy-1.9.3.ebuild b/dev-python/numpy/numpy-1.9.3.ebuild
31 new file mode 100644
32 index 0000000..187f98b
33 --- /dev/null
34 +++ b/dev-python/numpy/numpy-1.9.3.ebuild
35 @@ -0,0 +1,146 @@
36 +# Copyright 1999-2015 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
39 +
40 +EAPI=5
41 +
42 +PYTHON_COMPAT=( python2_7 python3_{3,4} )
43 +
44 +FORTRAN_NEEDED=lapack
45 +
46 +inherit distutils-r1 eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
47 +
48 +DOC_PV="1.9.1"
49 +DOC_P="${PN}-${DOC_PV}"
50 +
51 +DESCRIPTION="Fast array and numerical python library"
52 +HOMEPAGE="http://numpy.scipy.org/"
53 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
54 + doc? (
55 + http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
56 + http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
57 + http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
58 + )"
59 +# It appears the docs haven't been upgraded, still @ 1.8.1
60 +LICENSE="BSD"
61 +SLOT="0"
62 +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"
63 +IUSE="doc lapack test"
64 +
65 +RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
66 + lapack? ( virtual/cblas virtual/lapack )"
67 +DEPEND="${RDEPEND}
68 + doc? ( app-arch/unzip )
69 + lapack? ( virtual/pkgconfig )
70 + test? ( dev-python/nose[${PYTHON_USEDEP}] )"
71 +
72 +# Uses distutils.command.config.
73 +DISTUTILS_IN_SOURCE_BUILD=1
74 +
75 +PATCHES=(
76 + "${FILESDIR}"/${PN}-1.9.2-no-hardcode-blas.patch
77 +)
78 +
79 +src_unpack() {
80 + default
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 + distutils-r1_python_prepare_all
147 +}
148 +
149 +python_compile() {
150 + distutils-r1_python_compile ${NUMPY_FCONFIG}
151 +}
152 +
153 +python_test() {
154 + distutils_install_for_testing ${NUMPY_FCONFIG}
155 +
156 + cd "${TMPDIR}" || die
157 + ${EPYTHON} -c "
158 +import numpy, sys
159 +r = numpy.test(label='full', verbose=3)
160 +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
161 +}
162 +
163 +python_install() {
164 + distutils-r1_python_install ${NUMPY_FCONFIG}
165 +}
166 +
167 +python_install_all() {
168 + distutils-r1_python_install_all
169 +
170 + dodoc COMPATIBILITY DEV_README.txt THANKS.txt
171 +
172 + if use doc; then
173 + dohtml -r "${WORKDIR}"/html/*
174 + dodoc "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
175 + fi
176 +
177 + # absent in 1.9
178 + #docinto f2py
179 + #dodoc numpy/f2py/docs/*.txt
180 + #doman numpy/f2py/f2py.1
181 +}