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/matplotlib: ChangeLog matplotlib-1.0.1.ebuild
Date: Thu, 06 Jan 2011 20:47:15
Message-Id: 20110106204656.2A78A20051@flycatcher.gentoo.org
1 arfrever 11/01/06 20:46:56
2
3 Modified: ChangeLog
4 Added: matplotlib-1.0.1.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.0_alpha13_p10/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.98 dev-python/matplotlib/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.98&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.98&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?r1=1.97&r2=1.98
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v
20 retrieving revision 1.97
21 retrieving revision 1.98
22 diff -u -r1.97 -r1.98
23 --- ChangeLog 30 Oct 2010 23:24:16 -0000 1.97
24 +++ ChangeLog 6 Jan 2011 20:46:55 -0000 1.98
25 @@ -1,6 +1,12 @@
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.97 2010/10/30 23:24:16 arfrever Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.98 2011/01/06 20:46:55 arfrever Exp $
31 +
32 +*matplotlib-1.0.1 (06 Jan 2011)
33 +
34 + 06 Jan 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
35 + +matplotlib-1.0.1.ebuild:
36 + Version bump.
37
38 30 Oct 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
39 matplotlib-1.0.0.ebuild:
40
41
42
43 1.1 dev-python/matplotlib/matplotlib-1.0.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: matplotlib-1.0.1.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1.ebuild,v 1.1 2011/01/06 20:46:55 arfrever Exp $
53
54 EAPI="3"
55 PYTHON_DEPEND="2"
56 PYTHON_USE_WITH="tk"
57 PYTHON_USE_WITH_OPT="tk"
58 SUPPORT_PYTHON_ABIS="1"
59 RESTRICT_PYTHON_ABIS="3.* *-jython"
60 WX_GTK_VER="2.8"
61
62 inherit distutils
63
64 PDOC="users_guide_${PV}"
65
66 DESCRIPTION="Pure python plotting library with matlab like syntax"
67 HOMEPAGE="http://matplotlib.sourceforge.net/ http://pypi.python.org/pypi/matplotlib"
68 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
69
70 IUSE="cairo doc excel examples fltk gtk latex qt4 traits tk wxwidgets"
71 SLOT="0"
72 KEYWORDS="~amd64 ~ppc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
73 LICENSE="PYTHON BSD"
74
75 CDEPEND="dev-python/numpy
76 dev-python/python-dateutil
77 dev-python/pytz
78 media-libs/freetype:2
79 media-libs/libpng
80 gtk? ( dev-python/pygtk )
81 wxwidgets? ( dev-python/wxpython:2.8 )"
82
83 DEPEND="${CDEPEND}
84 dev-python/pycxx
85 dev-util/pkgconfig
86 doc? (
87 app-text/dvipng
88 dev-python/imaging
89 dev-python/ipython
90 dev-python/sphinx
91 media-gfx/graphviz[cairo]
92 || (
93 (
94 dev-texlive/texlive-latexextra
95 dev-texlive/texlive-fontsrecommended
96 dev-texlive/texlive-latexrecommended
97 )
98 (
99 app-text/ptex
100 dev-tex/latex-unicode
101 )
102 )
103 excel? ( dev-python/xlwt )
104 )"
105
106 RDEPEND="${CDEPEND}
107 virtual/ttf-fonts
108 media-fonts/texcm-ttf
109 dev-python/pyparsing
110 cairo? ( dev-python/pycairo )
111 excel? ( dev-python/xlwt )
112 fltk? ( dev-python/pyfltk )
113 qt4? ( dev-python/PyQt4[X] )
114 traits? ( dev-python/traits dev-python/configobj )
115 latex? (
116 virtual/latex-base
117 app-text/ghostscript-gpl
118 app-text/dvipng
119 app-text/poppler[utils]
120 || (
121 dev-texlive/texlive-fontsrecommended
122 app-text/ptex
123 )
124 )"
125
126 PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
127 PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing")
128
129 DOCS="INTERACTIVE"
130 PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
131
132 use_setup() {
133 local uword="${2}"
134 [[ -z "${2}" ]] && uword="${1}"
135 if use ${1}; then
136 echo "${uword} = True"
137 echo "${uword}agg = True"
138 else
139 echo "${uword} = False"
140 echo "${uword}agg = False"
141 fi
142 }
143
144 src_prepare() {
145 # create setup.cfg (see setup.cfg.template for any changes)
146 cat > setup.cfg <<-EOF
147 [provide_packages]
148 pytz = False
149 dateutil = False
150 configobj = False
151 enthought.traits = False
152 [gui_support]
153 $(use_setup gtk)
154 $(use_setup tk)
155 $(use_setup wxwidgets wx)
156 $(use_setup qt4)
157 $(use_setup fltk)
158 $(use_setup cairo)
159 EOF
160
161 # avoid checks needing a X display
162 sed -i \
163 -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
164 -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
165 setup.py || die "sed setup.py failed"
166
167 # respect FHS:
168 # - mpl-data in /usr/share/matplotlib
169 # - config files in /etc/matplotlib
170 sed -i \
171 -e "/'mpl-data\/matplotlibrc',/d" \
172 -e "/'mpl-data\/matplotlib.conf',/d" \
173 -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
174 -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
175 setup.py \
176 || die "sed setup.py for FHS failed"
177
178 # remove internal copies of fonts, pycxx, pyparsing
179 rm -rf \
180 CXX \
181 lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts} \
182 lib/matplotlib/mpl-data/fonts/ttf/{Vera*,cm*,*.TXT} \
183 lib/matplotlib/pyparsing.py \
184 || die "removed internal copies failed"
185
186 sed -i \
187 -e 's/matplotlib.pyparsing/pyparsing/g' \
188 lib/matplotlib/{mathtext,fontconfig_pattern}.py \
189 || die "sed pyparsing failed"
190 }
191
192 src_compile() {
193 unset DISPLAY # bug #278524
194 distutils_src_compile_pre_hook() {
195 ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" .
196 }
197 distutils_src_compile
198
199 if use doc; then
200 cd "${S}/doc"
201 export VARTEXFONTS="${T}"/fonts
202 MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
203 PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
204 "$(PYTHON -f)" make.py --small all
205 [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
206 fi
207 }
208
209 src_test() {
210 # if doc were enabled, all examples were built and tested
211 use doc && return
212 einfo "Tests are quite long, be patient"
213 cd "${S}/examples/tests"
214 testing() {
215 PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py agg || return 1
216 PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py --clean
217 }
218 python_execute_function testing
219 }
220
221 src_install() {
222 # sed only after doc building, to allow using default configs
223 sed -i \
224 -e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \
225 -e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \
226 build-*/lib*/matplotlib/__init__.py \
227 || die "sed init for FHS failed"
228 distutils_src_install
229
230 # Respect FHS
231 dodir /usr/share/${PN}
232 mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} "${ED}usr/share/${PN}" || die "Renaming failed"
233 rm -fr "${ED}"usr/lib*/python*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib}
234
235 insinto /etc/matplotlib
236 doins matplotlibrc matplotlib.conf || die "installing config files failed"
237
238 # doc and examples
239 insinto /usr/share/doc/${PF}
240 if use doc; then
241 doins doc/build/latex/Matplotlib.pdf || die
242 doins -r doc/build/html || die
243 fi
244 if use examples; then
245 doins -r examples || die
246 fi
247 }