Gentoo Archives: gentoo-commits

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