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.4.1.ebuild numpy-1.4.0.ebuild
Date: Thu, 22 Apr 2010 19:26:50
Message-Id: 20100422192648.8B4C12803A@corvid.gentoo.org
1 bicatali 10/04/22 19:26:48
2
3 Modified: ChangeLog
4 Added: numpy-1.4.1.ebuild
5 Removed: numpy-1.4.0.ebuild
6 Log:
7 Version bump. Removed 1.4.0 because pulled out by upstream for ABI incompatibilities
8 (Portage version: 2.2_rc67/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.109 dev-python/numpy/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.109&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.109&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?r1=1.108&r2=1.109
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v
20 retrieving revision 1.108
21 retrieving revision 1.109
22 diff -u -r1.108 -r1.109
23 --- ChangeLog 4 Mar 2010 20:31:05 -0000 1.108
24 +++ ChangeLog 22 Apr 2010 19:26:48 -0000 1.109
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-python/numpy
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.108 2010/03/04 20:31:05 josejx Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.109 2010/04/22 19:26:48 bicatali Exp $
30 +
31 +*numpy-1.4.1 (22 Apr 2010)
32 +
33 + 22 Apr 2010; Sébastien Fabbro <bicatali@g.o> -numpy-1.4.0.ebuild,
34 + -files/numpy-1.4.0-python-2.7.patch, +numpy-1.4.1.ebuild:
35 + Version bump. Removed 1.4.0 because pulled out by upstream for ABI
36 + incompatibilities
37
38 04 Mar 2010; Joseph Jezak <josejx@g.o> numpy-1.4.0.ebuild:
39 Marked -ppc/-ppc64 due to a lack of support for long double format. Please
40
41
42
43 1.1 dev-python/numpy/numpy-1.4.1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.4.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.4.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: numpy-1.4.1.ebuild
49 ===================================================================
50 # Copyright 1999-2010 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.4.1.ebuild,v 1.1 2010/04/22 19:26:48 bicatali Exp $
53
54 EAPI="2"
55 SUPPORT_PYTHON_ABIS="1"
56
57 inherit distutils eutils flag-o-matic toolchain-funcs versionator
58
59 NP="${PN}-1.3"
60
61 DESCRIPTION="Fast array and numerical python library"
62 HOMEPAGE="http://numpy.scipy.org/ http://pypi.python.org/pypi/numpy"
63 SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz
64 doc? (
65 http://docs.scipy.org/doc/${NP}.x/numpy-html.zip -> ${NP}-html.zip
66 http://docs.scipy.org/doc/${NP}.x/numpy-ref.pdf -> ${NP}-ref.pdf
67 http://docs.scipy.org/doc/${NP}.x/numpy-user.pdf -> ${NP}-user.pdf
68 )"
69
70 LICENSE="BSD"
71 SLOT="0"
72 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 -ppc -ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
73 IUSE="doc lapack test"
74
75 RDEPEND="dev-python/setuptools
76 lapack? ( virtual/cblas virtual/lapack )"
77 DEPEND="${RDEPEND}
78 lapack? ( dev-util/pkgconfig )
79 test? ( >=dev-python/nose-0.10 )
80 doc? ( app-arch/unzip )"
81 RESTRICT_PYTHON_ABIS="3.*"
82
83 pkg_setup() {
84 # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
85 # with the subtle difference that we don't want to break Darwin where
86 # -shared is not a valid linker argument
87 if [[ ${CHOST} != *-darwin* ]] ; then
88 append-ldflags -shared
89 fi
90
91 # only one fortran to link with:
92 # linking with cblas and lapack library will force
93 # autodetecting and linking to all available fortran compilers
94 use lapack || return
95 [[ -z ${FC} ]] && FC=$(tc-getFC)
96 # when fortran flags are set, pic is removed.
97 FFLAGS="${FFLAGS} -fPIC"
98 export NUMPY_FCONFIG="config_fc --noopt --noarch"
99 }
100
101 src_unpack() {
102 unpack ${P}.tar.gz
103 if use doc; then
104 unzip -qo "${DISTDIR}"/${NP}-html.zip -d html || die
105 fi
106 }
107
108 src_prepare() {
109 epatch "${FILESDIR}"/${PN}-1.1.0-f2py.patch
110 epatch "${FILESDIR}"/${PN}-1.3.0-fenv-freebsd.patch # bug 279487
111
112 # Gentoo patch for ATLAS library names
113 sed -i \
114 -e "s:'f77blas':'blas':g" \
115 -e "s:'ptf77blas':'blas':g" \
116 -e "s:'ptcblas':'cblas':g" \
117 -e "s:'lapack_atlas':'lapack':g" \
118 numpy/distutils/system_info.py \
119 || die "sed system_info.py failed"
120
121 if use lapack; then
122 append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
123 sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
124 local libdir="${EPREFIX}"/usr/$(get_libdir)
125 cat >> site.cfg <<-EOF
126 [atlas]
127 include_dirs = $(pkg-config --cflags-only-I \
128 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
129 library_dirs = $(pkg-config --libs-only-L \
130 cblas blas lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
131 atlas_libs = $(pkg-config --libs-only-l \
132 cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
133 lapack_libs = $(pkg-config --libs-only-l \
134 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
135 [blas_opt]
136 include_dirs = $(pkg-config --cflags-only-I \
137 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
138 library_dirs = $(pkg-config --libs-only-L \
139 cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
140 libraries = $(pkg-config --libs-only-l \
141 cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
142 [lapack_opt]
143 library_dirs = $(pkg-config --libs-only-L \
144 lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
145 libraries = $(pkg-config --libs-only-l \
146 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
147 EOF
148 else
149 export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
150 fi
151
152 epatch "${FILESDIR}"/${PN}-1.4.0-interix.patch
153 }
154
155 src_compile() {
156 distutils_src_compile ${NUMPY_FCONFIG}
157 }
158
159 src_test() {
160 testing() {
161 "$(PYTHON)" setup.py ${NUMPY_FCONFIG} build -b "build-${PYTHON_ABI}" install \
162 --home="${S}/test-${PYTHON_ABI}" --no-compile || die "install test failed"
163 pushd "${S}/test-${PYTHON_ABI}/"lib* > /dev/null
164 PYTHONPATH=python "$(PYTHON)" -c "import numpy; numpy.test()" 2>&1 | tee test.log
165 grep -q '^ERROR' test.log && die "test failed"
166 popd > /dev/null
167 rm -fr test-${PYTHON_ABI}
168 }
169 python_execute_function testing
170 }
171
172 src_install() {
173 [[ -z ${ED} ]] && local ED=${D}
174 distutils_src_install ${NUMPY_FCONFIG}
175 dodoc THANKS.txt DEV_README.txt COMPATIBILITY
176 rm -f "${ED}"/usr/lib/python*/site-packages/numpy/*.txt || die
177 docinto f2py
178 dodoc numpy/f2py/docs/*.txt || die "dodoc f2py failed"
179 doman numpy/f2py/f2py.1 || die "doman failed"
180 if use doc; then
181 insinto /usr/share/doc/${PF}
182 doins -r "${WORKDIR}"/html || die
183 doins "${DISTDIR}"/${NP}*pdf || die
184 fi
185 }