Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/numpy: numpy-1.0.4-r2.ebuild ChangeLog numpy-1.1.0.ebuild
Date: Sun, 22 Jun 2008 11:13:08
Message-Id: E1KANVG-00012h-Cp@stork.gentoo.org
1 bicatali 08/06/22 11:13:02
2
3 Modified: numpy-1.0.4-r2.ebuild ChangeLog
4 Added: numpy-1.1.0.ebuild
5 Log:
6 Version bump and added more configuration for better multiple lapack implementations
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.11 dev-python/numpy/numpy-1.0.4-r2.ebuild
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild?rev=1.11&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild?rev=1.11&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild?r1=1.10&r2=1.11
15
16 Index: numpy-1.0.4-r2.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild,v
19 retrieving revision 1.10
20 retrieving revision 1.11
21 diff -u -r1.10 -r1.11
22 --- numpy-1.0.4-r2.ebuild 20 May 2008 13:52:31 -0000 1.10
23 +++ numpy-1.0.4-r2.ebuild 22 Jun 2008 11:13:01 -0000 1.11
24 @@ -1,16 +1,13 @@
25 # Copyright 1999-2008 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild,v 1.10 2008/05/20 13:52:31 bicatali Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.4-r2.ebuild,v 1.11 2008/06/22 11:13:01 bicatali Exp $
29
30 NEED_PYTHON=2.3
31
32 inherit distutils eutils flag-o-matic fortran
33
34 -MY_P=${P/_beta/b}
35 -MY_P=${MY_P/_}
36 -
37 DESCRIPTION="Fast array and numerical python library"
38 -SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz"
39 +SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz"
40 HOMEPAGE="http://numeric.scipy.org/"
41
42 RDEPEND="!dev-python/f2py
43 @@ -24,8 +21,6 @@
44 KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
45 LICENSE="BSD"
46
47 -S="${WORKDIR}/${MY_P}"
48 -
49 # whatever LDFLAGS set will break linking
50 # see progress in http://projects.scipy.org/scipy/numpy/ticket/573
51 if [ -n "${LDFLAGS}" ]; then
52 @@ -76,29 +71,20 @@
53 # Detect phenom and nocona hardware correctly. Bug #183236.
54 epatch "${FILESDIR}"/${P}-cpuinfo.patch
55
56 - # Gentoo patch for ATLAS library and include dirs
57 - sed -i \
58 - -e "s:'f77blas':'blas':g" \
59 - -e "s:'ptf77blas':'blas':g" \
60 - -e "s:'ptcblas':'cblas':g" \
61 - -e "s:'lapack_atlas':'lapack':g" \
62 - -e "s:'atlas\*',:'','atlas\*',:g" \
63 - numpy/distutils/system_info.py \
64 - || die "sed system_info.py failed"
65 -
66 - cat > site.cfg <<-EOF
67 - [DEFAULT]
68 - library_dirs = /usr/$(get_libdir)
69 - include_dirs = /usr/include
70 - EOF
71 -
72 if use lapack; then
73 + append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
74 # cblas and lapack libraries under the name of atlas
75 - # otherwise scipy will not create fast _dotblas
76 + # otherwise fast _dotblas is not built
77 cat >> site.cfg <<-EOF
78 [atlas]
79 - atlas_libs = $(pkg-config --libs-only-l cblas lapack \
80 - | sed -e 's/^-l//' -e 's/ -l/,/g')
81 + include_dirs = $(pkg-config --cflags-only-I cblas lapack \
82 + | sed -e 's/^-I//' -e 's/ -I/:/g')
83 + library_dirs = $(pkg-config --libs-only-L cblas lapack \
84 + | sed -e 's/^-L//' -e 's/ -L/:/g')
85 + atlas_libs = $(pkg-config --libs-only-l cblas \
86 + | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
87 + lapack_libs = $(pkg-config --libs-only-l lapack \
88 + | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
89 EOF
90 else
91 export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
92 @@ -137,9 +123,11 @@
93 }
94
95 pkg_postinst() {
96 - if ! built_with_use sys-devel/gcc fortran && ! has_version dev-lang/ifc; then
97 + if ! built_with_use sys-devel/gcc fortran &&
98 + ! has_version dev-lang/ifc
99 + then
100 ewarn "To use numpy's f2py you need a fortran compiler."
101 - ewarn "You can either set USE=fortran flag and re-emerge gcc,"
102 - ewarn "or emerge dev-lang/ifc"
103 + ewarn "You can either set USE=fortran flag and re-install gcc,"
104 + ewarn "or install dev-lang/ifc"
105 fi
106 }
107
108
109
110 1.61 dev-python/numpy/ChangeLog
111
112 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.61&view=markup
113 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.61&content-type=text/plain
114 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?r1=1.60&r2=1.61
115
116 Index: ChangeLog
117 ===================================================================
118 RCS file: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v
119 retrieving revision 1.60
120 retrieving revision 1.61
121 diff -u -r1.60 -r1.61
122 --- ChangeLog 20 May 2008 13:52:31 -0000 1.60
123 +++ ChangeLog 22 Jun 2008 11:13:01 -0000 1.61
124 @@ -1,6 +1,13 @@
125 # ChangeLog for dev-python/numpy
126 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
127 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.60 2008/05/20 13:52:31 bicatali Exp $
128 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.61 2008/06/22 11:13:01 bicatali Exp $
129 +
130 +*numpy-1.1.0 (22 Jun 2008)
131 +
132 + 22 Jun 2008; Sébastien Fabbro <bicatali@g.o>
133 + +files/numpy-1.1.0-f2py.patch, numpy-1.0.4-r2.ebuild, +numpy-1.1.0.ebuild:
134 + Version bump and added more configuration for better multiple lapack
135 + implementations
136
137 20 May 2008; Sébastien Fabbro <bicatali@g.o>
138 +files/numpy-1.0.4-cpuinfo.patch, -files/numpy-1.0.4-nocona-cpuinfo.patch,
139
140
141
142 1.1 dev-python/numpy/numpy-1.1.0.ebuild
143
144 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.1.0.ebuild?rev=1.1&view=markup
145 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.1.0.ebuild?rev=1.1&content-type=text/plain
146
147 Index: numpy-1.1.0.ebuild
148 ===================================================================
149 # Copyright 1999-2008 Gentoo Foundation
150 # Distributed under the terms of the GNU General Public License v2
151 # $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.1.0.ebuild,v 1.1 2008/06/22 11:13:01 bicatali Exp $
152
153 NEED_PYTHON=2.4
154
155 inherit distutils eutils flag-o-matic fortran
156
157 DESCRIPTION="Fast array and numerical python library"
158 SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz"
159 HOMEPAGE="http://numeric.scipy.org/"
160
161 RDEPEND="!dev-python/f2py
162 lapack? ( virtual/cblas virtual/lapack )"
163
164 DEPEND="${RDEPEND}
165 lapack? ( dev-util/pkgconfig )"
166
167 IUSE="lapack"
168 SLOT="0"
169 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
170 LICENSE="BSD"
171
172 # whatever LDFLAGS set will break linking
173 # see progress in http://projects.scipy.org/scipy/numpy/ticket/573
174 if [ -n "${LDFLAGS}" ]; then
175 append-ldflags -shared
176 else
177 LDFLAGS="-shared"
178 fi
179
180 pkg_setup() {
181 # only one fortran to link with:
182 # linking with cblas and lapack library will force
183 # autodetecting and linking to all available fortran compilers
184 use lapack || return
185 FORTRAN="gfortran g77 ifc"
186 fortran_pkg_setup
187 local fc=
188 case ${FORTRANC} in
189 gfortran) fc=gnu95 ;;
190 g77) fc=gnu ;;
191 ifc|ifort)
192 if use ia64; then
193 fc=intele
194 elif use amd64; then
195 fc=intelem
196 else
197 fc=intel
198 fi
199 ;;
200 *) eerror "Unknown fortran compiler: ${FORTRANC}"
201 die "numpy_fortran_setup failed" ;;
202 esac
203
204 # when fortran flags are set, pic is removed.
205 use amd64 && FFLAGS="${FFLAGS} -fPIC"
206 export NUMPY_FCONFIG="config_fc --fcompiler=${fc}"
207 }
208
209 src_unpack() {
210 unpack ${A}
211 cd "${S}"
212
213 # Fix some paths and docs in f2py
214 epatch "${FILESDIR}"/${P}-f2py.patch
215
216 if use lapack; then
217 append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
218 # cblas and lapack libraries under the name of atlas
219 # otherwise fast _dotblas is not built
220 cat >> site.cfg <<-EOF
221 [atlas]
222 include_dirs = $(pkg-config --cflags-only-I cblas lapack \
223 | sed -e 's/^-I//' -e 's/ -I/:/g')
224 library_dirs = $(pkg-config --libs-only-L cblas lapack \
225 | sed -e 's/^-L//' -e 's/ -L/:/g')
226 atlas_libs = $(pkg-config --libs-only-l cblas \
227 | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
228 lapack_libs = $(pkg-config --libs-only-l lapack \
229 | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
230 EOF
231 else
232 export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
233 fi
234 }
235
236 src_compile() {
237 # when fortran flags are set, pic is removed but unfortunately needed
238 distutils_src_compile ${NUMPY_FCONFIG}
239 }
240
241 src_test() {
242 "${python}" setup.py ${NUMPY_FCONFIG} install \
243 --home="${S}"/test \
244 --no-compile \
245 || die "install test failed"
246
247 pushd "${S}"/test/lib*/python
248 PYTHONPATH=. "${python}" -c "import numpy; numpy.test(10,3)" 2>&1 \
249 | tee test.log
250 grep -q '^OK$' test.log || die "test failed"
251 popd
252
253 rm -rf test
254 }
255
256 src_install() {
257 distutils_src_install ${NUMPY_FCONFIG}
258
259 docinto numpy
260 dodoc numpy/doc/*txt || die "dodoc failed"
261
262 docinto f2py
263 dodoc numpy/f2py/docs/*txt || die "dodoc f2py failed"
264 doman numpy/f2py/f2py.1 || die "doman failed"
265 }
266
267 pkg_postinst() {
268 if ! built_with_use sys-devel/gcc fortran &&
269 ! has_version dev-lang/ifc
270 then
271 ewarn "To use numpy's f2py you need a fortran compiler."
272 ewarn "You can either set USE=fortran flag and re-install gcc,"
273 ewarn "or install dev-lang/ifc"
274 fi
275 }
276
277
278
279 --
280 gentoo-commits@l.g.o mailing list