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/scientificpython: scientificpython-2.9.ebuild ChangeLog
Date: Sat, 05 Sep 2009 01:33:14
Message-Id: E1Mjk9Q-0007cu-Jx@stork.gentoo.org
1 arfrever 09/09/05 01:33:12
2
3 Modified: scientificpython-2.9.ebuild ChangeLog
4 Log:
5 Set SUPPORT_PYTHON_ABIS. Fix building of mpipython.
6 (Portage version: 14184-svn/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.2 dev-python/scientificpython/scientificpython-2.9.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild?r1=1.1&r2=1.2
14
15 Index: scientificpython-2.9.ebuild
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- scientificpython-2.9.ebuild 4 Sep 2009 17:04:51 -0000 1.1
22 +++ scientificpython-2.9.ebuild 5 Sep 2009 01:33:12 -0000 1.2
23 @@ -1,11 +1,14 @@
24 # Copyright 1999-2009 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26 -# $Header: /var/cvsroot/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild,v 1.1 2009/09/04 17:04:51 patrick Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/dev-python/scientificpython/scientificpython-2.9.ebuild,v 1.2 2009/09/05 01:33:12 arfrever Exp $
28
29 -MY_PN=ScientificPython
30 -DV=2372 # hardcoded download version
31 +EAPI="2"
32 +SUPPORT_PYTHON_ABIS="1"
33
34 -inherit eutils distutils
35 +inherit distutils eutils
36 +
37 +MY_PN="ScientificPython"
38 +DV="2372" # hardcoded download version
39
40 DESCRIPTION="Scientific Module for Python"
41 SRC_URI="http://sourcesup.cru.fr/frs/download.php/${DV}/${MY_PN}-${PV}.tar.gz"
42 @@ -14,28 +17,43 @@
43 LICENSE="CeCILL-2"
44 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
45
46 -IUSE="mpi doc"
47 +IUSE="doc mpi"
48
49 DEPEND="dev-python/numpy
50 sci-libs/netcdf
51 mpi? ( virtual/mpi )"
52 +RDEPEND="${DEPEND}"
53 +RESTRICT_PYTHON_ABIS="3.*"
54
55 S="${WORKDIR}/${MY_PN}-${PV}.0"
56
57 +PYTHON_MODNAME="Scientific"
58 +
59 +src_prepare() {
60 + distutils_src_prepare
61 + epatch "${FILESDIR}/${P}-mpi.patch"
62 +}
63 +
64 src_compile() {
65 distutils_src_compile
66 if use mpi; then
67 cd Src/MPI
68 - PYTHONPATH=$(ls -d "${S}"/build/lib*) \
69 - "${python}" compile.py || die "compile mpi failed"
70 + building_of_mpipython() {
71 + PYTHONPATH="$(ls -d ../../build-${PYTHON_ABI}/lib*)" "$(PYTHON)" compile.py
72 + mv -f mpipython mpipython-${PYTHON_ABI}
73 + }
74 + python_execute_function --action-message 'Building of mpipython with Python ${PYTHON_ABI}...' --failure-message 'Building of mpipython failed with Python ${PYTHON_ABI}' building_of_mpipython
75 fi
76 }
77
78 src_test() {
79 - cd "${S}"/build/lib*
80 - for t in "${S}"/Tests/*tests.py; do
81 - PYTHONPATH=. "${python}" ${t} || die "test $(basename ${t}) failed"
82 - done
83 + cd Tests
84 + testing() {
85 + for test in *tests.py; do
86 + PYTHONPATH="$(ls -d ../build-${PYTHON_ABI}/lib*)" "$(PYTHON)" "${test}" || die "test ${test} failed with Python ${PYTHON_ABI}"
87 + done
88 + }
89 + python_execute_function testing
90 }
91
92 src_install() {
93 @@ -45,7 +63,10 @@
94 insinto /usr/share/doc/${PF}
95 doins Examples/{demomodule.c,netcdf_demo.py} || die "doins examples failed"
96 if use mpi; then
97 - dobin Src/MPI/mpipython || die "dobin failed"
98 + installation_of_mpipython() {
99 + dobin Src/MPI/mpipython-${PYTHON_ABI}
100 + }
101 + python_execute_function -q installation_of_mpipython
102 doins Examples/mpi.py || die "doins mpi example failed failed"
103 fi
104 if use doc; then
105
106
107
108 1.22 dev-python/scientificpython/ChangeLog
109
110 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/ChangeLog?rev=1.22&view=markup
111 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/ChangeLog?rev=1.22&content-type=text/plain
112 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/ChangeLog?r1=1.21&r2=1.22
113
114 Index: ChangeLog
115 ===================================================================
116 RCS file: /var/cvsroot/gentoo-x86/dev-python/scientificpython/ChangeLog,v
117 retrieving revision 1.21
118 retrieving revision 1.22
119 diff -u -r1.21 -r1.22
120 --- ChangeLog 4 Sep 2009 17:04:51 -0000 1.21
121 +++ ChangeLog 5 Sep 2009 01:33:12 -0000 1.22
122 @@ -1,6 +1,10 @@
123 # ChangeLog for dev-python/scientificpython
124 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
125 -# $Header: /var/cvsroot/gentoo-x86/dev-python/scientificpython/ChangeLog,v 1.21 2009/09/04 17:04:51 patrick Exp $
126 +# $Header: /var/cvsroot/gentoo-x86/dev-python/scientificpython/ChangeLog,v 1.22 2009/09/05 01:33:12 arfrever Exp $
127 +
128 + 05 Sep 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
129 + scientificpython-2.9.ebuild, +files/scientificpython-2.9-mpi.patch:
130 + Set SUPPORT_PYTHON_ABIS. Fix building of mpipython.
131
132 *scientificpython-2.9 (04 Sep 2009)