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