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/matplotlib: ChangeLog matplotlib-0.99.1.1-r1.ebuild matplotlib-0.99.3.ebuild matplotlib-0.99.1.1-r2.ebuild
Date: Thu, 03 Jun 2010 19:12:14
Message-Id: 20100603191210.4E7412CF47@corvid.gentoo.org
1 bicatali 10/06/03 19:12:10
2
3 Modified: ChangeLog matplotlib-0.99.1.1-r1.ebuild
4 Added: matplotlib-0.99.3.ebuild
5 Removed: matplotlib-0.99.1.1-r2.ebuild
6 Log:
7 Version bump. Also forced -DNDEBUG to fix doc generation (bug #322347)
8 (Portage version: 2.2_rc67/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.89 dev-python/matplotlib/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.89&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.89&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?r1=1.88&r2=1.89
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v
20 retrieving revision 1.88
21 retrieving revision 1.89
22 diff -u -r1.88 -r1.89
23 --- ChangeLog 31 May 2010 20:38:42 -0000 1.88
24 +++ ChangeLog 3 Jun 2010 19:12:09 -0000 1.89
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-python/matplotlib
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.88 2010/05/31 20:38:42 bicatali Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.89 2010/06/03 19:12:09 bicatali Exp $
30 +
31 +*matplotlib-0.99.3 (03 Jun 2010)
32 +
33 + 03 Jun 2010; Sébastien Fabbro <bicatali@g.o>
34 + matplotlib-0.99.1.1-r1.ebuild, -matplotlib-0.99.1.1-r2.ebuild,
35 + +matplotlib-0.99.3.ebuild:
36 + Version bump. Also forced -DNDEBUG to fix doc generation (bug #322347)
37
38 31 May 2010; Sébastien Fabbro <bicatali@g.o>
39 files/matplotlib-0.99.1.1-libpng14.patch:
40
41
42
43 1.9 dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild?rev=1.9&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild?rev=1.9&content-type=text/plain
47 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild?r1=1.8&r2=1.9
48
49 Index: matplotlib-0.99.1.1-r1.ebuild
50 ===================================================================
51 RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild,v
52 retrieving revision 1.8
53 retrieving revision 1.9
54 diff -u -r1.8 -r1.9
55 --- matplotlib-0.99.1.1-r1.ebuild 30 May 2010 16:32:31 -0000 1.8
56 +++ matplotlib-0.99.1.1-r1.ebuild 3 Jun 2010 19:12:09 -0000 1.9
57 @@ -1,13 +1,13 @@
58 # Copyright 1999-2010 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 -# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild,v 1.8 2010/05/30 16:32:31 phajdan.jr Exp $
61 +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r1.ebuild,v 1.9 2010/06/03 19:12:09 bicatali Exp $
62
63 EAPI="2"
64 PYTHON_DEPEND="2"
65 SUPPORT_PYTHON_ABIS="1"
66 WX_GTK_VER="2.8"
67
68 -inherit eutils distutils wxwidgets
69 +inherit eutils distutils wxwidgets flag-o-matic
70
71 PDOC="users_guide_${PV}"
72
73 @@ -140,7 +140,7 @@
74
75 src_compile() {
76 unset DISPLAY # bug #278524
77 -
78 + append-flags -DNDEBUG # bug #322347
79 distutils_src_compile_pre_hook() {
80 ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" .
81 }
82 @@ -149,14 +149,10 @@
83 if use doc; then
84 cd "${S}/doc"
85 export VARTEXFONTS="${T}"/fonts
86 - # no die function here: broken compilation at the end, do it twice,
87 - # result ok.
88 - MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
89 - PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
90 - "$(PYTHON -f)" make.py html
91 MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
92 PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
93 - "$(PYTHON -f)" make.py
94 + "$(PYTHON -f)" make.py all
95 + [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
96 fi
97 }
98
99
100
101
102 1.1 dev-python/matplotlib/matplotlib-0.99.3.ebuild
103
104 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.3.ebuild?rev=1.1&view=markup
105 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.3.ebuild?rev=1.1&content-type=text/plain
106
107 Index: matplotlib-0.99.3.ebuild
108 ===================================================================
109 # Copyright 1999-2010 Gentoo Foundation
110 # Distributed under the terms of the GNU General Public License v2
111 # $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.3.ebuild,v 1.1 2010/06/03 19:12:10 bicatali Exp $
112
113 EAPI="2"
114 PYTHON_DEPEND="2"
115 SUPPORT_PYTHON_ABIS="1"
116 WX_GTK_VER="2.8"
117
118 inherit eutils distutils wxwidgets flag-o-matic
119
120 PDOC="users_guide_${PV}"
121
122 DESCRIPTION="Pure python plotting library with matlab like syntax"
123 HOMEPAGE="http://matplotlib.sourceforge.net/ http://pypi.python.org/pypi/matplotlib"
124 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
125
126 IUSE="cairo doc excel examples fltk gtk latex qt4 traits tk wxwidgets"
127 SLOT="0"
128 KEYWORDS="~amd64 ~ppc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
129 LICENSE="PYTHON BSD"
130
131 CDEPEND="dev-python/numpy
132 dev-python/python-dateutil
133 dev-python/pytz
134 media-libs/freetype:2
135 media-libs/libpng
136 gtk? ( dev-python/pygtk )
137 tk? ( dev-lang/python[tk] )
138 wxwidgets? ( dev-python/wxpython:2.8 )"
139
140 DEPEND="${CDEPEND}
141 dev-python/pycxx
142 dev-util/pkgconfig
143 doc? (
144 dev-python/sphinx
145 media-gfx/graphviz[cairo]
146 || ( ( dev-texlive/texlive-latexextra
147 dev-texlive/texlive-fontsrecommended
148 dev-texlive/texlive-latexrecommended )
149 ( app-text/ptex dev-tex/latex-unicode ) )
150 app-text/dvipng
151 dev-python/imaging
152 dev-python/ipython
153 excel? ( dev-python/xlwt ) )"
154
155 RDEPEND="${CDEPEND}
156 virtual/ttf-fonts
157 media-fonts/texcm-ttf
158 dev-python/pyparsing
159 cairo? ( dev-python/pycairo )
160 excel? ( dev-python/xlwt )
161 fltk? ( dev-python/pyfltk )
162 qt4? ( dev-python/PyQt4[X] )
163 traits? ( dev-python/traits dev-python/configobj )
164 latex? (
165 virtual/latex-base
166 app-text/ghostscript-gpl
167 app-text/dvipng
168 app-text/poppler[utils]
169 || ( dev-texlive/texlive-fontsrecommended
170 app-text/ptex ) )"
171 RESTRICT_PYTHON_ABIS="3.*"
172
173 DOCS="INTERACTIVE"
174
175 use_setup() {
176 local uword="${2}"
177 [ -z "${2}" ] && uword="${1}"
178 if use ${1}; then
179 echo "${uword} = True"
180 echo "${uword}agg = True"
181 else
182 echo "${uword} = False"
183 echo "${uword}agg = False"
184 fi
185 }
186
187 src_prepare() {
188 # avoid to launch xv while building examples docs
189 epatch "${FILESDIR}"/${PN}-0.98.5.2-no-xv.patch
190 # allow better small docs (from upstream svn)
191 epatch "${FILESDIR}"/${PN}-0.99.1.1-docs.patch
192 # allow compatibility with pygtk-2.12 tooltop (from upstream svn)
193 epatch "${FILESDIR}"/${PN}-0.99.1.1-gtk-tooltip.patch
194 # some font stuff (from upstream svn)
195 epatch "${FILESDIR}"/${PN}-0.99.1.1-eintr.patch
196
197 # create setup.cfg (see setup.cfg.template for any changes)
198 cat > setup.cfg <<-EOF
199 [provide_packages]
200 pytz = False
201 dateutil = False
202 configobj = False
203 enthought.traits = False
204 [gui_support]
205 $(use_setup gtk)
206 $(use_setup tk)
207 $(use_setup wxwidgets wx)
208 $(use_setup qt4)
209 $(use_setup fltk)
210 $(use_setup cairo)
211 EOF
212
213 # avoid checks needing a X display
214 sed -i \
215 -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
216 -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
217 setup.py || die "sed setup.py failed"
218
219 # respect FHS:
220 # - mpl-data in /usr/share/matplotlib
221 # - config files in /etc/matplotlib
222 sed -i \
223 -e "/'mpl-data\/matplotlibrc',/d" \
224 -e "/'mpl-data\/matplotlib.conf',/d" \
225 -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
226 -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
227 setup.py \
228 || die "sed setup.py for FHS failed"
229
230 # remove internal copies of fonts, pycxx, pyparsing
231 rm -rf \
232 CXX \
233 lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts} \
234 lib/matplotlib/mpl-data/fonts/ttf/{Vera*,cm*,*.TXT} \
235 lib/matplotlib/pyparsing.py \
236 || die "removed internal copies failed"
237
238 sed -i \
239 -e 's/matplotlib.pyparsing/pyparsing/g' \
240 lib/matplotlib/{mathtext,fontconfig_pattern}.py \
241 || die "sed pyparsing failed"
242 }
243
244 src_compile() {
245 unset DISPLAY # bug #278524
246 append-flags -DNDEBUG # bug #322347
247 distutils_src_compile_pre_hook() {
248 ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" .
249 }
250 distutils_src_compile
251
252 if use doc; then
253 cd "${S}/doc"
254 export VARTEXFONTS="${T}"/fonts
255 MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
256 PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
257 "$(PYTHON -f)" make.py --small all
258 [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
259 fi
260 }
261
262 src_test() {
263 # if doc were enabled, all examples were built and tested
264 use doc && return
265 einfo "Tests are quite long, be patient"
266 cd "${S}/examples/tests"
267 testing() {
268 PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py agg || return 1
269 PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py --clean
270 }
271 python_execute_function testing
272 }
273
274 src_install() {
275 # sed only after doc building, to allow using default configs
276 sed -i \
277 -e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \
278 -e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \
279 build-*/lib*/matplotlib/__init__.py \
280 || die "sed init for FHS failed"
281 [[ -z ${ED} ]] && local ED="${D}"
282 distutils_src_install
283
284 # Respect FHS
285 dodir /usr/share/${PN}
286 mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} "${ED}usr/share/${PN}" || die "Renaming failed"
287 rm -fr "${ED}"usr/lib*/python*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib}
288
289 insinto /etc/matplotlib
290 doins matplotlibrc matplotlib.conf || die "installing config files failed"
291
292 # doc and examples
293 insinto /usr/share/doc/${PF}
294 if use doc; then
295 doins doc/build/latex/Matplotlib.pdf || die
296 doins -r doc/build/html || die
297 fi
298 if use examples; then
299 doins -r examples || die
300 fi
301 }