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