Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/scipy: scipy-0.16.0.ebuild ChangeLog
Date: Wed, 29 Jul 2015 09:54:55
Message-Id: 20150729095450.2105DEE@oystercatcher.gentoo.org
1 jlec 15/07/29 09:54:50
2
3 Modified: ChangeLog
4 Added: scipy-0.16.0.ebuild
5 Log:
6 Version Bump
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key E9402A79B03529A2!)
9
10 Revision Changes Path
11 1.131 sci-libs/scipy/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/scipy/ChangeLog?rev=1.131&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/scipy/ChangeLog?rev=1.131&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/scipy/ChangeLog?r1=1.130&r2=1.131
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v
20 retrieving revision 1.130
21 retrieving revision 1.131
22 diff -u -r1.130 -r1.131
23 --- ChangeLog 23 Jun 2015 06:21:12 -0000 1.130
24 +++ ChangeLog 29 Jul 2015 09:54:50 -0000 1.131
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-libs/scipy
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.130 2015/06/23 06:21:12 jlec Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.131 2015/07/29 09:54:50 jlec Exp $
30 +
31 +*scipy-0.16.0 (29 Jul 2015)
32 +
33 + 29 Jul 2015; Justin Lecher <jlec@g.o> +scipy-0.16.0.ebuild:
34 + Version Bump
35
36 23 Jun 2015; Justin Lecher <jlec@g.o>
37 -files/scipy-0.12.0-cephes-missing-include.patch,
38
39
40
41 1.1 sci-libs/scipy/scipy-0.16.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/scipy/scipy-0.16.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/scipy/scipy-0.16.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: scipy-0.16.0.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.16.0.ebuild,v 1.1 2015/07/29 09:54:50 jlec Exp $
51
52 EAPI=5
53
54 PYTHON_COMPAT=( python2_7 python3_{3,4} )
55
56 DOC_PV=0.15.1
57
58 inherit eutils fortran-2 distutils-r1 flag-o-matic multilib toolchain-funcs
59
60 DESCRIPTION="Scientific algorithms library for Python"
61 HOMEPAGE="http://www.scipy.org/"
62 SRC_URI="
63 mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
64 doc? (
65 http://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip
66 http://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf
67 )"
68
69 LICENSE="BSD LGPL-2"
70 SLOT="0"
71 IUSE="doc sparse test"
72 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
73
74 CDEPEND="
75 >=dev-python/numpy-1.6.2[lapack,${PYTHON_USEDEP}]
76 sci-libs/arpack:0=
77 virtual/cblas
78 virtual/lapack
79 sparse? ( sci-libs/umfpack:0= )"
80 DEPEND="${CDEPEND}
81 dev-lang/swig
82 >=dev-python/cython-0.22[${PYTHON_USEDEP}]
83 virtual/pkgconfig
84 doc? ( app-arch/unzip )
85 test? ( dev-python/nose[${PYTHON_USEDEP}] )
86 "
87
88 RDEPEND="${CDEPEND}
89 virtual/python-imaging[${PYTHON_USEDEP}]"
90
91 DOCS=( HACKING.rst.txt THANKS.txt )
92
93 DISTUTILS_IN_SOURCE_BUILD=1
94
95 src_unpack() {
96 unpack ${P}.tar.gz
97 if use doc; then
98 unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die
99 fi
100 }
101
102 pc_incdir() {
103 $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
104 sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
105 }
106
107 pc_libdir() {
108 $(tc-getPKG_CONFIG) --libs-only-L $@ | \
109 sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
110 }
111
112 pc_libs() {
113 $(tc-getPKG_CONFIG) --libs-only-l $@ | \
114 sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
115 -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
116 | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
117 }
118
119 python_prepare_all() {
120 # scipy automatically detects libraries by default
121 export {FFTW,FFTW3,UMFPACK}=None
122 use sparse && unset UMFPACK
123 # the missing symbols are in -lpythonX.Y, but since the version can
124 # differ, we just introduce the same scaryness as on Linux/ELF
125 [[ ${CHOST} == *-darwin* ]] \
126 && append-ldflags -bundle "-undefined dynamic_lookup" \
127 || append-ldflags -shared
128 [[ -z ${FC} ]] && export FC="$(tc-getFC)"
129 # hack to force F77 to be FC until bug #278772 is fixed
130 [[ -z ${F77} ]] && export F77="$(tc-getFC)"
131 export F90="${FC}"
132 export SCIPY_FCONFIG="config_fc --noopt --noarch"
133 append-fflags -fPIC
134
135 local libdir="${EPREFIX}"/usr/$(get_libdir)
136 cat >> site.cfg <<-EOF
137 [blas]
138 include_dirs = $(pc_incdir cblas)
139 library_dirs = $(pc_libdir cblas blas):${libdir}
140 blas_libs = $(pc_libs cblas blas)
141 [lapack]
142 library_dirs = $(pc_libdir lapack):${libdir}
143 lapack_libs = $(pc_libs lapack)
144 EOF
145
146 # Drop hashes to force rebuild of cython based .c code
147 rm cythonize.dat || die
148
149 local PATCHES=(
150 "${FILESDIR}"/${PN}-0.12.0-blitz.patch
151 "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
152 )
153 distutils-r1_python_prepare_all
154 }
155
156 python_compile() {
157 ${EPYTHON} tools/cythonize.py || die
158 distutils-r1_python_compile ${SCIPY_FCONFIG}
159 }
160
161 python_test() {
162 # fails with bdist_egg. should it be fixed in distutils-r1 eclass?
163 distutils_install_for_testing ${SCIPY_FCONFIG}
164 cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
165 "${PYTHON}" -c \
166 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \
167 || die
168 "${EPYTHON}" -c \
169 "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
170 || die "Tests fail with ${EPYTHON}"
171 }
172
173 python_install_all() {
174 if use doc; then
175 dodoc "${DISTDIR}"/${PN}*pdf
176 docinto html
177 dodoc -r "${WORKDIR}"/html/.
178 fi
179 distutils-r1_python_install_all
180 }
181
182 python_install() {
183 distutils-r1_python_install ${SCIPY_FCONFIG}
184 }
185
186 pkg_postinst() {
187 elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
188 elog "to your prefered image viewer. Example:"
189 elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
190 }