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/, dev-python/numpy/files/
Date: Sat, 14 Jul 2018 21:44:52
Message-Id: 1531604680.3c5cc8b7b2996ff2644f3da46508720275bd0529.mgorny@gentoo
1 commit: 3c5cc8b7b2996ff2644f3da46508720275bd0529
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 14 20:04:08 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 14 21:44:40 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c5cc8b7
7
8 dev-python/numpy: Bump to 1.14.5
9
10 dev-python/numpy/Manifest | 4 +
11 .../files/numpy-1.14.5-no-hardcode-blas.patch | 75 +++++++++++
12 dev-python/numpy/numpy-1.14.5.ebuild | 146 +++++++++++++++++++++
13 3 files changed, 225 insertions(+)
14
15 diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
16 index d608a1d2cd4..802bda40193 100644
17 --- a/dev-python/numpy/Manifest
18 +++ b/dev-python/numpy/Manifest
19 @@ -1,16 +1,20 @@
20 DIST numpy-1.10.4.tar.gz 4069996 BLAKE2B 9f315d1fca4415b148d4b3bff6f223930bab3d0cb9e19fc5790d71218549c9f0031355e8a95eae9c866ceaf6391a3aa41206bf3f48477b6cabbbc52e0287c246 SHA512 57ace46e357d49be0efd904e5ceb9862c626c916987c8798a12de7ae1e06816ad8483439ac4619792a04889631b5998f2397dc601c78dea33a784b4831c19c79
21 DIST numpy-1.13.3.zip 5021189 BLAKE2B 5a2890a8e08425a2d537667cb2c621a57e1d442951d0b06aee2a9a153bf76652e9c4cbaa11716697a85c580e1f30043d5eef10fc24245074e6431a873ff80c34 SHA512 b77969372c8463879b452dc54830afabb719e6814a2bb1ee0062b463155ac709d1cd48839b28b74aacaee8aced7ee35870ba43d59293ff54f90bc0f717ca7737
22 +DIST numpy-1.14.5.zip 4904624 BLAKE2B 14d266bf1139b9539e39d08a6537e2b772e80bf46a0769cbb06b63ba54858c9284f6d0e8a19627a4d99f2c2638e9a4031bf4d4aaf773eaf34b7203d131636dc0 SHA512 e131f9fa815084e334b59c5d9abd8de0088ad1dfefecf8615ad7deca0b54b0dfa0446c8de99c90670ea9fcabea9980bd171618a5b9032c1937b597a5ce363c5b
23 DIST numpy-1.8.2.tar.gz 3792998 BLAKE2B 00d22c72ab6f919626d3fba0edc477fb9c19f9c299f78cff6102e1860e3d1baec8f3b17aa23be797e9a34630428174de3f3b630c3f05c5340024dc6314fad8cd SHA512 996e6b8e2d42f223e44660f56bf73eb8ab124f400d89218f8f5e4d7c9860ada44a4d7c54526137b0695c7a10f36e8834fbf0d42b7cb20bcdb5d5c245d673385c
24 DIST numpy-1.9.2.tar.gz 3986067 BLAKE2B e5ae6717badac01186a5b0f36729c1c01dda1fb4238978858c778f08f17512c5d1f3902d551cb0c67a77c1246ce238e588556188e7e6466c27ebdde09879782d SHA512 70470ebb9afef5dfd0c83ceb7a9d5f1b7a072b1a9b54b04f04f5ed50fbaedd5b4906bd500472268d478f94df9e749a88698b1ff30f2d80258e7f3fec040617d9
25 DIST numpy-html-1.10.1.zip 9663942 BLAKE2B 436ab4185212f8eeaa3d61e29c2c547c9f24bf0869984cc674e66a7360177e999cc70a6573316711e478db62057d5cee90f85b978d095c6b47f1dc3832ffbdf7 SHA512 9d1f3619b801c88604a0495290da4ae8cfb4800257d549214363c554c1dc09a736425d594ed88f492afee6ae7c68fe5c166b9b3a8f24637ea41d67fd23b9d9f9
26 DIST numpy-html-1.13.0.zip 10324817 BLAKE2B e16357e615b30249a4c41582b46b194e2c3113996260f0ff60e5b64ce9b344a05a5f372095a9f1187e8474bda4078f41ad8372c801637278d3478176de455eaa SHA512 2dd769ec0d4967ba1797339170b0f9bf694a0a304cffb8482a037ba043a3bd3a9207e63a1ffed2d7ae96205d3a1a72fa1b15eeac4bd2e565544363dd9742f542
27 +DIST numpy-html-1.14.5.zip 11197881 BLAKE2B 00cac3c5be07f644328acd9ed155a6fc07ed7d7380584732bb3ac03562c8705cd152612f461d5dc251dabe0be4ba45593165a961496e351110e1aa7598c37370 SHA512 578d31660de4e1f57310b3a2137cefea17228f40046eef1689fb6d9302f0fe0fda5aaf473c3b8c69ae781049950022321593ec891a5640e3c36c886ab3bf4383
28 DIST numpy-html-1.8.1.zip 9703711 BLAKE2B 1f9d9cb4e65fc2f03d07da9bc34de9c8c4f93f5267689abccb0e2383b23babfed52ae6c3969738e78eeca7b32f49c90f9f7bb92dd432a6b87e082b67c1f214a5 SHA512 1d52c657931f4eebb5325159444aedd969b201f5098855058f1ef632dc8677372d632291154ebc3db9869cdb8abf7eb820eade1a9edba2d6be1ae918cb38c071
29 DIST numpy-html-1.9.1.zip 9839137 BLAKE2B 84b4c15ee20d8a1e6514baf47b96ac770690357278ff22b48c427509534c41df9e14165483f625955a7c6c087b0b5e13e68bf3d06951352a8511d6e03cc65d9f SHA512 647a6be9f93995aca14185e283a2b412678c6e8080fe4f14e7cc9ee63c28eebb64dea6bbe28f30ef6850a5565dd1e06928fd660ac762e9a91454d309eff96ed4
30 DIST numpy-ref-1.10.1.pdf 5382006 BLAKE2B c360d40c6ac3d2975a760dcf32ed312f30e9ee6b096020e0513bb22af600de62f5f72309603414b3bbcaf02a1aacd79e84545a6e5d50611bfdabafa9f6441a10 SHA512 25085eb7cb80343abffe04ee01ea93603427913ba4443fbfdaa1ef1ad07a8642c47259d0bb1cb91a9059f786c03395bba76f608c6f0a2fd26d1afec4847d885c
31 DIST numpy-ref-1.13.0.pdf 5047809 BLAKE2B c7e2734311918c6faa46b008c4802bb090a728ca22337695755e885a7d7d341ba76d5e489c9c56cf89a9d0545bc9b24787e193c4bc1af2631a368b812fe74083 SHA512 0fe28be029602f8b8dc12987da273581b42f123a9d605321084d4c05233cd31ccff0efb17b99c3e8cbfec5f8de11252a99c1ee5c43d37aa5fa57d712f4bb4aca
32 +DIST numpy-ref-1.14.5.pdf 4855150 BLAKE2B aa924542346bd06b1aa8b11ceb8eb5de936cfdccc10a8339720a297e27b5b34961044eb8db8dd7b9a19ba93b3cbf76ec278a9a50724653aafd2b9d57a00007f2 SHA512 717f58fcb1aa66ecc5f5d4c11c9923d2beb21a1b1a0ca1e46f3622c69f1122fd0547b7f7abaf6de008e2aa988b2453af3c2590877f5596fb6642479ece651746
33 DIST numpy-ref-1.8.1.pdf 5348248 BLAKE2B f087fbbd3c789adebd2902db0a2acc8a8748ccbb5a1e7e064effdc91e92c7dcf087ae36436fc52d7afa12a12ca2fc0f5f5617177bcd8b9745a7155acd10d71fc SHA512 340dd8f47430f24fea81bb3a8674e1a58f4290a9d1c5d64bac96d50b31a94a770e78381e42daf8b0a6a90cefe5cafe86b0c89f7cc7635a042a7e85eb74bdbdf5
34 DIST numpy-ref-1.9.1.pdf 5318122 BLAKE2B a893be075c823ab1a6ad3b2e38e8c05aad20cc2abf9307af9dac87b12f029fe07b535b1f385a4315bcc9590fedb79e25bc5e1659885ad61cf010d2f45ae6edf5 SHA512 5171bb22588117a53e0eac355520581f7817a7e7a099ae83bb73f2ac8248a60e139ae9719dc543b44f25ccf8319c9f149fec1bf5aa55d943fad06a8e6da0d9ba
35 DIST numpy-user-1.10.1.pdf 406114 BLAKE2B 88d43e87071eb88223c84720001671677c6f8c1e745b4434331434a9c48cee4591e67740ef102e49e839e4b2aa690798a5415fa25eaa79d823dbcfa29780fa85 SHA512 998bce3777944e7b366c619e968ac4b6cc4351cd2819d6ecba7f422e20b6cd4d7332a8dede4036cd12e85b24c4c3d973bd9ef2d407610369c2591fce990fa8f4
36 DIST numpy-user-1.13.0.pdf 580593 BLAKE2B dcf86d0a87ceb7062b8fb339d37bfe3c3fd5e166f3079a079d50f6afb51bde9754d050c97b3e4aec237aaf797d70a2458fe0f26beeeeaf1594330e08c07e181a SHA512 d3891d449b72c2d97af28182e0bcb12559abc114f8dbf0e0c68362c1af50e6aeab565b31b4aa44ab079e8d47f550081a79a4066c37fc52a1c70c05be45eb5c11
37 +DIST numpy-user-1.14.5.pdf 574418 BLAKE2B 80738f1760932fa74b07334d1a355ba3ce319e0b03fe1428d0b3497466fa1164ccbad84969cb7bc8daebb5525094f0d0c7710e1d661b1c6bbaca0669bfcbf875 SHA512 fb00305408c56ee203ed71ac042474592e7e933f14a639f6dce0f6dc80206c13b844c2425a919f9072a114c7af2c2f9f85b78a07ba3874259e5d173290e51a13
38 DIST numpy-user-1.8.1.pdf 408305 BLAKE2B 2956e42ebad45b021f72c7e71d357d953ea8a26639b4c6e81dbe1718052304ac5ce1a7f96646d94ad48bf737ddc6962fcbc304e31dfce32b85cb8165b0ada6e0 SHA512 9e646e89e7e67834fa596e43082b43842d1c59287d22fd8d20c9f0a1d3d56a518a08cc2c036de4972ad0d6d9d3c2f56e2210f76e7244d3f7547b5204d84d3c7c
39 DIST numpy-user-1.9.1.pdf 418111 BLAKE2B 683ed35ca9e123387a08a88047ad0cfd8bf3698efee7c17c3b57941f57f86297798787f13b142a1bf806f775e70bc116109decb281ab82959c08932c06aa1f3d SHA512 724302468a8e93daf70d379bb1ee7369953e297c40ea260f080b7aca3c9c81e619a81705bdfb2ea214da5b5325ec2b48e953eceeaa1d60c07593b00c35989f45
40
41 diff --git a/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch b/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch
42 new file mode 100644
43 index 00000000000..39777ec55af
44 --- /dev/null
45 +++ b/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch
46 @@ -0,0 +1,75 @@
47 +diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
48 +index 93a8e6f..df3f3f8 100644
49 +--- a/numpy/distutils/system_info.py
50 ++++ b/numpy/distutils/system_info.py
51 +@@ -364,28 +364,7 @@ def get_info(name, notfound_action=0):
52 + 1 - display warning message
53 + 2 - raise error
54 + """
55 +- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
56 +- 'atlas_threads': atlas_threads_info, # ditto
57 +- 'atlas_blas': atlas_blas_info,
58 +- 'atlas_blas_threads': atlas_blas_threads_info,
59 +- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
60 +- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
61 +- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
62 +- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
63 +- 'atlas_3_10_blas': atlas_3_10_blas_info,
64 +- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
65 +- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
66 +- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
67 +- 'mkl': mkl_info,
68 +- # openblas which may or may not have embedded lapack
69 +- 'openblas': openblas_info, # use blas_opt instead
70 +- # openblas with embedded lapack
71 +- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
72 +- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead
73 +- 'blis': blis_info, # use blas_opt instead
74 +- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
75 +- 'blas_mkl': blas_mkl_info, # use blas_opt instead
76 +- 'x11': x11_info,
77 ++ cl = {'x11': x11_info,
78 + 'fft_opt': fft_opt_info,
79 + 'fftw': fftw_info,
80 + 'fftw2': fftw2_info,
81 +@@ -730,10 +709,7 @@ class system_info(object):
82 + return [b for b in [a.strip() for a in libs.split(',')] if b]
83 +
84 + def get_libraries(self, key='libraries'):
85 +- if hasattr(self, '_lib_names'):
86 +- return self.get_libs(key, default=self._lib_names)
87 +- else:
88 +- return self.get_libs(key, '')
89 ++ return self.get_libs(key, '')
90 +
91 + def library_extensions(self):
92 + c = customized_ccompiler()
93 +@@ -1740,7 +1716,7 @@ class blas_info(system_info):
94 + lib = self.has_cblas(info)
95 + if lib is not None:
96 + info['language'] = 'c'
97 +- info['libraries'] = [lib]
98 ++ info['libraries'] = lib
99 + info['define_macros'] = [('HAVE_CBLAS', None)]
100 + self.set_info(**info)
101 +
102 +@@ -1772,16 +1748,16 @@ class blas_info(system_info):
103 + # check for cblas lib, and if not present check for blas lib.
104 + try:
105 + c.link_executable(obj, os.path.join(tmpdir, "a.out"),
106 +- libraries=["cblas"],
107 ++ libraries=info["libraries"],
108 + library_dirs=info['library_dirs'],
109 + extra_postargs=info.get('extra_link_args', []))
110 +- res = "cblas"
111 ++ res = info["libraries"]
112 + except distutils.ccompiler.LinkError:
113 + c.link_executable(obj, os.path.join(tmpdir, "a.out"),
114 + libraries=["blas"],
115 + library_dirs=info['library_dirs'],
116 + extra_postargs=info.get('extra_link_args', []))
117 +- res = "blas"
118 ++ res = ["blas"]
119 + except distutils.ccompiler.CompileError:
120 + res = None
121 + finally:
122
123 diff --git a/dev-python/numpy/numpy-1.14.5.ebuild b/dev-python/numpy/numpy-1.14.5.ebuild
124 new file mode 100644
125 index 00000000000..78f1be669a3
126 --- /dev/null
127 +++ b/dev-python/numpy/numpy-1.14.5.ebuild
128 @@ -0,0 +1,146 @@
129 +# Copyright 1999-2018 Gentoo Foundation
130 +# Distributed under the terms of the GNU General Public License v2
131 +
132 +EAPI=6
133 +
134 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
135 +PYTHON_REQ_USE="threads(+)"
136 +
137 +FORTRAN_NEEDED=lapack
138 +
139 +inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs versionator
140 +
141 +DOC_PV="${PV}"
142 +DOC_P="${PN}-${DOC_PV}"
143 +
144 +DESCRIPTION="Fast array and numerical python library"
145 +HOMEPAGE="https://www.numpy.org"
146 +SRC_URI="
147 + mirror://pypi/${PN:0:1}/${PN}/${P}.zip
148 + doc? (
149 + http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
150 + http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
151 + http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
152 + )"
153 +LICENSE="BSD"
154 +SLOT="0"
155 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
156 +IUSE="doc lapack test"
157 +
158 +RDEPEND="lapack? ( virtual/cblas virtual/lapack )"
159 +DEPEND="${RDEPEND}
160 + app-arch/unzip
161 + dev-python/setuptools[${PYTHON_USEDEP}]
162 + lapack? ( virtual/pkgconfig )
163 + test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
164 +
165 +PATCHES=(
166 + "${FILESDIR}"/${PN}-1.14.5-no-hardcode-blas.patch
167 +)
168 +
169 +src_unpack() {
170 + default
171 + if use doc; then
172 + unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
173 + fi
174 +}
175 +
176 +pc_incdir() {
177 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
178 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
179 +}
180 +
181 +pc_libdir() {
182 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
183 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
184 +}
185 +
186 +pc_libs() {
187 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
188 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
189 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
190 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
191 +}
192 +
193 +python_prepare_all() {
194 + if use lapack; then
195 + append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
196 + local libdir="${EPREFIX}"/usr/$(get_libdir)
197 + cat >> site.cfg <<-EOF || die
198 + [blas]
199 + include_dirs = $(pc_incdir cblas)
200 + library_dirs = $(pc_libdir cblas blas):${libdir}
201 + blas_libs = $(pc_libs cblas blas)
202 + [lapack]
203 + library_dirs = $(pc_libdir lapack):${libdir}
204 + lapack_libs = $(pc_libs lapack)
205 + EOF
206 + else
207 + export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
208 + fi
209 +
210 + export CC="$(tc-getCC) ${CFLAGS}"
211 +
212 + append-flags -fno-strict-aliasing
213 +
214 + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
215 + # with the subtle difference that we don't want to break Darwin where
216 + # -shared is not a valid linker argument
217 + if [[ ${CHOST} != *-darwin* ]]; then
218 + append-ldflags -shared
219 + fi
220 +
221 + # only one fortran to link with:
222 + # linking with cblas and lapack library will force
223 + # autodetecting and linking to all available fortran compilers
224 + append-fflags -fPIC
225 + if use lapack; then
226 + NUMPY_FCONFIG="config_fc --noopt --noarch"
227 + # workaround bug 335908
228 + [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
229 + fi
230 +
231 + # don't version f2py, we will handle it.
232 + sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
233 +
234 + # we don't have f2py-3.3
235 + sed \
236 + -e 's:test_f2py:_&:g' \
237 + -i numpy/tests/test_scripts.py || die
238 +
239 + distutils-r1_python_prepare_all
240 +}
241 +
242 +python_compile() {
243 + local python_makeopts_jobs=""
244 + python_is_python3 || python_makeopts_jobs="-j $(makeopts_jobs)"
245 + distutils-r1_python_compile \
246 + ${python_makeopts_jobs} \
247 + ${NUMPY_FCONFIG}
248 +}
249 +
250 +python_test() {
251 + distutils_install_for_testing --single-version-externally-managed --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
252 +
253 + cd "${TMPDIR}" || die
254 +
255 + ${EPYTHON} -c "
256 +import numpy, sys
257 +r = numpy.test(label='full', verbose=3)
258 +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
259 +}
260 +
261 +python_install() {
262 + distutils-r1_python_install ${NUMPY_FCONFIG}
263 +}
264 +
265 +python_install_all() {
266 + local DOCS=( THANKS.txt )
267 +
268 + if use doc; then
269 + local HTML_DOCS=( "${WORKDIR}"/html/. )
270 + DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
271 + fi
272 +
273 + distutils-r1_python_install_all
274 +}