Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scipy/
Date: Sun, 25 Oct 2015 18:10:15
Message-Id: 1445796605.f7fa28854faef51e8d66fdf1c51395752a285640.jlec@gentoo
1 commit: f7fa28854faef51e8d66fdf1c51395752a285640
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 25 18:09:55 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 25 18:10:05 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7fa2885
7
8 sci-libs/scipy: Version Bump
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 sci-libs/scipy/Manifest | 3 +
14 sci-libs/scipy/scipy-0.16.1.ebuild | 143 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 146 insertions(+)
16
17 diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest
18 index 53817b2..0b3e529 100644
19 --- a/sci-libs/scipy/Manifest
20 +++ b/sci-libs/scipy/Manifest
21 @@ -2,3 +2,6 @@ DIST scipy-0.15.1-html.zip 24956050 SHA256 c27d3656ffed1b988890cf192c692f646b00d
22 DIST scipy-0.15.1-ref.pdf 18313446 SHA256 d96046ddbc91383fb37e3ae2bbdc6945e0c2fc70fa230e0bcda0789e6025ca7e SHA512 9ca6a656e454058273f5153d84acbca42f4ea9b99d0dbfde4a019cbb3ef7e87c4068660bc787506ca749024d45efaea7254614486d56b114c762fc8a69c3b496 WHIRLPOOL b907a6011671b0e0919d48b3e4587fd09cad3f2b463a302e1c9be22facec5f2d599b1eb9497a0cf1e3a0125b3beda0b1e00e7ca2cd40453c49a2df368b9c794e
23 DIST scipy-0.15.1.tar.gz 11401878 SHA256 a212cbc3b79e9a563aa45fc5c517b3499198bd7eb7e7be1e047568a5f48c259a SHA512 fff4412d850c431a1b4e6ee3b17958ee5ab3beb81e6cb8a8e7d56d368751eaa8781d7c3e69d932dc002d718fddc66a72098acfe74cfe29ec80b24e6736317275 WHIRLPOOL 31f2f6ca33be1945bedf41f84cf62831c9b22f4d7079d2b0b7b21706b17eb4ab5f3a948be645bcb86a35f3a714e4f277bd66261d02d20d8aeb5077b2095c952f
24 DIST scipy-0.16.0.tar.gz 18137295 SHA256 92592f40097098f3fdbe7f5855d535b29bb16719c2bb59c728bce5e7a28790e0 SHA512 943f21a2798db124b7e1fb9257064b725702cc6656a90ae10dda285c36166c378304c7d44a571b5ab4ef6819e995ea42e947417e16b2a665dd6db4a460adbd89 WHIRLPOOL ba99d1ea46522814e9181c8991cede8b8a8f4a00b39d3fffc5fa570a52d4ef57044e9af4bb37ea24e733ec6af226e2787a4e88360c53d7bd67a505446725c62f
25 +DIST scipy-0.16.1-html.zip 33158474 SHA256 4183a170f10537f343b0bb6d77abb3c8a6abc3ebfb7e36d90713d852f1e3e5c5 SHA512 47b1ebd43b58ada7f4fd772e2a94c25d8ee2b03d808743ac386c7fbcc8a1daa3082906156ba421b1dd91ce2fb4f0114639ea124caac7522d919507029fee6c1a WHIRLPOOL 5289e9ebf32be6ea9c75c022913bcf303743efc3ad010a394c186ea9ecf1f0155ce658b6595d264531c46d27b4e7a9d760ab906698cd18e5fae9c123f08494d2
26 +DIST scipy-0.16.1-ref.pdf 33916573 SHA256 4fb994f7706142bb519183bbeca665422b68bd7835e074847c81b75e1c3cd755 SHA512 eaf7221c2dcb2cf0bcddcaf6064e52f3d1542edaf0238fa96ae62e27911b275a3bc7ee624fe655b0abd00055312f18582d49cafdccf339f7c38aa93ca5badea9 WHIRLPOOL b8703c52e42fdd34b54496a755327fca8a6fe03fbc500497e961a13bbb84dee58b29b7158ba44c5bc317c85103bcf4778381640fb8f1f8e719b1d886fa74fb9e
27 +DIST scipy-0.16.1.tar.gz 12221561 SHA256 ecd1efbb1c038accb0516151d1e6679809c6010288765eb5da6051550bf52260 SHA512 1761a943a0629179fd546fe3754b16101ca86b98eb0539b73614ea65bce24055ca898f295683eb3f3f63402ebbbb9248aa2a9f6a1d7d6cdf5e1e7486b15c1a8b WHIRLPOOL 3a3924a41cfb407b0fd91e7dfa2d29a8f6ee7694681fdfe58aefab0e1272e6c1e20c814344abc4ab7cbbbb7a8de7f5867819cee73ca624d8cbdcb5db456a8025
28
29 diff --git a/sci-libs/scipy/scipy-0.16.1.ebuild b/sci-libs/scipy/scipy-0.16.1.ebuild
30 new file mode 100644
31 index 0000000..33610d6
32 --- /dev/null
33 +++ b/sci-libs/scipy/scipy-0.16.1.ebuild
34 @@ -0,0 +1,143 @@
35 +# Copyright 1999-2015 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI=5
40 +
41 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
42 +
43 +DOC_PV=${PV}
44 +
45 +inherit eutils fortran-2 distutils-r1 flag-o-matic multilib 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.6.2[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 + "
74 +
75 +RDEPEND="${CDEPEND}
76 + virtual/python-imaging[${PYTHON_USEDEP}]"
77 +
78 +DOCS=( HACKING.rst.txt THANKS.txt )
79 +
80 +DISTUTILS_IN_SOURCE_BUILD=1
81 +
82 +src_unpack() {
83 + unpack ${P}.tar.gz
84 + if use doc; then
85 + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die
86 + fi
87 +}
88 +
89 +pc_incdir() {
90 + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
91 + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
92 +}
93 +
94 +pc_libdir() {
95 + $(tc-getPKG_CONFIG) --libs-only-L $@ | \
96 + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
97 +}
98 +
99 +pc_libs() {
100 + $(tc-getPKG_CONFIG) --libs-only-l $@ | \
101 + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
102 + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
103 + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
104 +}
105 +
106 +python_prepare_all() {
107 + # scipy automatically detects libraries by default
108 + export {FFTW,FFTW3,UMFPACK}=None
109 + use sparse && unset UMFPACK
110 + # the missing symbols are in -lpythonX.Y, but since the version can
111 + # differ, we just introduce the same scaryness as on Linux/ELF
112 + [[ ${CHOST} == *-darwin* ]] \
113 + && append-ldflags -bundle "-undefined dynamic_lookup" \
114 + || append-ldflags -shared
115 + [[ -z ${FC} ]] && export FC="$(tc-getFC)"
116 + # hack to force F77 to be FC until bug #278772 is fixed
117 + [[ -z ${F77} ]] && export F77="$(tc-getFC)"
118 + export F90="${FC}"
119 + export SCIPY_FCONFIG="config_fc --noopt --noarch"
120 + append-fflags -fPIC
121 +
122 + local libdir="${EPREFIX}"/usr/$(get_libdir)
123 + cat >> site.cfg <<-EOF
124 + [blas]
125 + include_dirs = $(pc_incdir cblas)
126 + library_dirs = $(pc_libdir cblas blas):${libdir}
127 + blas_libs = $(pc_libs cblas blas)
128 + [lapack]
129 + library_dirs = $(pc_libdir lapack):${libdir}
130 + lapack_libs = $(pc_libs lapack)
131 + EOF
132 +
133 + # Drop hashes to force rebuild of cython based .c code
134 + rm cythonize.dat || die
135 +
136 + local PATCHES=(
137 + "${FILESDIR}"/${PN}-0.12.0-blitz.patch
138 + "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
139 + )
140 + distutils-r1_python_prepare_all
141 +}
142 +
143 +python_compile() {
144 + ${EPYTHON} tools/cythonize.py || die
145 + distutils-r1_python_compile ${SCIPY_FCONFIG}
146 +}
147 +
148 +python_test() {
149 + # fails with bdist_egg. should it be fixed in distutils-r1 eclass?
150 + distutils_install_for_testing ${SCIPY_FCONFIG}
151 + cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
152 + "${PYTHON}" -c \
153 + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \
154 + || die
155 + "${EPYTHON}" -c \
156 + "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
157 + || die "Tests fail with ${EPYTHON}"
158 +}
159 +
160 +python_install_all() {
161 + if use doc; then
162 + dodoc "${DISTDIR}"/${PN}*pdf
163 + docinto html
164 + dodoc -r "${WORKDIR}"/html/.
165 + fi
166 + distutils-r1_python_install_all
167 +}
168 +
169 +python_install() {
170 + distutils-r1_python_install ${SCIPY_FCONFIG}
171 +}
172 +
173 +pkg_postinst() {
174 + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
175 + elog "to your prefered image viewer. Example:"
176 + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
177 +}