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: ChangeLog numpy-1.3.0.ebuild
Date: Tue, 07 Apr 2009 15:22:40
Message-Id: E1LrD8H-0007B7-BG@stork.gentoo.org
1 bicatali 09/04/07 15:22:37
2
3 Modified: ChangeLog
4 Added: numpy-1.3.0.ebuild
5 Log:
6 Version bump, removed fortran eclass
7 (Portage version: 2.2_rc28/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.74 dev-python/numpy/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.74&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.74&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?r1=1.73&r2=1.74
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v
19 retrieving revision 1.73
20 retrieving revision 1.74
21 diff -u -r1.73 -r1.74
22 --- ChangeLog 6 Apr 2009 18:17:44 -0000 1.73
23 +++ ChangeLog 7 Apr 2009 15:22:37 -0000 1.74
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-python/numpy
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.73 2009/04/06 18:17:44 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.74 2009/04/07 15:22:37 bicatali Exp $
29 +
30 +*numpy-1.3.0 (07 Apr 2009)
31 +
32 + 07 Apr 2009; Sébastien Fabbro <bicatali@g.o> +numpy-1.3.0.ebuild:
33 + Version bump, removed fortran eclass
34
35 06 Apr 2009; Raúl Porcel <armin76@g.o> numpy-1.0.4-r2.ebuild,
36 numpy-1.1.1.ebuild, numpy-1.2.1.ebuild:
37
38
39
40 1.1 dev-python/numpy/numpy-1.3.0.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.3.0.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.3.0.ebuild?rev=1.1&content-type=text/plain
44
45 Index: numpy-1.3.0.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.3.0.ebuild,v 1.1 2009/04/07 15:22:37 bicatali Exp $
50
51 NEED_PYTHON=2.4
52 EAPI=2
53 inherit eutils distutils flag-o-matic toolchain-funcs
54
55 DESCRIPTION="Fast array and numerical python library"
56 SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz"
57 HOMEPAGE="http://numpy.scipy.org/"
58
59 RDEPEND="lapack? ( virtual/cblas virtual/lapack )"
60 DEPEND="${RDEPEND}
61 lapack? ( dev-util/pkgconfig )
62 test? ( >=dev-python/nose-0.10 )"
63
64 IUSE="lapack test"
65 SLOT="0"
66 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
67 LICENSE="BSD"
68
69 # whatever LDFLAGS set will break linking
70 # see progress in http://projects.scipy.org/scipy/numpy/ticket/573
71 if [ -n "${LDFLAGS}" ]; then
72 append-ldflags -shared
73 else
74 LDFLAGS="-shared"
75 fi
76
77 pkg_setup() {
78 # only one fortran to link with:
79 # linking with cblas and lapack library will force
80 # autodetecting and linking to all available fortran compilers
81 use lapack || return
82 [[ -z ${FC} ]] && FC=$(tc-getFC)
83 # when fortran flags are set, pic is removed.
84 FFLAGS="${FFLAGS} -fPIC"
85 export NUMPY_FCONFIG="config_fc --noopt --noarch"
86 }
87
88 src_prepare() {
89 # Fix some paths and docs in f2py
90 epatch "${FILESDIR}"/${PN}-1.1.0-f2py.patch
91
92 # Gentoo patch for ATLAS library names
93 sed -i \
94 -e "s:'f77blas':'blas':g" \
95 -e "s:'ptf77blas':'blas':g" \
96 -e "s:'ptcblas':'cblas':g" \
97 -e "s:'lapack_atlas':'lapack':g" \
98 numpy/distutils/system_info.py \
99 || die "sed system_info.py failed"
100
101 if use lapack; then
102 append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
103 sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
104 cat >> site.cfg <<-EOF
105 [atlas]
106 include_dirs = $(pkg-config --cflags-only-I \
107 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
108 library_dirs = $(pkg-config --libs-only-L \
109 cblas blas lapack | sed -e \
110 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir)
111 atlas_libs = $(pkg-config --libs-only-l \
112 cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
113 lapack_libs = $(pkg-config --libs-only-l \
114 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
115 [blas_opt]
116 include_dirs = $(pkg-config --cflags-only-I \
117 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
118 library_dirs = $(pkg-config --libs-only-L \
119 cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' \
120 -e 's/ //g'):/usr/$(get_libdir)
121 libraries = $(pkg-config --libs-only-l \
122 cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
123 [lapack_opt]
124 library_dirs = $(pkg-config --libs-only-L \
125 lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
126 -e 's/ //g'):/usr/$(get_libdir)
127 libraries = $(pkg-config --libs-only-l \
128 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
129 EOF
130 else
131 export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
132 fi
133 }
134
135 src_compile() {
136 distutils_src_compile ${NUMPY_FCONFIG}
137 }
138
139 src_test() {
140 "${python}" setup.py ${NUMPY_FCONFIG} install \
141 --home="${S}"/test \
142 --no-compile \
143 || die "install test failed"
144 pushd "${S}"/test/lib*
145 PYTHONPATH=python "${python}" -c "import numpy; numpy.test()" 2>&1 | tee test.log
146 grep -q '^ERROR' test.log && die "test failed"
147 popd
148 rm -rf test
149 }
150
151 src_install() {
152 distutils_src_install ${NUMPY_FCONFIG}
153 dodoc THANKS.txt DEV_README.txt COMPATIBILITY
154 rm -f "${D}"/usr/lib/python*/site-packages/numpy/*.txt || die
155 docinto f2py
156 dodoc numpy/f2py/docs/*.txt || die "dodoc f2py failed"
157 doman numpy/f2py/f2py.1 || die "doman failed"
158 }