Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scipy/
Date: Wed, 28 Jun 2017 04:03:00
Message-Id: 1498622411.5f01a4c5b0dab2636f782932827913c47f040cff.bicatali@gentoo
1 commit: 5f01a4c5b0dab2636f782932827913c47f040cff
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 27 05:15:44 2017 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 28 04:00:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f01a4c5
7
8 sci-libs/scipy: version bump
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 sci-libs/scipy/Manifest | 3 +
13 sci-libs/scipy/scipy-0.19.1.ebuild | 141 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 144 insertions(+)
15
16 diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest
17 index b465974e30e..54fdb6fd5ca 100644
18 --- a/sci-libs/scipy/Manifest
19 +++ b/sci-libs/scipy/Manifest
20 @@ -4,3 +4,6 @@ DIST scipy-0.16.1.tar.gz 12221561 SHA256 ecd1efbb1c038accb0516151d1e6679809c6010
21 DIST scipy-0.18.1-html.zip 32907714 SHA256 b6118abf9af19318b566521c1944d93f0dec57a7e533641348e5338f790e1279 SHA512 fc61ce9a9dcc7091da29d35a42cc38074b0c4f5ff81d5ca5dea9c2d32e5e3ee1e8463fcb4e18c931c0c0e4f00410f8cd16d0f81c219fb326edc20d2286866e03 WHIRLPOOL 52fb21455beae1b75bb1aa24eed7d2227b52fe44bf81345fd56c12316d7c6887eccc10b551f64464da7fc034e453b06095c80c95f7baeae2374e6f256035cc18
22 DIST scipy-0.18.1-ref.pdf 14824115 SHA256 c5bb8baac66c43450cab24d3fec3a4f626d51568ab311f712446b5946fe7a295 SHA512 e668420ae3668f459d15cb88765045c89df02f9c73854c8ddce8fe1611973e8c9d40ac49a1db0342282074b1d46b8156bb75430b7df079efd1c3a6ccb4bf2c37 WHIRLPOOL bf36c77059dff97402430df0721bbfe59c6e889d9c202e4a86e7f5b2cd2eb9f32115abcfaf47ceb847579bfe870707a6926d69c2c714d0655e60a9a3f7ee4103
23 DIST scipy-0.18.1.tar.gz 13141689 SHA256 8ab6e9c808bf2fb3e8576cd8cf07226d9cdc18b012c06d9708429a821ac6634e SHA512 f2ee21c808141d8002f69e48e7cf006e36982b1a7041323a8f4d803a1de3d191ffcc40227aac351dd876c28843de366ef89e9cf84dc106fadac86a3f40491659 WHIRLPOOL 977729517cfaed931123484160b9f4e7949dd46c4124757c5cbfe8607f2da9ddc3ad260ac4fcd8b382b8a801a86340405eceb3ad5a48d1a3f23dd0faa0941b7e
24 +DIST scipy-0.19.1-html.zip 38201310 SHA256 e123b40d3d550ed55df0f8fbe808ff28f6e4343c3773c553afff508819e800ba SHA512 7eecef83a92aa99a726a8839e2cdac1171129ba0efcaf8e36b07d6714fde20cce9ce9f676be6b4835845930c49f740cb11ce0d93012d0b8c990e7061bb3afbcc WHIRLPOOL 238e77c60b6356bc08f01687e6dc6ff6f07b1fddc6d30c9af78cb7a37957c5ee155708f2ee8a0644ef6aed5a787082fcf17ff35c7d95d2d8afa87100cedbdbb3
25 +DIST scipy-0.19.1-ref.pdf 17530855 SHA256 ebe464947f63e4b1160cb53356cfd1ce02311f5ff022f6cfc278abb5c540441f SHA512 79718fde0aedb4c9906b37f2d75878719b614268160e645ad69ea797d6baeecaff9153884171906e6b7673b65da997ff4fd245e0f42ab766497ee9c96f4f9fd2 WHIRLPOOL 7be151e33a06ee7bd110ab217a5afdee9591d8940d752eb672b0e7a22eea5497d5a8e84e7784dc335f1a926aef7ecca9d5e5f6bd5862a0674ba640ea05614daf
26 +DIST scipy-0.19.1.tar.gz 14083805 SHA256 a19a2ca7a7336495ec180adeaa0dfdcf41e96dbbee90d51c3ed828ba570884e6 SHA512 5c124c44c672dcb53c31f8592fd9f74189f04cb0bade99476a2a6eb4844338e3e9842f27a148b007b7eed25cbfde090a697575a381ebe4ca066abdf54c214203 WHIRLPOOL 9d12befdb6504a05fd6c7917fc340726e2a498d8cd5c38d4e0abce8e6d16685c1857ff12f111daa4f4ad955e633746520ef706ff8b674c327685e2dd7790107b
27
28 diff --git a/sci-libs/scipy/scipy-0.19.1.ebuild b/sci-libs/scipy/scipy-0.19.1.ebuild
29 new file mode 100644
30 index 00000000000..e79deab952a
31 --- /dev/null
32 +++ b/sci-libs/scipy/scipy-0.19.1.ebuild
33 @@ -0,0 +1,141 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
40 +PYTHON_REQ_USE="threads(+)"
41 +
42 +DOC_PV=${PV}
43 +
44 +inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs
45 +
46 +DESCRIPTION="Scientific algorithms library for Python"
47 +HOMEPAGE="https://www.scipy.org/"
48 +SRC_URI="
49 + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
50 + doc? (
51 + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip
52 + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf
53 + )"
54 +
55 +LICENSE="BSD LGPL-2"
56 +SLOT="0"
57 +IUSE="doc sparse test"
58 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
59 +
60 +CDEPEND="
61 + >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}]
62 + sci-libs/arpack:0=
63 + virtual/cblas
64 + virtual/lapack
65 + sparse? ( sci-libs/umfpack:0= )"
66 +DEPEND="${CDEPEND}
67 + dev-lang/swig
68 + >=dev-python/cython-0.22[${PYTHON_USEDEP}]
69 + virtual/pkgconfig
70 + doc? ( app-arch/unzip )
71 + test? ( dev-python/nose[${PYTHON_USEDEP}] )"
72 +RDEPEND="${CDEPEND}
73 + dev-python/pillow[${PYTHON_USEDEP}]"
74 +
75 +DOCS=( HACKING.rst.txt THANKS.txt )
76 +
77 +DISTUTILS_IN_SOURCE_BUILD=1
78 +
79 +src_unpack() {
80 + default
81 + if use doc; then
82 + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.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 + # scipy automatically detects libraries by default
105 + export {FFTW,FFTW3,UMFPACK}=None
106 + use sparse && unset UMFPACK
107 + # the missing symbols are in -lpythonX.Y, but since the version can
108 + # differ, we just introduce the same scaryness as on Linux/ELF
109 + [[ ${CHOST} == *-darwin* ]] \
110 + && append-ldflags -bundle "-undefined dynamic_lookup" \
111 + || append-ldflags -shared
112 + [[ -z ${FC} ]] && export FC="$(tc-getFC)"
113 + # hack to force F77 to be FC until bug #278772 is fixed
114 + [[ -z ${F77} ]] && export F77="$(tc-getFC)"
115 + export F90="${FC}"
116 + export SCIPY_FCONFIG="config_fc --noopt --noarch"
117 + append-fflags -fPIC
118 +
119 + local libdir="${EPREFIX}"/usr/$(get_libdir)
120 + cat >> site.cfg <<-EOF || die
121 + [blas]
122 + include_dirs = $(pc_incdir cblas)
123 + library_dirs = $(pc_libdir cblas blas):${libdir}
124 + blas_libs = $(pc_libs cblas blas)
125 + [lapack]
126 + library_dirs = $(pc_libdir lapack):${libdir}
127 + lapack_libs = $(pc_libs lapack)
128 + EOF
129 +
130 + # Drop hashes to force rebuild of cython based .c code
131 + rm cythonize.dat || die
132 +
133 + distutils-r1_python_prepare_all
134 +}
135 +
136 +python_compile() {
137 + ${EPYTHON} tools/cythonize.py || die
138 + distutils-r1_python_compile \
139 + $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \
140 + ${SCIPY_FCONFIG}
141 +}
142 +
143 +python_test() {
144 + # fails with bdist_egg. should it be fixed in distutils-r1 eclass?
145 + distutils_install_for_testing ${SCIPY_FCONFIG}
146 + cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
147 + "${PYTHON}" -c \
148 + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \
149 + || die
150 + # https://github.com/scipy/scipy/issues/5426
151 + "${EPYTHON}" -c \
152 + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \
153 + || die "Tests fail with ${EPYTHON}"
154 +# "${EPYTHON}" -c \
155 +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
156 +# || die "Tests fail with ${EPYTHON}"
157 +}
158 +
159 +python_install_all() {
160 + use doc && \
161 + local DOCS=( "${DISTDIR}"/${PN}-${DOC_PV}-ref.pdf ) \
162 + local HTML_DOCS=( "${WORKDIR}"/html/. )
163 + distutils-r1_python_install_all
164 +}
165 +
166 +python_install() {
167 + distutils-r1_python_install ${SCIPY_FCONFIG}
168 +}
169 +
170 +pkg_postinst() {
171 + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
172 + elog "to your prefered image viewer. Example:"
173 + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
174 +}