Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/matplotlib/, dev-python/matplotlib/files/
Date: Fri, 05 Jan 2018 09:36:53
Message-Id: 1515144999.b35eee52212164c14ae6bfb6dff4a56cae401f1b.mgorny@gentoo
1 commit: b35eee52212164c14ae6bfb6dff4a56cae401f1b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 4 23:34:25 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 5 09:36:39 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b35eee52
7
8 dev-python/matplotlib: Clean old up
9
10 dev-python/matplotlib/Manifest | 3 -
11 ...atplotlib-1.5.3-freetype-spurious-failure.patch | 26 --
12 ...atplotlib-2.0.2-freetype-spurious-failure.patch | 27 ---
13 .../files/matplotlib-2.0.2-nose-fixes.patch | 13 -
14 dev-python/matplotlib/matplotlib-1.5.3-r1.ebuild | 263 --------------------
15 dev-python/matplotlib/matplotlib-1.5.3-r2.ebuild | 269 ---------------------
16 dev-python/matplotlib/matplotlib-2.0.2.ebuild | 256 --------------------
17 dev-python/matplotlib/matplotlib-2.1.0.ebuild | 250 -------------------
18 8 files changed, 1107 deletions(-)
19
20 diff --git a/dev-python/matplotlib/Manifest b/dev-python/matplotlib/Manifest
21 index 726fb833d33..952e888233c 100644
22 --- a/dev-python/matplotlib/Manifest
23 +++ b/dev-python/matplotlib/Manifest
24 @@ -1,5 +1,2 @@
25 DIST matplotlib-1.4.3.tar.gz 49933525 BLAKE2B 40ea29ef7197d364f9caea63904b11231a4f74ca93184de8b1f8c7f78713cf887ea8a6fbee1b3f545c895eb353e0eeb5d65308657a3138986fb080ac44164427 SHA512 51b0f58b2618b47b653e17e4f6b6a1215d3a3b0f1331ce3555cc7435e365d9c75693f289ce12fe3bf8f69fd57b663e545f0f1c2c94e81eaa661cac0689e125f5
26 -DIST matplotlib-1.5.3.tar.gz 51606089 BLAKE2B 6ec475298dc74082f66fa8aa8711b402503a1ce1d689e8617f9442f8857ef516bc5c9814c47d10d959e8aea365deee3f38962ce04c7318f3aa79d3d53bbb804e SHA512 553be9f661a1923d8ec7504a11dd3317e5ffb429c19339c58047715f4c28358d6d2ac38d46bd27ecd1dcf7159f157aab80d90713fbc4071e2e395bbf11ee6385
27 -DIST matplotlib-2.0.2.tar.gz 53879938 BLAKE2B bf20503715a5b97f3666d6ea601850483250e72f2910ee94f7c4bbe59740827b5eb96a96b8992a5ecca7a523237d1f018b2d339d3d39fff9c6d0c9675ab27e48 SHA512 39d68aee87fac2c246cdee7941ffaae1b8d586fa75c351bc94f963def66df32c3aba13fa0be94e1f8d21f06e068565b1a79c6d4f65589d8dd23cd48b32ab474f
28 DIST matplotlib-2.1.0.tar.bz2 33051088 BLAKE2B 6a97909a44ca37c3ec09a9e723909bb0169828e56daeec5711220a6caac632d19e77ef2fc042a61cb82760c9750d04753654761a707b6265a038af9c55b91bd7 SHA512 872ff86e989b4e9352663f4abde1768aa05b1adea3e1b234efdb301429d421718314b27950e508d92df8fc9136764b07e8a6861b66512e9695a496993076bb5f
29 -DIST matplotlib-2.1.0.tar.gz 35727251 BLAKE2B cac5cfd740066a0d9fc1fd0ad791c134e86b26359e483f0216d9efd36178a8776513e853d41ff231823cd5c54a3251727e21cd03c89149d85cb4a096f4179f32 SHA512 8f512400f1f15d5400e23dd8e402783c54f62567d412863530a982c6513206d49fb91fadb3ef477648a4a38d6dd032eb90741ff4495d2be71911f83677d768b4
30
31 diff --git a/dev-python/matplotlib/files/matplotlib-1.5.3-freetype-spurious-failure.patch b/dev-python/matplotlib/files/matplotlib-1.5.3-freetype-spurious-failure.patch
32 deleted file mode 100644
33 index bc6891a5f25..00000000000
34 --- a/dev-python/matplotlib/files/matplotlib-1.5.3-freetype-spurious-failure.patch
35 +++ /dev/null
36 @@ -1,26 +0,0 @@
37 -Increase the tolerance margin in order to pass tests caused by
38 -freetype producing unreproducible images across different versions.
39 -See also: https://github.com/matplotlib/matplotlib/issues/2667
40 -
41 ---- a/lib/matplotlib/tests/test_mathtext.py
42 -+++ b/lib/matplotlib/tests/test_mathtext.py
43 -@@ -158,7 +158,7 @@
44 - def make_set(basename, fontset, tests, extensions=None):
45 - def make_test(filename, test):
46 - @image_comparison(baseline_images=[filename], extensions=extensions,
47 -- tol=32)
48 -+ tol=40)
49 - def single_test():
50 - matplotlib.rcParams['mathtext.fontset'] = fontset
51 - fig = plt.figure(figsize=(5.25, 0.75))
52 ---- a/lib/matplotlib/tests/test_text.py
53 -+++ b/lib/matplotlib/tests/test_text.py
54 -@@ -18,7 +18,7 @@
55 - from matplotlib.backends.backend_agg import RendererAgg
56 -
57 -
58 --@image_comparison(baseline_images=['font_styles'])
59 -+@image_comparison(baseline_images=['font_styles'], tol=20)
60 - def test_font_styles():
61 - from matplotlib import _get_data_path
62 - data_path = _get_data_path()
63
64 diff --git a/dev-python/matplotlib/files/matplotlib-2.0.2-freetype-spurious-failure.patch b/dev-python/matplotlib/files/matplotlib-2.0.2-freetype-spurious-failure.patch
65 deleted file mode 100644
66 index b6450a83fed..00000000000
67 --- a/dev-python/matplotlib/files/matplotlib-2.0.2-freetype-spurious-failure.patch
68 +++ /dev/null
69 @@ -1,27 +0,0 @@
70 -diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py
71 -index 5e738ad9b..78b3f8169 100644
72 ---- a/lib/matplotlib/testing/decorators.py
73 -+++ b/lib/matplotlib/testing/decorators.py
74 -@@ -266,7 +266,7 @@ class ImageComparisonTest(CleanupTest):
75 -
76 - yield do_test, fignum, actual_fname, expected_fname
77 -
78 --def image_comparison(baseline_images=None, extensions=None, tol=0,
79 -+def image_comparison(baseline_images=None, extensions=None, tol=20,
80 - freetype_version=None, remove_text=False,
81 - savefig_kwarg=None, style='_classic_test'):
82 - """
83 -diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
84 -index 39f5d7ef1..7681e5cb9 100644
85 ---- a/lib/matplotlib/tests/test_mathtext.py
86 -+++ b/lib/matplotlib/tests/test_mathtext.py
87 -@@ -159,7 +159,8 @@ for fonts, chars in font_test_specs:
88 -
89 - def make_set(basename, fontset, tests, extensions=None):
90 - def make_test(filename, test):
91 -- @image_comparison(baseline_images=[filename], extensions=extensions)
92 -+ @image_comparison(baseline_images=[filename], extensions=extensions,
93 -+ tol=40)
94 - def single_test():
95 - matplotlib.rcParams['mathtext.fontset'] = fontset
96 - fig = plt.figure(figsize=(5.25, 0.75))
97
98 diff --git a/dev-python/matplotlib/files/matplotlib-2.0.2-nose-fixes.patch b/dev-python/matplotlib/files/matplotlib-2.0.2-nose-fixes.patch
99 deleted file mode 100644
100 index ab1181bd017..00000000000
101 --- a/dev-python/matplotlib/files/matplotlib-2.0.2-nose-fixes.patch
102 +++ /dev/null
103 @@ -1,13 +0,0 @@
104 -diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
105 -index 530c889a9..8231c2bb8 100644
106 ---- a/lib/matplotlib/__init__.py
107 -+++ b/lib/matplotlib/__init__.py
108 -@@ -1609,7 +1609,7 @@ def test(verbosity=1):
109 -
110 - # store the old values before overriding
111 - plugins = _get_extra_test_plugins()
112 -- plugins.extend([plugin() for plugin in nose.plugins.builtin.plugins])
113 -+ plugins.extend(nose.plugins.builtin.plugins)
114 -
115 - manager = PluginManager(plugins=[x() for x in plugins])
116 - config = nose.config.Config(verbosity=verbosity, plugins=manager)
117
118 diff --git a/dev-python/matplotlib/matplotlib-1.5.3-r1.ebuild b/dev-python/matplotlib/matplotlib-1.5.3-r1.ebuild
119 deleted file mode 100644
120 index 11acf166d28..00000000000
121 --- a/dev-python/matplotlib/matplotlib-1.5.3-r1.ebuild
122 +++ /dev/null
123 @@ -1,263 +0,0 @@
124 -# Copyright 1999-2017 Gentoo Foundation
125 -# Distributed under the terms of the GNU General Public License v2
126 -
127 -EAPI=6
128 -
129 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
130 -PYTHON_REQ_USE='tk?,threads(+)'
131 -
132 -inherit distutils-r1 eutils flag-o-matic multiprocessing virtualx toolchain-funcs
133 -
134 -DESCRIPTION="Pure python plotting library with matlab like syntax"
135 -HOMEPAGE="http://matplotlib.org/"
136 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
137 -
138 -SLOT="0"
139 -# Main license: matplotlib
140 -# Some modules: BSD
141 -# matplotlib/backends/qt4_editor: MIT
142 -# Fonts: BitstreamVera, OFL-1.1
143 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
144 -KEYWORDS="~amd64 ~arm ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
145 -IUSE="cairo doc excel examples fltk gtk2 gtk3 latex pyside qt4 qt5 test tk wxwidgets"
146 -
147 -PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )"
148 -REQUIRED_USE="
149 - doc? ( ${PY2_FLAGS} )
150 - excel? ( ${PY2_FLAGS} )
151 - fltk? ( ${PY2_FLAGS} )
152 - gtk2? ( ${PY2_FLAGS} )
153 - wxwidgets? ( ${PY2_FLAGS} )
154 - test? (
155 - cairo fltk latex pyside qt5 qt4 tk wxwidgets
156 - || ( gtk2 gtk3 )
157 - )"
158 -
159 -# #456704 -- a lot of py2-only deps
160 -PY2_USEDEP=$(python_gen_usedep python2_7)
161 -COMMON_DEPEND="
162 - dev-python/cycler[${PYTHON_USEDEP}]
163 - >=dev-python/numpy-1.6[${PYTHON_USEDEP}]
164 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
165 - dev-python/pytz[${PYTHON_USEDEP}]
166 - >=dev-python/six-1.4[${PYTHON_USEDEP}]
167 - media-fonts/stix-fonts
168 - media-libs/freetype:2
169 - media-libs/libpng:0
170 - media-libs/qhull
171 - cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
172 - gtk2? (
173 - dev-libs/glib:2=
174 - x11-libs/gdk-pixbuf
175 - x11-libs/gtk+:2
176 - dev-python/pygtk[${PY2_USEDEP}] )
177 - wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )"
178 -
179 -# internal copy of pycxx highly patched
180 -# dev-python/pycxx
181 -
182 -DEPEND="${COMMON_DEPEND}
183 - dev-python/versioneer[${PYTHON_USEDEP}]
184 - dev-python/setuptools[${PYTHON_USEDEP}]
185 - virtual/pkgconfig
186 - doc? (
187 - app-text/dvipng
188 - dev-python/pillow[${PYTHON_USEDEP}]
189 - dev-python/ipython[${PYTHON_USEDEP}]
190 - dev-python/mock[${PY2_USEDEP}]
191 - dev-python/numpydoc[${PYTHON_USEDEP}]
192 - dev-python/sphinx[${PYTHON_USEDEP}]
193 - dev-python/xlwt[${PYTHON_USEDEP}]
194 - dev-texlive/texlive-latexextra
195 - dev-texlive/texlive-fontsrecommended
196 - dev-texlive/texlive-latexrecommended
197 - media-gfx/graphviz[cairo]
198 - )
199 - test? (
200 - dev-python/mock[${PYTHON_USEDEP}]
201 - >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
202 - )"
203 -
204 -RDEPEND="${COMMON_DEPEND}
205 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
206 - excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
207 - fltk? ( dev-python/pyfltk[${PYTHON_USEDEP}] )
208 - gtk3? (
209 - dev-python/pygobject:3[${PYTHON_USEDEP}]
210 - x11-libs/gtk+:3[introspection] )
211 - latex? (
212 - virtual/latex-base
213 - app-text/ghostscript-gpl
214 - app-text/dvipng
215 - app-text/poppler[utils]
216 - dev-texlive/texlive-fontsrecommended
217 - dev-texlive/texlive-latexextra
218 - dev-texlive/texlive-xetex
219 - )
220 - pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
221 - qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )
222 - qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )
223 - "
224 -
225 -# A few C++ source files are written to srcdir.
226 -# Other than that, the ebuild shall be fit for out-of-source build.
227 -DISTUTILS_IN_SOURCE_BUILD=1
228 -
229 -PATCHES=( "${FILESDIR}/${PN}-1.5.3-freetype-spurious-failure.patch" )
230 -
231 -pkg_setup() {
232 - unset DISPLAY # bug #278524
233 - use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
234 -}
235 -
236 -use_setup() {
237 - local uword="${2:-${1}}"
238 - if use ${1}; then
239 - echo "${uword} = True"
240 - echo "${uword}agg = True"
241 - else
242 - echo "${uword} = False"
243 - echo "${uword}agg = False"
244 - fi
245 -}
246 -
247 -python_prepare_all() {
248 -# Generates test failures, but fedora does it
249 -# local PATCHES=(
250 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
251 -# "${FILESDIR}"/${P}-unbundle-agg.patch
252 -# )
253 -# rm -r agg24 CXX || die
254 -# rm -r agg24 || die
255 -
256 -# cat > lib/${PN}/externals/six.py <<-EOF
257 -# from __future__ import absolute_import
258 -# from six import *
259 -# EOF
260 -
261 - sed \
262 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
263 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
264 - || die "sed pyparsing failed"
265 -
266 - # suggested by upstream
267 -# sed \
268 -# -e '/tol/s:32:35:g' \
269 -# -i lib/matplotlib/tests/test_mathtext.py || die
270 -
271 - sed \
272 - -e "s:/usr/:${EPREFIX}/usr/:g" \
273 - -i setupext.py || die
274 -
275 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
276 - mkdir "${XDG_RUNTIME_DIR}" || die
277 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
278 -
279 - distutils-r1_python_prepare_all
280 -}
281 -
282 -python_configure_all() {
283 - append-flags -fno-strict-aliasing
284 - append-cppflags -DNDEBUG # or get old trying to do triangulation
285 - tc-export PKG_CONFIG
286 -}
287 -
288 -python_configure() {
289 - mkdir -p "${BUILD_DIR}" || die
290 -
291 - # create setup.cfg (see setup.cfg.template for any changes).
292 -
293 - # common switches.
294 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
295 - [directories]
296 - basedirlist = "${EPREFIX}/usr"
297 - [provide_packages]
298 - pytz = False
299 - dateutil = False
300 - [gui_support]
301 - agg = True
302 - $(use_setup cairo)
303 - $(use_setup pyside)
304 - $(use_setup qt4)
305 - $(use_setup qt5)
306 - $(use_setup tk)
307 - EOF
308 -
309 - if use gtk3 && use cairo; then
310 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
311 - else
312 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
313 - fi
314 -
315 - if $(python_is_python3); then
316 - cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die
317 - six = True
318 - fltk = False
319 - fltkagg = False
320 - gtk = False
321 - gtkagg = False
322 - wx = False
323 - wxagg = False
324 - EOF
325 - else
326 - cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
327 - six = False
328 - $(use_setup fltk)
329 - $(use_setup gtk2 gtk)
330 - $(use_setup gtk3)
331 - $(use_setup wxwidgets wx)
332 - EOF
333 - fi
334 -}
335 -
336 -wrap_setup() {
337 - local MPLSETUPCFG=${BUILD_DIR}/setup.cfg
338 - export MPLSETUPCFG
339 - unset DISPLAY
340 -
341 - # Note: remove build... if switching to out-of-source build
342 - "${@}" build --build-lib="${BUILD_DIR}"/build/lib
343 -}
344 -
345 -python_compile() {
346 - wrap_setup distutils-r1_python_compile
347 -}
348 -
349 -python_compile_all() {
350 - if use doc; then
351 - cd doc || die
352 -
353 - # necessary for in-source build
354 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
355 -
356 - VARTEXFONTS="${T}"/fonts \
357 - "${EPYTHON}" ./make.py --small html || die
358 - fi
359 -}
360 -
361 -python_test() {
362 - wrap_setup distutils_install_for_testing
363 -
364 -# virtx ${EPYTHON} tests.py \
365 -# --no-pep8 \
366 -# --no-network \
367 -# --verbose \
368 -# --processes=$(makeopts_jobs)
369 -
370 - virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
371 -}
372 -
373 -python_install() {
374 - wrap_setup distutils-r1_python_install
375 -}
376 -
377 -python_install_all() {
378 - use doc && local HTML_DOCS=( doc/build/html/. )
379 -
380 - distutils-r1_python_install_all
381 -
382 - if use examples; then
383 - dodoc -r examples
384 - docompress -x /usr/share/doc/${PF}/examples
385 - fi
386 -}
387
388 diff --git a/dev-python/matplotlib/matplotlib-1.5.3-r2.ebuild b/dev-python/matplotlib/matplotlib-1.5.3-r2.ebuild
389 deleted file mode 100644
390 index 9b22ea3ab8c..00000000000
391 --- a/dev-python/matplotlib/matplotlib-1.5.3-r2.ebuild
392 +++ /dev/null
393 @@ -1,269 +0,0 @@
394 -# Copyright 1999-2017 Gentoo Foundation
395 -# Distributed under the terms of the GNU General Public License v2
396 -
397 -EAPI=6
398 -
399 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
400 -PYTHON_REQ_USE='tk?,threads(+)'
401 -
402 -inherit distutils-r1 eutils flag-o-matic multiprocessing virtualx toolchain-funcs
403 -
404 -DESCRIPTION="Pure python plotting library with matlab like syntax"
405 -HOMEPAGE="http://matplotlib.org/"
406 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
407 -
408 -SLOT="0"
409 -# Main license: matplotlib
410 -# Some modules: BSD
411 -# matplotlib/backends/qt4_editor: MIT
412 -# Fonts: BitstreamVera, OFL-1.1
413 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
414 -KEYWORDS="~amd64 ~arm ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
415 -IUSE="cairo doc excel examples fltk gtk2 gtk3 latex pyside qt4 qt5 test tk wxwidgets"
416 -
417 -PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )"
418 -REQUIRED_USE="
419 - doc? ( ${PY2_FLAGS} )
420 - excel? ( ${PY2_FLAGS} )
421 - fltk? ( ${PY2_FLAGS} )
422 - gtk2? ( ${PY2_FLAGS} )
423 - wxwidgets? ( ${PY2_FLAGS} )
424 - test? (
425 - cairo fltk latex pyside qt5 qt4 tk wxwidgets
426 - || ( gtk2 gtk3 )
427 - )"
428 -
429 -# #456704 -- a lot of py2-only deps
430 -PY2_USEDEP=$(python_gen_usedep python2_7)
431 -COMMON_DEPEND="
432 - dev-python/cycler[${PYTHON_USEDEP}]
433 - >=dev-python/numpy-1.6[${PYTHON_USEDEP}]
434 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
435 - dev-python/pytz[${PYTHON_USEDEP}]
436 - >=dev-python/six-1.4[${PYTHON_USEDEP}]
437 - media-fonts/stix-fonts
438 - media-libs/freetype:2
439 - media-libs/libpng:0
440 - media-libs/qhull
441 - cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
442 - gtk2? (
443 - dev-libs/glib:2=
444 - x11-libs/gdk-pixbuf
445 - x11-libs/gtk+:2
446 - dev-python/pygtk[${PY2_USEDEP}] )
447 - wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )"
448 -
449 -# internal copy of pycxx highly patched
450 -# dev-python/pycxx
451 -
452 -DEPEND="${COMMON_DEPEND}
453 - dev-python/versioneer[${PYTHON_USEDEP}]
454 - dev-python/setuptools[${PYTHON_USEDEP}]
455 - virtual/pkgconfig
456 - doc? (
457 - app-text/dvipng
458 - dev-python/pillow[${PYTHON_USEDEP}]
459 - dev-python/ipython[${PYTHON_USEDEP}]
460 - dev-python/mock[${PY2_USEDEP}]
461 - dev-python/numpydoc[${PYTHON_USEDEP}]
462 - dev-python/sphinx[${PYTHON_USEDEP}]
463 - dev-python/xlwt[${PYTHON_USEDEP}]
464 - dev-texlive/texlive-latexextra
465 - dev-texlive/texlive-fontsrecommended
466 - dev-texlive/texlive-latexrecommended
467 - media-gfx/graphviz[cairo]
468 - )
469 - test? (
470 - dev-python/mock[${PYTHON_USEDEP}]
471 - >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
472 - )"
473 -
474 -RDEPEND="${COMMON_DEPEND}
475 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
476 - excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
477 - fltk? ( dev-python/pyfltk[${PYTHON_USEDEP}] )
478 - gtk3? (
479 - dev-python/pygobject:3[${PYTHON_USEDEP}]
480 - x11-libs/gtk+:3[introspection] )
481 - latex? (
482 - virtual/latex-base
483 - app-text/ghostscript-gpl
484 - app-text/dvipng
485 - app-text/poppler[utils]
486 - dev-texlive/texlive-fontsrecommended
487 - dev-texlive/texlive-latexextra
488 - dev-texlive/texlive-xetex
489 - )
490 - pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
491 - qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )
492 - qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )
493 - "
494 -
495 -# A few C++ source files are written to srcdir.
496 -# Other than that, the ebuild shall be fit for out-of-source build.
497 -DISTUTILS_IN_SOURCE_BUILD=1
498 -
499 -PATCHES=( "${FILESDIR}/${PN}-1.5.3-freetype-spurious-failure.patch" )
500 -
501 -pkg_setup() {
502 - unset DISPLAY # bug #278524
503 - use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
504 -}
505 -
506 -use_setup() {
507 - local uword="${2:-${1}}"
508 - if use ${1}; then
509 - echo "${uword} = True"
510 - echo "${uword}agg = True"
511 - else
512 - echo "${uword} = False"
513 - echo "${uword}agg = False"
514 - fi
515 -}
516 -
517 -python_prepare_all() {
518 -# Generates test failures, but fedora does it
519 -# local PATCHES=(
520 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
521 -# "${FILESDIR}"/${P}-unbundle-agg.patch
522 -# )
523 -# rm -r agg24 CXX || die
524 -# rm -r agg24 || die
525 -
526 -# cat > lib/${PN}/externals/six.py <<-EOF
527 -# from __future__ import absolute_import
528 -# from six import *
529 -# EOF
530 -
531 - sed \
532 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
533 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
534 - || die "sed pyparsing failed"
535 -
536 - # suggested by upstream
537 -# sed \
538 -# -e '/tol/s:32:35:g' \
539 -# -i lib/matplotlib/tests/test_mathtext.py || die
540 -
541 - sed \
542 - -e "s:/usr/:${EPREFIX}/usr/:g" \
543 - -i setupext.py || die
544 -
545 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
546 - mkdir "${XDG_RUNTIME_DIR}" || die
547 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
548 -
549 - distutils-r1_python_prepare_all
550 -}
551 -
552 -python_configure_all() {
553 - append-flags -fno-strict-aliasing
554 - append-cppflags -DNDEBUG # or get old trying to do triangulation
555 - tc-export PKG_CONFIG
556 -}
557 -
558 -python_configure() {
559 - mkdir -p "${BUILD_DIR}" || die
560 -
561 - # create setup.cfg (see setup.cfg.template for any changes).
562 -
563 - # common switches.
564 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
565 - [directories]
566 - basedirlist = "${EPREFIX}/usr"
567 - [provide_packages]
568 - pytz = False
569 - dateutil = False
570 - [gui_support]
571 - agg = True
572 - $(use_setup cairo)
573 - $(use_setup pyside)
574 - $(use_setup qt4)
575 - $(use_setup qt5)
576 - $(use_setup tk)
577 - EOF
578 -
579 - if use gtk3 && use cairo; then
580 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
581 - else
582 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
583 - fi
584 -
585 - if $(python_is_python3); then
586 - cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die
587 - six = True
588 - fltk = False
589 - fltkagg = False
590 - gtk = False
591 - gtkagg = False
592 - wx = False
593 - wxagg = False
594 - EOF
595 - else
596 - cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
597 - six = False
598 - $(use_setup fltk)
599 - $(use_setup gtk2 gtk)
600 - $(use_setup gtk3)
601 - $(use_setup wxwidgets wx)
602 - EOF
603 - fi
604 -}
605 -
606 -wrap_setup() {
607 - local MPLSETUPCFG=${BUILD_DIR}/setup.cfg
608 - export MPLSETUPCFG
609 - unset DISPLAY
610 -
611 - # Note: remove build... if switching to out-of-source build
612 - "${@}" build --build-lib="${BUILD_DIR}"/build/lib
613 -}
614 -
615 -python_compile() {
616 - wrap_setup distutils-r1_python_compile
617 -}
618 -
619 -python_compile_all() {
620 - if use doc; then
621 - cd doc || die
622 -
623 - # necessary for in-source build
624 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
625 -
626 - VARTEXFONTS="${T}"/fonts \
627 - "${EPYTHON}" ./make.py --small html || die
628 - fi
629 -}
630 -
631 -python_test() {
632 - wrap_setup distutils_install_for_testing
633 -
634 -# virtx ${EPYTHON} tests.py \
635 -# --no-pep8 \
636 -# --no-network \
637 -# --verbose \
638 -# --processes=$(makeopts_jobs)
639 -
640 - virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
641 -}
642 -
643 -python_install() {
644 - wrap_setup distutils-r1_python_install
645 -
646 - # mpl_toolkits namespace
647 - python_moduleinto mpl_toolkits
648 - python_domodule lib/mpl_toolkits/__init__.py
649 -}
650 -
651 -python_install_all() {
652 - use doc && local HTML_DOCS=( doc/build/html/. )
653 -
654 - distutils-r1_python_install_all
655 -
656 - if use examples; then
657 - dodoc -r examples
658 - docompress -x /usr/share/doc/${PF}/examples
659 - fi
660 -
661 - find "${D}" -name '*.pth' -delete || die
662 -}
663
664 diff --git a/dev-python/matplotlib/matplotlib-2.0.2.ebuild b/dev-python/matplotlib/matplotlib-2.0.2.ebuild
665 deleted file mode 100644
666 index e8214110ebf..00000000000
667 --- a/dev-python/matplotlib/matplotlib-2.0.2.ebuild
668 +++ /dev/null
669 @@ -1,256 +0,0 @@
670 -# Copyright 1999-2017 Gentoo Foundation
671 -# Distributed under the terms of the GNU General Public License v2
672 -
673 -EAPI=6
674 -
675 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
676 -PYTHON_REQ_USE='tk?,threads(+)'
677 -
678 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
679 -
680 -DESCRIPTION="Pure python plotting library with matlab like syntax"
681 -HOMEPAGE="http://matplotlib.org/"
682 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
683 -
684 -SLOT="0"
685 -# Main license: matplotlib
686 -# Some modules: BSD
687 -# matplotlib/backends/qt4_editor: MIT
688 -# Fonts: BitstreamVera, OFL-1.1
689 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
690 -KEYWORDS="~amd64 ~arm64 ~x86"
691 -IUSE="cairo doc excel examples gtk2 gtk3 latex pyside qt4 qt5 test tk wxwidgets"
692 -
693 -PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )"
694 -REQUIRED_USE="
695 - doc? ( ${PY2_FLAGS} )
696 - excel? ( ${PY2_FLAGS} )
697 - gtk2? ( ${PY2_FLAGS} )
698 - wxwidgets? ( ${PY2_FLAGS} )
699 - test? (
700 - cairo latex qt5 tk wxwidgets
701 - || ( gtk2 gtk3 )
702 - )"
703 -
704 -# #456704 -- a lot of py2-only deps
705 -PY2_USEDEP=$(python_gen_usedep python2_7)
706 -COMMON_DEPEND="
707 - dev-python/cycler[${PYTHON_USEDEP}]
708 - dev-python/functools32[${PY2_USEDEP}]
709 - >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
710 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
711 - dev-python/pytz[${PYTHON_USEDEP}]
712 - >=dev-python/six-1.10[${PYTHON_USEDEP}]
713 - dev-python/subprocess32[${PY2_USEDEP}]
714 - media-fonts/stix-fonts
715 - media-libs/freetype:2
716 - media-libs/libpng:0
717 - >=media-libs/qhull-2013
718 - cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
719 - gtk2? (
720 - dev-libs/glib:2=
721 - x11-libs/gdk-pixbuf
722 - x11-libs/gtk+:2
723 - dev-python/pygtk[${PY2_USEDEP}] )
724 - wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )"
725 -
726 -# internal copy of pycxx highly patched
727 -# dev-python/pycxx
728 -
729 -DEPEND="${COMMON_DEPEND}
730 - dev-python/versioneer[${PYTHON_USEDEP}]
731 - dev-python/setuptools[${PYTHON_USEDEP}]
732 - virtual/pkgconfig
733 - doc? (
734 - app-text/dvipng
735 - dev-python/colorspacious[${PYTHON_USEDEP}]
736 - dev-python/pillow[${PYTHON_USEDEP}]
737 - dev-python/ipython[${PYTHON_USEDEP}]
738 - dev-python/mock[${PY2_USEDEP}]
739 - dev-python/numpydoc[${PYTHON_USEDEP}]
740 - dev-python/sphinx[${PYTHON_USEDEP}]
741 - dev-python/xlwt[${PYTHON_USEDEP}]
742 - dev-texlive/texlive-latexextra
743 - dev-texlive/texlive-fontsrecommended
744 - dev-texlive/texlive-latexrecommended
745 - media-gfx/graphviz[cairo]
746 - )
747 - test? (
748 - dev-python/mock[${PYTHON_USEDEP}]
749 - >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
750 - )"
751 -
752 -RDEPEND="${COMMON_DEPEND}
753 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
754 - excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
755 - gtk3? (
756 - dev-python/pygobject:3[${PYTHON_USEDEP}]
757 - x11-libs/gtk+:3[introspection] )
758 - latex? (
759 - virtual/latex-base
760 - app-text/ghostscript-gpl
761 - app-text/dvipng
762 - app-text/poppler[utils]
763 - dev-texlive/texlive-fontsrecommended
764 - dev-texlive/texlive-latexextra
765 - dev-texlive/texlive-xetex
766 - )
767 - pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
768 - qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )
769 - qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )
770 - "
771 -
772 -# A few C++ source files are written to srcdir.
773 -# Other than that, the ebuild shall be fit for out-of-source build.
774 -DISTUTILS_IN_SOURCE_BUILD=1
775 -
776 -PATCHES=(
777 - "${FILESDIR}"/${P}-nose-fixes.patch
778 - "${FILESDIR}"/${P}-freetype-spurious-failure.patch
779 -)
780 -
781 -pkg_setup() {
782 - unset DISPLAY # bug #278524
783 - use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
784 -}
785 -
786 -use_setup() {
787 - local uword="${2:-${1}}"
788 - if use ${1}; then
789 - echo "${uword} = True"
790 - echo "${uword}agg = True"
791 - else
792 - echo "${uword} = False"
793 - echo "${uword}agg = False"
794 - fi
795 -}
796 -
797 -python_prepare_all() {
798 -# Generates test failures, but fedora does it
799 -# local PATCHES=(
800 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
801 -# "${FILESDIR}"/${P}-unbundle-agg.patch
802 -# )
803 -# rm -r agg24 CXX || die
804 -# rm -r agg24 || die
805 -
806 -# cat > lib/${PN}/externals/six.py <<-EOF
807 -# from __future__ import absolute_import
808 -# from six import *
809 -# EOF
810 -
811 - sed \
812 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
813 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
814 - || die "sed pyparsing failed"
815 -
816 - hprefixify setupext.py
817 -
818 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
819 - mkdir "${XDG_RUNTIME_DIR}" || die
820 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
821 -
822 - rm -r extern/qhull || die
823 -
824 - distutils-r1_python_prepare_all
825 -}
826 -
827 -python_configure_all() {
828 - append-flags -fno-strict-aliasing
829 - append-cppflags -DNDEBUG # or get old trying to do triangulation
830 - tc-export PKG_CONFIG
831 -}
832 -
833 -python_configure() {
834 - mkdir -p "${BUILD_DIR}" || die
835 -
836 - # create setup.cfg (see setup.cfg.template for any changes).
837 -
838 - # common switches.
839 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
840 - [directories]
841 - basedirlist = ${EPREFIX}/usr
842 - [provide_packages]
843 - pytz = False
844 - dateutil = False
845 - [packages]
846 - tests = $(usex test True False)
847 - [gui_support]
848 - agg = True
849 - $(use_setup cairo)
850 - $(use_setup gtk3)
851 - $(use_setup pyside)
852 - $(use_setup qt4)
853 - $(use_setup qt5)
854 - $(use_setup tk)
855 - EOF
856 -
857 - if use gtk3 && use cairo; then
858 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
859 - else
860 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
861 - fi
862 -
863 - if python_is_python3; then
864 - cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die
865 - gtk = False
866 - gtkagg = False
867 - wx = False
868 - wxagg = False
869 - EOF
870 - else
871 - cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
872 - $(use_setup gtk2 gtk)
873 - $(use_setup wxwidgets wx)
874 - EOF
875 - fi
876 -}
877 -
878 -wrap_setup() {
879 - local -x MPLSETUPCFG=${BUILD_DIR}/setup.cfg
880 - unset DISPLAY
881 - "$@"
882 -}
883 -
884 -python_compile() {
885 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
886 -}
887 -
888 -python_compile_all() {
889 - if use doc; then
890 - cd doc || die
891 -
892 - # necessary for in-source build
893 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
894 -
895 - VARTEXFONTS="${T}"/fonts \
896 - "${EPYTHON}" ./make.py --small html || die
897 - fi
898 -}
899 -
900 -python_test() {
901 - wrap_setup distutils_install_for_testing
902 -
903 - virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
904 -}
905 -
906 -python_install() {
907 - wrap_setup distutils-r1_python_install
908 -
909 - # mpl_toolkits namespace
910 - python_moduleinto mpl_toolkits
911 - python_domodule lib/mpl_toolkits/__init__.py
912 -}
913 -
914 -python_install_all() {
915 - use doc && local HTML_DOCS=( doc/build/html/. )
916 -
917 - distutils-r1_python_install_all
918 -
919 - if use examples; then
920 - dodoc -r examples
921 - docompress -x /usr/share/doc/${PF}/examples
922 - fi
923 -
924 - find "${D}" -name '*.pth' -delete || die
925 -}
926
927 diff --git a/dev-python/matplotlib/matplotlib-2.1.0.ebuild b/dev-python/matplotlib/matplotlib-2.1.0.ebuild
928 deleted file mode 100644
929 index 766e5f93a00..00000000000
930 --- a/dev-python/matplotlib/matplotlib-2.1.0.ebuild
931 +++ /dev/null
932 @@ -1,250 +0,0 @@
933 -# Copyright 1999-2017 Gentoo Foundation
934 -# Distributed under the terms of the GNU General Public License v2
935 -
936 -EAPI=6
937 -
938 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
939 -PYTHON_REQ_USE='tk?,threads(+)'
940 -
941 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
942 -
943 -DESCRIPTION="Pure python plotting library with matlab like syntax"
944 -HOMEPAGE="http://matplotlib.org/"
945 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
946 -
947 -SLOT="0"
948 -# Main license: matplotlib
949 -# Some modules: BSD
950 -# matplotlib/backends/qt4_editor: MIT
951 -# Fonts: BitstreamVera, OFL-1.1
952 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
953 -KEYWORDS="~amd64 ~arm64 ~x86"
954 -IUSE="cairo doc excel examples gtk2 gtk3 latex pyside qt5 test tk wxwidgets"
955 -
956 -PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )"
957 -REQUIRED_USE="
958 - doc? ( ${PY2_FLAGS} )
959 - excel? ( ${PY2_FLAGS} )
960 - gtk2? ( ${PY2_FLAGS} )
961 - wxwidgets? ( ${PY2_FLAGS} )
962 - test? (
963 - cairo latex qt5 tk wxwidgets
964 - || ( gtk2 gtk3 )
965 - )"
966 -
967 -# #456704 -- a lot of py2-only deps
968 -PY2_USEDEP=$(python_gen_usedep python2_7)
969 -COMMON_DEPEND="
970 - dev-python/cycler[${PYTHON_USEDEP}]
971 - dev-python/functools32[${PY2_USEDEP}]
972 - >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
973 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
974 - dev-python/pytz[${PYTHON_USEDEP}]
975 - >=dev-python/six-1.10[${PYTHON_USEDEP}]
976 - dev-python/subprocess32[${PY2_USEDEP}]
977 - media-fonts/stix-fonts
978 - media-libs/freetype:2
979 - media-libs/libpng:0
980 - >=media-libs/qhull-2013
981 - cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
982 - gtk2? (
983 - dev-libs/glib:2=
984 - x11-libs/gdk-pixbuf
985 - x11-libs/gtk+:2
986 - dev-python/pygtk[${PY2_USEDEP}] )
987 - wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )"
988 -
989 -# internal copy of pycxx highly patched
990 -# dev-python/pycxx
991 -
992 -DEPEND="${COMMON_DEPEND}
993 - dev-python/versioneer[${PYTHON_USEDEP}]
994 - dev-python/setuptools[${PYTHON_USEDEP}]
995 - virtual/pkgconfig
996 - doc? (
997 - app-text/dvipng
998 - dev-python/colorspacious[${PYTHON_USEDEP}]
999 - dev-python/pillow[${PYTHON_USEDEP}]
1000 - dev-python/ipython[${PYTHON_USEDEP}]
1001 - dev-python/mock[${PY2_USEDEP}]
1002 - dev-python/numpydoc[${PYTHON_USEDEP}]
1003 - dev-python/sphinx[${PYTHON_USEDEP}]
1004 - dev-python/xlwt[${PYTHON_USEDEP}]
1005 - dev-texlive/texlive-latexextra
1006 - dev-texlive/texlive-fontsrecommended
1007 - dev-texlive/texlive-latexrecommended
1008 - media-gfx/graphviz[cairo]
1009 - )
1010 - test? (
1011 - dev-python/backports-functools-lru-cache[${PY2_USEDEP}]
1012 - dev-python/mock[${PYTHON_USEDEP}]
1013 - >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
1014 - )"
1015 -
1016 -RDEPEND="${COMMON_DEPEND}
1017 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
1018 - excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
1019 - gtk3? (
1020 - dev-python/pygobject:3[${PYTHON_USEDEP}]
1021 - x11-libs/gtk+:3[introspection] )
1022 - latex? (
1023 - virtual/latex-base
1024 - app-text/ghostscript-gpl
1025 - app-text/dvipng
1026 - app-text/poppler[utils]
1027 - dev-texlive/texlive-fontsrecommended
1028 - dev-texlive/texlive-latexextra
1029 - dev-texlive/texlive-xetex
1030 - )
1031 - pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
1032 - qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )
1033 - "
1034 -
1035 -# A few C++ source files are written to srcdir.
1036 -# Other than that, the ebuild shall be fit for out-of-source build.
1037 -DISTUTILS_IN_SOURCE_BUILD=1
1038 -
1039 -pkg_setup() {
1040 - unset DISPLAY # bug #278524
1041 - use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
1042 -}
1043 -
1044 -use_setup() {
1045 - local uword="${2:-${1}}"
1046 - if use ${1}; then
1047 - echo "${uword} = True"
1048 - echo "${uword}agg = True"
1049 - else
1050 - echo "${uword} = False"
1051 - echo "${uword}agg = False"
1052 - fi
1053 -}
1054 -
1055 -python_prepare_all() {
1056 -# Generates test failures, but fedora does it
1057 -# local PATCHES=(
1058 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
1059 -# "${FILESDIR}"/${P}-unbundle-agg.patch
1060 -# )
1061 -# rm -r agg24 CXX || die
1062 -# rm -r agg24 || die
1063 -
1064 -# cat > lib/${PN}/externals/six.py <<-EOF
1065 -# from __future__ import absolute_import
1066 -# from six import *
1067 -# EOF
1068 -
1069 - sed \
1070 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
1071 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
1072 - || die "sed pyparsing failed"
1073 -
1074 - hprefixify setupext.py
1075 -
1076 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
1077 - mkdir "${XDG_RUNTIME_DIR}" || die
1078 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
1079 -
1080 - distutils-r1_python_prepare_all
1081 -}
1082 -
1083 -python_configure_all() {
1084 - append-flags -fno-strict-aliasing
1085 - append-cppflags -DNDEBUG # or get old trying to do triangulation
1086 - tc-export PKG_CONFIG
1087 -}
1088 -
1089 -python_configure() {
1090 - mkdir -p "${BUILD_DIR}" || die
1091 -
1092 - # create setup.cfg (see setup.cfg.template for any changes).
1093 -
1094 - # common switches.
1095 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
1096 - [directories]
1097 - basedirlist = ${EPREFIX}/usr
1098 - [provide_packages]
1099 - pytz = False
1100 - dateutil = False
1101 - [packages]
1102 - tests = $(usex test True False)
1103 - [gui_support]
1104 - agg = True
1105 - qt4 = False
1106 - qt4agg = False
1107 - $(use_setup cairo)
1108 - $(use_setup gtk3)
1109 - $(use_setup pyside)
1110 - $(use_setup qt5)
1111 - $(use_setup tk)
1112 - EOF
1113 -
1114 - if use gtk3 && use cairo; then
1115 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
1116 - else
1117 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
1118 - fi
1119 -
1120 - if python_is_python3; then
1121 - cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die
1122 - gtk = False
1123 - gtkagg = False
1124 - wx = False
1125 - wxagg = False
1126 - EOF
1127 - else
1128 - cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
1129 - $(use_setup gtk2 gtk)
1130 - $(use_setup wxwidgets wx)
1131 - EOF
1132 - fi
1133 -}
1134 -
1135 -wrap_setup() {
1136 - local -x MPLSETUPCFG=${BUILD_DIR}/setup.cfg
1137 - unset DISPLAY
1138 - "$@"
1139 -}
1140 -
1141 -python_compile() {
1142 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
1143 -}
1144 -
1145 -python_compile_all() {
1146 - if use doc; then
1147 - cd doc || die
1148 -
1149 - # necessary for in-source build
1150 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
1151 -
1152 - VARTEXFONTS="${T}"/fonts \
1153 - "${EPYTHON}" ./make.py --small html || die
1154 - fi
1155 -}
1156 -
1157 -python_test() {
1158 - wrap_setup distutils_install_for_testing
1159 -
1160 - virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
1161 -}
1162 -
1163 -python_install() {
1164 - wrap_setup distutils-r1_python_install
1165 -
1166 - # mpl_toolkits namespace
1167 - python_moduleinto mpl_toolkits
1168 - python_domodule lib/mpl_toolkits/__init__.py
1169 -}
1170 -
1171 -python_install_all() {
1172 - use doc && local HTML_DOCS=( doc/build/html/. )
1173 -
1174 - distutils-r1_python_install_all
1175 -
1176 - if use examples; then
1177 - dodoc -r examples
1178 - docompress -x /usr/share/doc/${PF}/examples
1179 - fi
1180 -
1181 - find "${D}" -name '*.pth' -delete || die
1182 -}