Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scipy/
Date: Sat, 08 Oct 2016 12:13:18
Message-Id: 1475928770.5d36e49753e6a6b13250384226f3f6c93f9a0d0d.soap@gentoo
1 commit: 5d36e49753e6a6b13250384226f3f6c93f9a0d0d
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 8 11:52:21 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 8 12:12:50 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d36e497
7
8 sci-libs/scipy: Version bump to 0.18.1
9
10 Package-Manager: portage-2.3.1
11
12 sci-libs/scipy/Manifest | 3 +
13 sci-libs/scipy/scipy-0.18.1.ebuild | 147 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 150 insertions(+)
15
16 diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest
17 index 615f27d..74ff667 100644
18 --- a/sci-libs/scipy/Manifest
19 +++ b/sci-libs/scipy/Manifest
20 @@ -8,3 +8,6 @@ DIST scipy-0.16.1.tar.gz 12221561 SHA256 ecd1efbb1c038accb0516151d1e6679809c6010
21 DIST scipy-0.17.0-html.zip 27600230 SHA256 f7e4459d9797d7e83231926a15f667c9337fffa4a3cd6ec90c00c2290e4e0656 SHA512 30cb76490bb9b539f27bb874d86619e639322fd35c367a5f74057c510e4751a994052fef14916c166bde52c0599388587a50e8967a3d7aa52ada8f1500d8437e WHIRLPOOL 1edf0a97f87fc0f8d1467583a0e834bba86d2535b2f52ef5a3d97fc44016cf9ddb620953a51efe0b865ea029e3cdba147da4708c81e7daba5ce0811f5c5fe721
22 DIST scipy-0.17.0-ref.pdf 12206837 SHA256 67e4e1ff7b2ba5d92dee9fca71c332f686008356c24562e0608edad9c5ad9096 SHA512 49c7cdb153fb37985becbe13d9f491812bdcc8b98a4ebd71da9ca9519819161010615ec359d10494fc44164e5b961415e5d9d8b361f97b404ec4c6f1d9af2a50 WHIRLPOOL 86052b2e2f0a0e88e60e283f2f3cd551a95bda24a7839d71633e5b17da0ae4c025cdcc89a173da45e29728a754488243ac109d63d5ae68039f2f1d3d447a84bc
23 DIST scipy-0.17.0.tar.gz 12397929 SHA256 f600b755fb69437d0f70361f9e560ab4d304b1b66987ed5a28bdd9dd7793e089 SHA512 de6409d75a3ff3cf1e5391d3b09126f0bc7e1a40a15f9bee244195638fe2f8481fca032896d8534623e6122ff59aaf669664e27ff89cf1b094a5ce7312f220b7 WHIRLPOOL 9ebbb6bcdbf107882690998b83ac304889e077e7b866a31c1cd8c615785d5377964d9e4d75ac4589ad7aed7f392e5a59f892b55be5d12da12eb08811f6aaef10
24 +DIST scipy-0.18.1-html.zip 32907714 SHA256 b6118abf9af19318b566521c1944d93f0dec57a7e533641348e5338f790e1279 SHA512 fc61ce9a9dcc7091da29d35a42cc38074b0c4f5ff81d5ca5dea9c2d32e5e3ee1e8463fcb4e18c931c0c0e4f00410f8cd16d0f81c219fb326edc20d2286866e03 WHIRLPOOL 52fb21455beae1b75bb1aa24eed7d2227b52fe44bf81345fd56c12316d7c6887eccc10b551f64464da7fc034e453b06095c80c95f7baeae2374e6f256035cc18
25 +DIST scipy-0.18.1-ref.pdf 14824115 SHA256 c5bb8baac66c43450cab24d3fec3a4f626d51568ab311f712446b5946fe7a295 SHA512 e668420ae3668f459d15cb88765045c89df02f9c73854c8ddce8fe1611973e8c9d40ac49a1db0342282074b1d46b8156bb75430b7df079efd1c3a6ccb4bf2c37 WHIRLPOOL bf36c77059dff97402430df0721bbfe59c6e889d9c202e4a86e7f5b2cd2eb9f32115abcfaf47ceb847579bfe870707a6926d69c2c714d0655e60a9a3f7ee4103
26 +DIST scipy-0.18.1.tar.gz 13141689 SHA256 8ab6e9c808bf2fb3e8576cd8cf07226d9cdc18b012c06d9708429a821ac6634e SHA512 f2ee21c808141d8002f69e48e7cf006e36982b1a7041323a8f4d803a1de3d191ffcc40227aac351dd876c28843de366ef89e9cf84dc106fadac86a3f40491659 WHIRLPOOL 977729517cfaed931123484160b9f4e7949dd46c4124757c5cbfe8607f2da9ddc3ad260ac4fcd8b382b8a801a86340405eceb3ad5a48d1a3f23dd0faa0941b7e
27
28 diff --git a/sci-libs/scipy/scipy-0.18.1.ebuild b/sci-libs/scipy/scipy-0.18.1.ebuild
29 new file mode 100644
30 index 00000000..6a86dca
31 --- /dev/null
32 +++ b/sci-libs/scipy/scipy-0.18.1.ebuild
33 @@ -0,0 +1,147 @@
34 +# Copyright 1999-2016 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id$
37 +
38 +EAPI=6
39 +
40 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
41 +PYTHON_REQ_USE="threads(+)"
42 +
43 +DOC_PV=${PV}
44 +
45 +inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs
46 +
47 +DESCRIPTION="Scientific algorithms library for Python"
48 +HOMEPAGE="https://www.scipy.org/"
49 +SRC_URI="
50 + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
51 + doc? (
52 + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip
53 + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf
54 + )"
55 +
56 +LICENSE="BSD LGPL-2"
57 +SLOT="0"
58 +IUSE="doc sparse test"
59 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
60 +
61 +CDEPEND="
62 + >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}]
63 + sci-libs/arpack:0=
64 + virtual/cblas
65 + virtual/lapack
66 + sparse? ( sci-libs/umfpack:0= )"
67 +DEPEND="${CDEPEND}
68 + dev-lang/swig
69 + >=dev-python/cython-0.22[${PYTHON_USEDEP}]
70 + virtual/pkgconfig
71 + doc? ( app-arch/unzip )
72 + test? ( dev-python/nose[${PYTHON_USEDEP}] )"
73 +RDEPEND="${CDEPEND}
74 + dev-python/pillow[${PYTHON_USEDEP}]"
75 +
76 +DOCS=( HACKING.rst.txt THANKS.txt )
77 +
78 +DISTUTILS_IN_SOURCE_BUILD=1
79 +
80 +PATCHES=(
81 + "${FILESDIR}"/${PN}-0.12.0-blitz.patch
82 + "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
83 +)
84 +
85 +src_unpack() {
86 + default
87 + if use doc; then
88 + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die
89 + fi
90 +}
91 +
92 +pc_incdir() {
93 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
94 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
95 +}
96 +
97 +pc_libdir() {
98 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
99 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
100 +}
101 +
102 +pc_libs() {
103 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
104 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
105 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
106 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
107 +}
108 +
109 +python_prepare_all() {
110 + # scipy automatically detects libraries by default
111 + export {FFTW,FFTW3,UMFPACK}=None
112 + use sparse && unset UMFPACK
113 + # the missing symbols are in -lpythonX.Y, but since the version can
114 + # differ, we just introduce the same scaryness as on Linux/ELF
115 + [[ ${CHOST} == *-darwin* ]] \
116 + && append-ldflags -bundle "-undefined dynamic_lookup" \
117 + || append-ldflags -shared
118 + [[ -z ${FC} ]] && export FC="$(tc-getFC)"
119 + # hack to force F77 to be FC until bug #278772 is fixed
120 + [[ -z ${F77} ]] && export F77="$(tc-getFC)"
121 + export F90="${FC}"
122 + export SCIPY_FCONFIG="config_fc --noopt --noarch"
123 + append-fflags -fPIC
124 +
125 + local libdir="${EPREFIX}"/usr/$(get_libdir)
126 + cat >> site.cfg <<-EOF || die
127 + [blas]
128 + include_dirs = $(pc_incdir cblas)
129 + library_dirs = $(pc_libdir cblas blas):${libdir}
130 + blas_libs = $(pc_libs cblas blas)
131 + [lapack]
132 + library_dirs = $(pc_libdir lapack):${libdir}
133 + lapack_libs = $(pc_libs lapack)
134 + EOF
135 +
136 + # Drop hashes to force rebuild of cython based .c code
137 + rm cythonize.dat || die
138 +
139 + distutils-r1_python_prepare_all
140 +}
141 +
142 +python_compile() {
143 + ${EPYTHON} tools/cythonize.py || die
144 + distutils-r1_python_compile \
145 + $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \
146 + ${SCIPY_FCONFIG}
147 +}
148 +
149 +python_test() {
150 + # fails with bdist_egg. should it be fixed in distutils-r1 eclass?
151 + distutils_install_for_testing ${SCIPY_FCONFIG}
152 + cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
153 + "${PYTHON}" -c \
154 + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \
155 + || die
156 + # https://github.com/scipy/scipy/issues/5426
157 + "${EPYTHON}" -c \
158 + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \
159 + || die "Tests fail with ${EPYTHON}"
160 +# "${EPYTHON}" -c \
161 +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
162 +# || die "Tests fail with ${EPYTHON}"
163 +}
164 +
165 +python_install_all() {
166 + use doc && \
167 + local DOCS=( "${DISTDIR}"/${PN}*pdf ) \
168 + local HTML_DOCS=( "${WORKDIR}"/html/. )
169 + distutils-r1_python_install_all
170 +}
171 +
172 +python_install() {
173 + distutils-r1_python_install ${SCIPY_FCONFIG}
174 +}
175 +
176 +pkg_postinst() {
177 + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
178 + elog "to your prefered image viewer. Example:"
179 + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
180 +}