1 |
commit: 65d331f931f54d7c099446acf1eb1796e61ce990 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 14 19:34:39 2017 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 14 19:34:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d331f9 |
7 |
|
8 |
dev-python/numpy: Version Bump |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=607914 |
11 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
12 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
13 |
|
14 |
dev-python/numpy/Manifest | 1 + |
15 |
.../files/numpy-1.12.1-no-hardcode-blas.patch | 72 +++++++++ |
16 |
dev-python/numpy/numpy-1.12.1.ebuild | 164 +++++++++++++++++++++ |
17 |
3 files changed, 237 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest |
20 |
index 7c95901d637..856d490efce 100644 |
21 |
--- a/dev-python/numpy/Manifest |
22 |
+++ b/dev-python/numpy/Manifest |
23 |
@@ -2,6 +2,7 @@ DIST numpy-1.10.1.tar.gz 4048478 SHA256 8b9f453f29ce96a14e625100d3dcf8926301d36c |
24 |
DIST numpy-1.10.2.tar.gz 4055005 SHA256 23a3befdf955db4d616f8bb77b324680a80a323e0c42a7e8d7388ef578d8ffa9 SHA512 040db49593f3c53c9b43301eacffc3b5817310f1dbb91fd650efcf5ba65ce7e217549dc5268bc56846f19f1a03dd19470989005aa176531af44d602b3546b007 WHIRLPOOL 30c4b365aac6623241afd72fc30d3a543183205eb23db1366937e39fc50dee862923dd249775fee67cce0199940a57ec1423f1cb0e65ff7c65764c7969d7a76f |
25 |
DIST numpy-1.10.4.tar.gz 4069996 SHA256 7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b SHA512 57ace46e357d49be0efd904e5ceb9862c626c916987c8798a12de7ae1e06816ad8483439ac4619792a04889631b5998f2397dc601c78dea33a784b4831c19c79 WHIRLPOOL 76946c2543b1cade06d71f83fd507bd818c1090baa9c3ddda7d1f48d48ed23672c5d9de76db890df990c6d8b7b26b71d3ce733c448943ad4177374a957360d1c |
26 |
DIST numpy-1.11.2.tar.gz 4178447 SHA256 04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69 SHA512 c1818de5c8b92cc2a673149f090cc863b484afd29e8a014ffcf8d0f5e70cf8886c7662dbe45847712dec8ae0412d1cb48b13cceefe3e4ec0e85bb20e4beaa46e WHIRLPOOL 668acc8ada165b57e1b2ab76969affa0098a5746c4ca21ae88cd189c5e6f79bde9d05bf951604d0c0f7400174f1e58f17fa0d662029f0b91cff78118fe3cdb0d |
27 |
+DIST numpy-1.12.1.zip 4824784 SHA256 a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542 SHA512 156319821e4f0cf8d820e977da704aab274b7a4a4b792f6e40d7c0f2827700c990f55f1ca9650523c62c9e937f0e75f336d091d46ca47aaa9875c68fe32bac2a WHIRLPOOL 1ecd1df77d2a64bc6db1910446f60b477ebf5a1cf33ec2e1fced56dbbf1a7df5fef004c7f84f0dccb0ca20ea7ab73c384e4d247eb9700159a18c9a4a51e4db6d |
28 |
DIST numpy-1.8.2.tar.gz 3792998 SHA256 6d487fc724780d66746bde264ea71f5cd77d3a39e52ee2b073dcaed63bc669db SHA512 996e6b8e2d42f223e44660f56bf73eb8ab124f400d89218f8f5e4d7c9860ada44a4d7c54526137b0695c7a10f36e8834fbf0d42b7cb20bcdb5d5c245d673385c WHIRLPOOL 0d3a05b1e3c0a1ceb0a7b4818406dbb45506e5f25bc2727d4ff44cc0a0520e6556b3c68ae24dbca37ba9d67ae2defbb3ff9c906d4c2635b29ed44452d70e8311 |
29 |
DIST numpy-1.9.2.tar.gz 3986067 SHA256 325e5f2b0b434ecb6e6882c7e1034cc6cdde3eeeea87dbc482575199a6aeef2a SHA512 70470ebb9afef5dfd0c83ceb7a9d5f1b7a072b1a9b54b04f04f5ed50fbaedd5b4906bd500472268d478f94df9e749a88698b1ff30f2d80258e7f3fec040617d9 WHIRLPOOL 59f5dc52cb95c7ce80fec3a7feac6cfda1d149596bf6d95c18bd8314e31a8df494b2b470c4cc3d8c296c9fc11c718d70d5b9b5344337175ca75496504c0fd201 |
30 |
DIST numpy-1.9.3.tar.gz 3984430 SHA256 c3b74d3b9da4ceb11f66abd21e117da8cf584b63a0efbd01a9b7e91b693fbbd6 SHA512 32531cd8d1480a50812454ef8e3b68c0f84b2a4bc5de0df1457070db7f6fd94cdb50e6479a85fa4d1dc569a10d28f6864d5069fcf2a32fa20fa8803476a3df8c WHIRLPOOL a0235594e793625d5e3cef57956f4710587158885f39d7d1267c9845b12fb1d39fb9987ec095720c2d285c7c726383a15471f3629b739b77186470e2c40ba093 |
31 |
|
32 |
diff --git a/dev-python/numpy/files/numpy-1.12.1-no-hardcode-blas.patch b/dev-python/numpy/files/numpy-1.12.1-no-hardcode-blas.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..81d6084be3d |
35 |
--- /dev/null |
36 |
+++ b/dev-python/numpy/files/numpy-1.12.1-no-hardcode-blas.patch |
37 |
@@ -0,0 +1,72 @@ |
38 |
+--- numpy-1.11.1/numpy/distutils/system_info.py |
39 |
++++ numpy-1.11.1/numpy/distutils/system_info.py |
40 |
+@@ -312,27 +312,7 @@ |
41 |
+ 1 - display warning message |
42 |
+ 2 - raise error |
43 |
+ """ |
44 |
+- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead |
45 |
+- 'atlas_threads': atlas_threads_info, # ditto |
46 |
+- 'atlas_blas': atlas_blas_info, |
47 |
+- 'atlas_blas_threads': atlas_blas_threads_info, |
48 |
+- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead |
49 |
+- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto |
50 |
+- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead |
51 |
+- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto |
52 |
+- 'atlas_3_10_blas': atlas_3_10_blas_info, |
53 |
+- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info, |
54 |
+- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead |
55 |
+- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto |
56 |
+- 'mkl': mkl_info, |
57 |
+- # openblas which may or may not have embedded lapack |
58 |
+- 'openblas': openblas_info, # use blas_opt instead |
59 |
+- # openblas with embedded lapack |
60 |
+- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead |
61 |
+- 'blis': blis_info, # use blas_opt instead |
62 |
+- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead |
63 |
+- 'blas_mkl': blas_mkl_info, # use blas_opt instead |
64 |
+- 'x11': x11_info, |
65 |
++ cl = {'x11': x11_info, |
66 |
+ 'fft_opt': fft_opt_info, |
67 |
+ 'fftw': fftw_info, |
68 |
+ 'fftw2': fftw2_info, |
69 |
+@@ -669,10 +650,7 @@ |
70 |
+ return [b for b in [a.strip() for a in libs.split(',')] if b] |
71 |
+ |
72 |
+ def get_libraries(self, key='libraries'): |
73 |
+- if hasattr(self, '_lib_names'): |
74 |
+- return self.get_libs(key, default=self._lib_names) |
75 |
+- else: |
76 |
+- return self.get_libs(key, '') |
77 |
++ return self.get_libs(key, '') |
78 |
+ |
79 |
+ def library_extensions(self): |
80 |
+ static_exts = ['.a'] |
81 |
+@@ -1685,7 +1663,7 @@ |
82 |
+ lib = self.has_cblas(info) |
83 |
+ if lib is not None: |
84 |
+ info['language'] = 'c' |
85 |
+- info['libraries'] = [lib] |
86 |
++ info['libraries'] = lib |
87 |
+ info['define_macros'] = [('HAVE_CBLAS', None)] |
88 |
+ self.set_info(**info) |
89 |
+ |
90 |
+@@ -1718,16 +1696,16 @@ |
91 |
+ # check for cblas lib, and if not present check for blas lib. |
92 |
+ try: |
93 |
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
94 |
+- libraries=["cblas"], |
95 |
++ libraries=info["libraries"], |
96 |
+ library_dirs=info['library_dirs'], |
97 |
+ extra_postargs=info.get('extra_link_args', [])) |
98 |
+- res = "cblas" |
99 |
++ res = info["libraries"] |
100 |
+ except distutils.ccompiler.LinkError: |
101 |
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
102 |
+ libraries=["blas"], |
103 |
+ library_dirs=info['library_dirs'], |
104 |
+ extra_postargs=info.get('extra_link_args', [])) |
105 |
+- res = "blas" |
106 |
++ res = ["blas"] |
107 |
+ except distutils.ccompiler.CompileError: |
108 |
+ res = None |
109 |
+ finally: |
110 |
|
111 |
diff --git a/dev-python/numpy/numpy-1.12.1.ebuild b/dev-python/numpy/numpy-1.12.1.ebuild |
112 |
new file mode 100644 |
113 |
index 00000000000..923ecd5f7c4 |
114 |
--- /dev/null |
115 |
+++ b/dev-python/numpy/numpy-1.12.1.ebuild |
116 |
@@ -0,0 +1,164 @@ |
117 |
+# Copyright 1999-2017 Gentoo Foundation |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=6 |
121 |
+ |
122 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
123 |
+PYTHON_REQ_USE="threads(+)" |
124 |
+ |
125 |
+FORTRAN_NEEDED=lapack |
126 |
+ |
127 |
+inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs versionator |
128 |
+ |
129 |
+DOC_PV="1.11.0" |
130 |
+DOC_P="${PN}-${DOC_PV}" |
131 |
+ |
132 |
+DESCRIPTION="Fast array and numerical python library" |
133 |
+HOMEPAGE="http://www.numpy.org/" |
134 |
+SRC_URI=" |
135 |
+ mirror://pypi/${PN:0:1}/${PN}/${P}.zip |
136 |
+ doc? ( |
137 |
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip |
138 |
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf |
139 |
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf |
140 |
+ )" |
141 |
+# It appears the docs haven't been upgraded, still @ 1.11.0 |
142 |
+LICENSE="BSD" |
143 |
+SLOT="0" |
144 |
+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" |
145 |
+IUSE="doc lapack test" |
146 |
+ |
147 |
+RDEPEND="lapack? ( virtual/cblas virtual/lapack )" |
148 |
+DEPEND="${RDEPEND} |
149 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
150 |
+ doc? ( app-arch/unzip ) |
151 |
+ lapack? ( virtual/pkgconfig ) |
152 |
+ test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )" |
153 |
+ |
154 |
+PATCHES=( |
155 |
+ "${FILESDIR}"/${P}-no-hardcode-blas.patch |
156 |
+ "${FILESDIR}"/${PN}-1.11.2-blas_rec_inc_dir.patch |
157 |
+) |
158 |
+ |
159 |
+src_unpack() { |
160 |
+ default |
161 |
+ if use doc; then |
162 |
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die |
163 |
+ fi |
164 |
+} |
165 |
+ |
166 |
+pc_incdir() { |
167 |
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ |
168 |
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' |
169 |
+} |
170 |
+ |
171 |
+pc_libdir() { |
172 |
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \ |
173 |
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' |
174 |
+} |
175 |
+ |
176 |
+pc_libs() { |
177 |
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \ |
178 |
+ sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ |
179 |
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ |
180 |
+ | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' |
181 |
+} |
182 |
+ |
183 |
+python_prepare_all() { |
184 |
+ if use lapack; then |
185 |
+ append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)" |
186 |
+ local libdir="${EPREFIX}"/usr/$(get_libdir) |
187 |
+ cat >> site.cfg <<-EOF || die |
188 |
+ [blas] |
189 |
+ include_dirs = $(pc_incdir cblas) |
190 |
+ library_dirs = $(pc_libdir cblas blas):${libdir} |
191 |
+ blas_libs = $(pc_libs cblas blas) |
192 |
+ [lapack] |
193 |
+ library_dirs = $(pc_libdir lapack):${libdir} |
194 |
+ lapack_libs = $(pc_libs lapack) |
195 |
+ EOF |
196 |
+ else |
197 |
+ export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None |
198 |
+ fi |
199 |
+ |
200 |
+ export CC="$(tc-getCC) ${CFLAGS}" |
201 |
+ |
202 |
+ append-flags -fno-strict-aliasing |
203 |
+ |
204 |
+ # See progress in http://projects.scipy.org/scipy/numpy/ticket/573 |
205 |
+ # with the subtle difference that we don't want to break Darwin where |
206 |
+ # -shared is not a valid linker argument |
207 |
+ if [[ ${CHOST} != *-darwin* ]]; then |
208 |
+ append-ldflags -shared |
209 |
+ fi |
210 |
+ |
211 |
+ # only one fortran to link with: |
212 |
+ # linking with cblas and lapack library will force |
213 |
+ # autodetecting and linking to all available fortran compilers |
214 |
+ append-fflags -fPIC |
215 |
+ if use lapack; then |
216 |
+ NUMPY_FCONFIG="config_fc --noopt --noarch" |
217 |
+ # workaround bug 335908 |
218 |
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95" |
219 |
+ fi |
220 |
+ |
221 |
+ # don't version f2py, we will handle it. |
222 |
+ sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die |
223 |
+ |
224 |
+ # we don't have f2py-3.3 |
225 |
+ sed \ |
226 |
+ -e 's:test_f2py:_&:g' \ |
227 |
+ -i numpy/tests/test_scripts.py || die |
228 |
+ |
229 |
+ # QA bug 590464 |
230 |
+ # The .py files from numpy/core/tests are just added, instead |
231 |
+ # of being bytecode compiled as a proper subdir package. |
232 |
+ # We trick the buildsystem into accepting it as a bytecode |
233 |
+ # package by adding a setup.py and an empty __init__.py |
234 |
+ #cp numpy/{compat/setup.py,core/tests} || die |
235 |
+ #touch numpy/core/tests/__init__.py || die |
236 |
+ #sed \ |
237 |
+ # -e 's:compat:tests:' \ |
238 |
+ # -i numpy/core/tests/setup.py || die |
239 |
+ #sed \ |
240 |
+ # -e "s:config\.add_data_dir('tests'):config\.add_subpackage('tests'):" \ |
241 |
+ # -i numpy/core/setup.py || die |
242 |
+ |
243 |
+ distutils-r1_python_prepare_all |
244 |
+} |
245 |
+ |
246 |
+python_compile() { |
247 |
+ distutils-r1_python_compile \ |
248 |
+ $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \ |
249 |
+ ${NUMPY_FCONFIG} |
250 |
+} |
251 |
+ |
252 |
+python_test() { |
253 |
+ distutils_install_for_testing --single-version-externally-managed --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG} |
254 |
+ |
255 |
+ cd "${TMPDIR}" || die |
256 |
+ |
257 |
+ ${EPYTHON} -c " |
258 |
+import numpy, sys |
259 |
+r = numpy.test(label='full', verbose=3) |
260 |
+sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}" |
261 |
+} |
262 |
+ |
263 |
+python_install() { |
264 |
+ distutils-r1_python_install ${NUMPY_FCONFIG} |
265 |
+} |
266 |
+ |
267 |
+python_install_all() { |
268 |
+ DOCS+=( THANKS.txt ) |
269 |
+ |
270 |
+ if use doc; then |
271 |
+ HTML_DOCS=( "${WORKDIR}"/html/. ) |
272 |
+ DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf ) |
273 |
+ fi |
274 |
+ |
275 |
+ distutils-r1_python_install_all |
276 |
+ |
277 |
+ docinto f2py |
278 |
+ dodoc doc/f2py/*.txt |
279 |
+ doman doc/f2py/f2py.1 |
280 |
+} |