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/files/, dev-python/matplotlib/
Date: Tue, 07 Sep 2021 07:10:35
Message-Id: 1630998627.04c7991ef9a7e1619f387a6600abaea808f41aa7.mgorny@gentoo
1 commit: 04c7991ef9a7e1619f387a6600abaea808f41aa7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 7 05:14:38 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 7 07:10:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04c7991e
7
8 dev-python/matplotlib: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/matplotlib/Manifest | 3 -
13 .../matplotlib/files/matplotlib-3.3.0-test.patch | 225 ----------------
14 .../files/matplotlib-3.3.2-test-extra.patch | 25 --
15 .../files/matplotlib-3.3.4-test-extra.patch | 12 -
16 dev-python/matplotlib/matplotlib-3.3.4.ebuild | 282 ---------------------
17 dev-python/matplotlib/matplotlib-3.4.0.ebuild | 280 --------------------
18 dev-python/matplotlib/matplotlib-3.4.1.ebuild | 279 --------------------
19 7 files changed, 1106 deletions(-)
20
21 diff --git a/dev-python/matplotlib/Manifest b/dev-python/matplotlib/Manifest
22 index 39a8b399b75..64a5e12872c 100644
23 --- a/dev-python/matplotlib/Manifest
24 +++ b/dev-python/matplotlib/Manifest
25 @@ -1,6 +1,3 @@
26 DIST freetype-2.6.1.tar.gz 2302080 BLAKE2B 6a5fb98e5fa6cf4b7d7533ad44e364227d8c2f7dded4c552d6e22e204c32b7858f20d41d1e809ecdad6e5353d6cec81bea0e0b06a4533363a41ecab83ce3f7ca SHA512 ff2daed64d712737085924c50e75862fafbcbb24eef6d72dac9eaae63bb656d7245397fd828f5d3e47ac847f7ff83d73dedfdd61fde1f7d6e0f0cdeb49bcf83b
27 -DIST matplotlib-3.3.4.tar.gz 37941665 BLAKE2B 77b86dc3ceec3695a0d749197bcec684893d237da1aaf8778d9dc2038da1ba56b757bbce94efcf215ac30f35420b77e0a0e75ebb75b6d2cde5146d8a35ee25e7 SHA512 aadfe3db4edde9940b9e15daf1b6c5f237d3a6f38610956ceee994f919d711fce818ea12be4db18aa2a8638c4e8f434d79541fecaa7233e233bf4c73792bc4c4
28 -DIST matplotlib-3.4.0.tar.gz 37142983 BLAKE2B 64b23d5b9e93e6b319674cea06d0ad425def952e50e7cb163ae91ae0d4460872bb329144271472b7dc2d0ab0a742c9c93ea735dca60ee4b4aa569cb4350cca0b SHA512 880c1e1027c819a34f5528b96d1b730cdd6541aa23931aef4185406ecec971ec2f4c8ca374eced56e654e016652472f7abcd0aae977dd4f327b8c511983a2a1d
29 -DIST matplotlib-3.4.1.tar.gz 37253296 BLAKE2B e1dfd1b0d8bb0d3ed13ac03a5b3112a237c4b7ef3c82694ad6779c810bbd94c165bde88d00fad270d5da6e269d778b33f276620b51e1f134fa2c5b9dcb0a4f28 SHA512 076510ddd152a395fabb76aa47566e9b75f3c8ba3c5246b39229b20fbfc209d4bbdfd441271b22e364f0974963309c02bdd0519fc2a7e8a406afc462f69246b6
30 DIST matplotlib-3.4.2.tar.gz 37308683 BLAKE2B b769244b3d7a7da9125f6b634e9340676d849322491390d1c9a0cec3dfce59a8b5b5c0b567575ae78212129f7303b6b1fbbf30ce7c8a23c43c1304e83c9c5f5e SHA512 d4798dd2d6c857db0fe6d4ec85ebabc028b78627311bab17f7b9b30f6aa61d5243114b1cfe9d83293ad66ae47df83add5272f032954990dfc04054a792049f2a
31 DIST matplotlib-3.4.3.tar.gz 37850796 BLAKE2B 15b40da8f6973ece4a91fffb5caf249cb8642263bfc2a784ec482bfaad250b6d3beffb9d2ba8a03e5fa10abab02b0e35728a8499ccb870aca06df57c5c1f91f4 SHA512 c2fe54e7517a1417aa8e55596e83edd090534c07f22882634d6ba0a07196441b5bbdd15958473805d8e8871b1b73380487aff3224294d472cd6122490c783145
32
33 diff --git a/dev-python/matplotlib/files/matplotlib-3.3.0-test.patch b/dev-python/matplotlib/files/matplotlib-3.3.0-test.patch
34 deleted file mode 100644
35 index c7ce64b9b3b..00000000000
36 --- a/dev-python/matplotlib/files/matplotlib-3.3.0-test.patch
37 +++ /dev/null
38 @@ -1,225 +0,0 @@
39 -From 2fa4f25b9db19a1f59b03d56221c4752c03912fb Mon Sep 17 00:00:00 2001
40 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
41 -Date: Sun, 7 Jun 2020 20:02:48 +0200
42 -Subject: [PATCH] Increase image comparison limits
43 -
44 -Most of the tests require exact match which apparently doesn't always
45 -happen in non-pristine environments. Some of them have very big
46 -differences due to texlive font rendering changes.
47 ----
48 - lib/matplotlib/tests/test_arrow_patches.py | 4 ++--
49 - lib/matplotlib/tests/test_axes.py | 2 +-
50 - lib/matplotlib/tests/test_backend_pgf.py | 8 +++++---
51 - lib/matplotlib/tests/test_figure.py | 2 +-
52 - lib/matplotlib/tests/test_legend.py | 6 +++---
53 - lib/matplotlib/tests/test_pickle.py | 2 +-
54 - lib/matplotlib/tests/test_units.py | 4 ++--
55 - lib/matplotlib/tests/test_usetex.py | 3 ++-
56 - lib/mpl_toolkits/tests/test_axes_grid1.py | 2 +-
57 - .../tests/test_axisartist_grid_helper_curvelinear.py | 2 +-
58 - lib/mpl_toolkits/tests/test_mplot3d.py | 2 +-
59 - 11 files changed, 20 insertions(+), 17 deletions(-)
60 -
61 -diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
62 -index cca505ab9..871935c15 100644
63 ---- a/lib/matplotlib/tests/test_arrow_patches.py
64 -+++ b/lib/matplotlib/tests/test_arrow_patches.py
65 -@@ -67,7 +67,7 @@ def __prepare_fancyarrow_dpi_cor_test():
66 -
67 -
68 - @image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
69 -- tol=0 if platform.machine() == 'x86_64' else 0.02,
70 -+ tol=0.015 if platform.machine() == 'x86_64' else 0.02,
71 - savefig_kwarg=dict(dpi=100))
72 - def test_fancyarrow_dpi_cor_100dpi():
73 - """
74 -@@ -82,7 +82,7 @@ def test_fancyarrow_dpi_cor_100dpi():
75 -
76 -
77 - @image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
78 -- tol=0 if platform.machine() == 'x86_64' else 0.02,
79 -+ tol=0.018 if platform.machine() == 'x86_64' else 0.02,
80 - savefig_kwarg=dict(dpi=200))
81 - def test_fancyarrow_dpi_cor_200dpi():
82 - """
83 -diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
84 -index 6eedf20d5..198ed41ec 100644
85 ---- a/lib/matplotlib/tests/test_axes.py
86 -+++ b/lib/matplotlib/tests/test_axes.py
87 -@@ -3718,7 +3718,7 @@ def test_vertex_markers():
88 -
89 -
90 - @image_comparison(['vline_hline_zorder', 'errorbar_zorder'],
91 -- tol=0 if platform.machine() == 'x86_64' else 0.02)
92 -+ tol=0.015 if platform.machine() == 'x86_64' else 0.02)
93 - def test_eb_line_zorder():
94 - x = list(range(10))
95 -
96 -diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
97 -index 702cc6c35..71038e702 100644
98 ---- a/lib/matplotlib/tests/test_backend_pgf.py
99 -+++ b/lib/matplotlib/tests/test_backend_pgf.py
100 -@@ -114,7 +114,8 @@ def test_xelatex():
101 - # test compiling a figure to pdf with pdflatex
102 - @needs_pdflatex
103 - @pytest.mark.backend('pgf')
104 --@image_comparison(['pgf_pdflatex.pdf'], style='default')
105 -+@image_comparison(['pgf_pdflatex.pdf'], style='default',
106 -+ tol=11.669)
107 - def test_pdflatex():
108 - if os.environ.get('APPVEYOR', False):
109 - pytest.xfail("pdflatex test does not work on appveyor due to missing "
110 -@@ -151,7 +152,7 @@ def test_rcupdate():
111 - 'pgf.preamble': ('\\usepackage[utf8x]{inputenc}'
112 - '\\usepackage[T1]{fontenc}'
113 - '\\usepackage{sfmath}')}]
114 -- tol = [6, 0]
115 -+ tol = [6, 14]
116 - for i, rc_set in enumerate(rc_sets):
117 - with mpl.rc_context(rc_set):
118 - create_figure()
119 -@@ -178,7 +179,8 @@ def test_pathclip():
120 - # test mixed mode rendering
121 - @needs_xelatex
122 - @pytest.mark.backend('pgf')
123 --@image_comparison(['pgf_mixedmode.pdf'], style='default')
124 -+@image_comparison(['pgf_mixedmode.pdf'], style='default',
125 -+ tol=1.086)
126 - def test_mixedmode():
127 - rc_xelatex = {'font.family': 'serif',
128 - 'pgf.rcfonts': False}
129 -diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
130 -index aab35201c..a657198f7 100644
131 ---- a/lib/matplotlib/tests/test_figure.py
132 -+++ b/lib/matplotlib/tests/test_figure.py
133 -@@ -22,7 +22,7 @@ import pytest
134 -
135 -
136 - @image_comparison(['figure_align_labels'],
137 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
138 -+ tol=0.02)
139 - def test_align_labels():
140 - fig = plt.figure(tight_layout=True)
141 - gs = gridspec.GridSpec(3, 3)
142 -diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
143 -index 8e9c0771f..d1fb3818a 100644
144 ---- a/lib/matplotlib/tests/test_legend.py
145 -+++ b/lib/matplotlib/tests/test_legend.py
146 -@@ -105,7 +105,7 @@ def test_multiple_keys():
147 -
148 -
149 - @image_comparison(['rgba_alpha.png'], remove_text=True,
150 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
151 -+ tol=0.02)
152 - def test_alpha_rgba():
153 - fig, ax = plt.subplots(1, 1)
154 - ax.plot(range(10), lw=5)
155 -@@ -114,7 +114,7 @@ def test_alpha_rgba():
156 -
157 -
158 - @image_comparison(['rcparam_alpha.png'], remove_text=True,
159 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
160 -+ tol=0.02)
161 - def test_alpha_rcparam():
162 - fig, ax = plt.subplots(1, 1)
163 - ax.plot(range(10), lw=5)
164 -@@ -140,7 +140,7 @@ def test_fancy():
165 -
166 -
167 - @image_comparison(['framealpha'], remove_text=True,
168 -- tol=0 if platform.machine() == 'x86_64' else 0.02)
169 -+ tol=0.02)
170 - def test_framealpha():
171 - x = np.linspace(1, 100, 100)
172 - y = x
173 -diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
174 -index 82bf4d8e8..13046357a 100644
175 ---- a/lib/matplotlib/tests/test_pickle.py
176 -+++ b/lib/matplotlib/tests/test_pickle.py
177 -@@ -41,7 +41,7 @@ def test_simple():
178 -
179 -
180 - @image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20',
181 -- tol=0 if platform.machine() == 'x86_64' else 0.082)
182 -+ tol=0.082)
183 - def test_complete():
184 - fig = plt.figure('Figure with a label?', figsize=(10, 6))
185 -
186 -diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
187 -index 252136b4d..f0e7ced31 100644
188 ---- a/lib/matplotlib/tests/test_units.py
189 -+++ b/lib/matplotlib/tests/test_units.py
190 -@@ -74,7 +74,7 @@ def quantity_converter():
191 - # Tests that the conversion machinery works properly for classes that
192 - # work as a facade over numpy arrays (like pint)
193 - @image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
194 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
195 -+ tol=0.002 if platform.machine() == 'x86_64' else 0.01)
196 - def test_numpy_facade(quantity_converter):
197 - # use former defaults to match existing baseline image
198 - plt.rcParams['axes.formatter.limits'] = -7, 7
199 -@@ -101,7 +101,7 @@ def test_numpy_facade(quantity_converter):
200 -
201 - # Tests gh-8908
202 - @image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
203 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
204 -+ tol=0.02)
205 - def test_plot_masked_units():
206 - data = np.linspace(-5, 5)
207 - data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
208 -diff --git a/lib/matplotlib/tests/test_usetex.py b/lib/matplotlib/tests/test_usetex.py
209 -index 25006f174..694a510e7 100644
210 ---- a/lib/matplotlib/tests/test_usetex.py
211 -+++ b/lib/matplotlib/tests/test_usetex.py
212 -@@ -13,7 +13,8 @@ if not mpl.checkdep_usetex(True):
213 - @image_comparison(
214 - baseline_images=['test_usetex'],
215 - extensions=['pdf', 'png'],
216 -- style="mpl20")
217 -+ style="mpl20",
218 -+ tol=21)
219 - def test_usetex():
220 - mpl.rcParams['text.usetex'] = True
221 - fig = plt.figure()
222 -diff --git a/lib/mpl_toolkits/tests/test_axes_grid1.py b/lib/mpl_toolkits/tests/test_axes_grid1.py
223 -index 96830441e..c403b0bf2 100644
224 ---- a/lib/mpl_toolkits/tests/test_axes_grid1.py
225 -+++ b/lib/mpl_toolkits/tests/test_axes_grid1.py
226 -@@ -331,7 +331,7 @@ def test_zooming_with_inverted_axes():
227 -
228 -
229 - @image_comparison(['anchored_direction_arrows.png'],
230 -- tol=0 if platform.machine() == 'x86_64' else 0.01)
231 -+ tol=0.02)
232 - def test_anchored_direction_arrows():
233 - fig, ax = plt.subplots()
234 - ax.imshow(np.zeros((10, 10)), interpolation='nearest')
235 -diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
236 -index 05534869a..6e7053722 100644
237 ---- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
238 -+++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
239 -@@ -17,7 +17,7 @@ from mpl_toolkits.axisartist.grid_helper_curvelinear import \
240 -
241 -
242 - @image_comparison(['custom_transform.png'], style='default',
243 -- tol=0.03 if platform.machine() == 'x86_64' else 0.034)
244 -+ tol=0.034)
245 - def test_custom_transform():
246 - class MyTransform(Transform):
247 - input_dims = output_dims = 2
248 -diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py
249 -index 37532335e..5a2645235 100644
250 ---- a/lib/mpl_toolkits/tests/test_mplot3d.py
251 -+++ b/lib/mpl_toolkits/tests/test_mplot3d.py
252 -@@ -287,7 +287,7 @@ def test_marker_draw_order_view_rotated(fig_test, fig_ref):
253 - ax.view_init(elev=0, azim=azim - 180) # view rotated by 180 degrees
254 -
255 -
256 --@mpl3d_image_comparison(['plot_3d_from_2d.png'], tol=0.01)
257 -+@mpl3d_image_comparison(['plot_3d_from_2d.png'], tol=0.012)
258 - def test_plot_3d_from_2d():
259 - fig = plt.figure()
260 - ax = fig.add_subplot(111, projection='3d')
261 ---
262 -2.27.0
263 -
264
265 diff --git a/dev-python/matplotlib/files/matplotlib-3.3.2-test-extra.patch b/dev-python/matplotlib/files/matplotlib-3.3.2-test-extra.patch
266 deleted file mode 100644
267 index 1fff166295b..00000000000
268 --- a/dev-python/matplotlib/files/matplotlib-3.3.2-test-extra.patch
269 +++ /dev/null
270 @@ -1,25 +0,0 @@
271 -From 5d2f40b312966c08436b4495980313f2dacd9750 Mon Sep 17 00:00:00 2001
272 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
273 -Date: Tue, 15 Sep 2020 23:48:05 +0200
274 -Subject: [PATCH] Increase tolerance for test_transparent_markers
275 -
276 ----
277 - lib/matplotlib/tests/test_axes.py | 2 +-
278 - 1 file changed, 1 insertion(+), 1 deletion(-)
279 -
280 -diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
281 -index 412dd2471..52a32f9f1 100644
282 ---- a/lib/matplotlib/tests/test_axes.py
283 -+++ b/lib/matplotlib/tests/test_axes.py
284 -@@ -3500,7 +3500,7 @@ def test_hist_labels():
285 - assert l[2][0].get_label() == '00'
286 -
287 -
288 --@image_comparison(['transparent_markers'], remove_text=True)
289 -+@image_comparison(['transparent_markers'], remove_text=True, tol=5)
290 - def test_transparent_markers():
291 - np.random.seed(0)
292 - data = np.random.random(50)
293 ---
294 -2.28.0
295 -
296
297 diff --git a/dev-python/matplotlib/files/matplotlib-3.3.4-test-extra.patch b/dev-python/matplotlib/files/matplotlib-3.3.4-test-extra.patch
298 deleted file mode 100644
299 index 0c62334086a..00000000000
300 --- a/dev-python/matplotlib/files/matplotlib-3.3.4-test-extra.patch
301 +++ /dev/null
302 @@ -1,12 +0,0 @@
303 -diff -dupr a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py
304 ---- a/lib/mpl_toolkits/tests/test_mplot3d.py 2021-01-29 10:43:01.196582153 +0100
305 -+++ b/lib/mpl_toolkits/tests/test_mplot3d.py 2021-01-29 10:44:36.084875177 +0100
306 -@@ -150,7 +150,7 @@ def test_contourf3d_fill():
307 - ax.set_zlim(-1, 1)
308 -
309 -
310 --@mpl3d_image_comparison(['tricontour.png'])
311 -+@mpl3d_image_comparison(['tricontour.png'], tol=0.02)
312 - def test_tricontour():
313 - fig = plt.figure()
314 -
315
316 diff --git a/dev-python/matplotlib/matplotlib-3.3.4.ebuild b/dev-python/matplotlib/matplotlib-3.3.4.ebuild
317 deleted file mode 100644
318 index 9e754ff8b2d..00000000000
319 --- a/dev-python/matplotlib/matplotlib-3.3.4.ebuild
320 +++ /dev/null
321 @@ -1,282 +0,0 @@
322 -# Copyright 1999-2021 Gentoo Authors
323 -# Distributed under the terms of the GNU General Public License v2
324 -
325 -EAPI=7
326 -
327 -PYTHON_COMPAT=( python3_{7..9} )
328 -PYTHON_REQ_USE='tk?,threads(+)'
329 -
330 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
331 -
332 -FT_PV=2.6.1
333 -DESCRIPTION="Pure python plotting library with matlab like syntax"
334 -HOMEPAGE="https://matplotlib.org/"
335 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
336 - test? (
337 - https://downloads.sourceforge.net/project/freetype/freetype2/${FT_PV}/freetype-${FT_PV}.tar.gz
338 - )"
339 -
340 -# Main license: matplotlib
341 -# Some modules: BSD
342 -# matplotlib/backends/qt4_editor: MIT
343 -# Fonts: BitstreamVera, OFL-1.1
344 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
345 -SLOT="0"
346 -KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 x86"
347 -IUSE="cairo doc excel examples gtk3 latex qt5 tk webagg wxwidgets"
348 -
349 -# internal copy of pycxx highly patched
350 -# dev-python/pycxx
351 -RDEPEND="
352 - dev-python/certifi[${PYTHON_USEDEP}]
353 - >=dev-python/cycler-0.10.0-r1[${PYTHON_USEDEP}]
354 - >=dev-python/kiwisolver-1.2.0[${PYTHON_USEDEP}]
355 - >=dev-python/numpy-1.18.2[${PYTHON_USEDEP}]
356 - >=dev-python/pillow-7.1.1[jpeg,${PYTHON_USEDEP}]
357 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
358 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
359 - >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
360 - >=dev-python/six-1.14.0[${PYTHON_USEDEP}]
361 - dev-python/versioneer[${PYTHON_USEDEP}]
362 - media-fonts/dejavu
363 - media-fonts/stix-fonts
364 - media-libs/freetype:2
365 - media-libs/libpng:0
366 - >=media-libs/qhull-2013:=
367 - cairo? (
368 - dev-python/cairocffi[${PYTHON_USEDEP}]
369 - )
370 - excel? (
371 - dev-python/xlwt[${PYTHON_USEDEP}]
372 - )
373 - gtk3? (
374 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
375 - x11-libs/gtk+:3[introspection]
376 - )
377 - latex? (
378 - virtual/latex-base
379 - app-text/dvipng
380 - app-text/ghostscript-gpl
381 - app-text/poppler[utils]
382 - dev-texlive/texlive-fontsrecommended
383 - dev-texlive/texlive-latexextra
384 - dev-texlive/texlive-xetex
385 - )
386 - qt5? (
387 - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
388 - )
389 - webagg? (
390 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
391 - )
392 - wxwidgets? (
393 - $(python_gen_cond_dep '
394 - dev-python/wxpython:*[${PYTHON_USEDEP}]
395 - ' python3_{6,7,8})
396 - )
397 -"
398 -
399 -BDEPEND="
400 - ${RDEPEND}
401 - virtual/pkgconfig
402 - doc? (
403 - >=app-text/dvipng-1.15-r1
404 - >=dev-python/colorspacious-1.1.2[${PYTHON_USEDEP}]
405 - >=dev-python/ipython-1.18.2[${PYTHON_USEDEP}]
406 - >=dev-python/numpydoc-0.9.2[${PYTHON_USEDEP}]
407 - >=dev-python/scipy-1.4.1[${PYTHON_USEDEP}]
408 - >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}]
409 - >=dev-python/sphinx-gallery-0.3.1-r1[${PYTHON_USEDEP}]
410 - >=dev-python/xlwt-1.3.0-r1[${PYTHON_USEDEP}]
411 - dev-texlive/texlive-latexextra
412 - dev-texlive/texlive-fontsrecommended
413 - dev-texlive/texlive-latexrecommended
414 - >=media-gfx/graphviz-2.42.3[cairo]
415 - )
416 - test? (
417 - dev-python/flaky[${PYTHON_USEDEP}]
418 - dev-python/mock[${PYTHON_USEDEP}]
419 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
420 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
421 - x11-libs/gtk+:3[introspection]
422 - )
423 -"
424 -
425 -# A few C++ source files are written to srcdir.
426 -# Other than that, the ebuild shall be fit for out-of-source build.
427 -DISTUTILS_IN_SOURCE_BUILD=1
428 -
429 -distutils_enable_tests pytest
430 -
431 -pkg_setup() {
432 - unset DISPLAY # bug #278524
433 -}
434 -
435 -use_supported() {
436 - case ${1} in
437 - wxwidgets)
438 - [[ ${EPYTHON} == python3.[678] ]]
439 - ;;
440 - esac
441 -
442 - return 0
443 -}
444 -
445 -use_setup() {
446 - local uword="${2:-${1}}"
447 - if use_supported "${1}" && use "${1}"; then
448 - echo "${uword} = True"
449 - echo "${uword}agg = True"
450 - else
451 - echo "${uword} = False"
452 - echo "${uword}agg = False"
453 - fi
454 -}
455 -
456 -python_prepare_all() {
457 -# Generates test failures, but fedora does it
458 -# local PATCHES=(
459 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
460 -# "${FILESDIR}"/${P}-unbundle-agg.patch
461 -# )
462 -# rm -r agg24 CXX || die
463 -# rm -r agg24 || die
464 -
465 -# cat > lib/${PN}/externals/six.py <<-EOF
466 -# from __future__ import absolute_import
467 -# from six import *
468 -# EOF
469 -
470 - local PATCHES=(
471 - "${FILESDIR}"/matplotlib-3.3.0-test.patch
472 - "${FILESDIR}"/matplotlib-3.3.2-test-extra.patch
473 - "${FILESDIR}"/matplotlib-3.3.3-disable-lto.patch
474 - "${FILESDIR}"/matplotlib-3.3.4-test-extra.patch
475 - )
476 -
477 - # requires jupyter-nbconvert
478 - rm lib/matplotlib/tests/test_backend_nbagg.py || die
479 -
480 - sed \
481 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
482 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
483 - || die "sed pyparsing failed"
484 -
485 - sed -e 's:\(@pytest.mark.flaky\)(reruns=3):\1:' \
486 - -i lib/matplotlib/tests/test_*.py || die
487 -
488 - hprefixify setupext.py
489 -
490 - rm -rf libqhull || die
491 -
492 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
493 - mkdir "${XDG_RUNTIME_DIR}" || die
494 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
495 -
496 - distutils-r1_python_prepare_all
497 -}
498 -
499 -python_configure_all() {
500 - append-flags -fno-strict-aliasing
501 - append-cppflags -DNDEBUG # or get old trying to do triangulation
502 - tc-export PKG_CONFIG
503 -}
504 -
505 -python_configure() {
506 - mkdir -p "${BUILD_DIR}" || die
507 -
508 - # create setup.cfg (see setup.cfg.template for any changes).
509 -
510 - # common switches.
511 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
512 - [directories]
513 - basedirlist = ${EPREFIX}/usr
514 - [provide_packages]
515 - pytz = False
516 - dateutil = False
517 - [libs]
518 - system_freetype = True
519 - system_qhull = True
520 - [packages]
521 - tests = $(usex test True False)
522 - [gui_support]
523 - agg = True
524 - gtk = False
525 - gtkagg = False
526 - macosx = False
527 - pyside = False
528 - pysideagg = False
529 - qt4 = False
530 - qt4agg = False
531 - $(use_setup cairo)
532 - $(use_setup gtk3)
533 - $(use_setup qt5)
534 - $(use_setup tk)
535 - $(use_setup wxwidgets wx)
536 - EOF
537 -
538 - if use gtk3 && use cairo; then
539 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
540 - else
541 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
542 - fi
543 -}
544 -
545 -wrap_setup() {
546 - local MAKEOPTS=-j1
547 - local -x MPLSETUPCFG="${BUILD_DIR}"/setup.cfg
548 - "$@"
549 -}
550 -
551 -python_compile() {
552 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
553 -}
554 -
555 -python_compile_all() {
556 - if use doc; then
557 - cd doc || die
558 -
559 - # necessary for in-source build
560 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
561 -
562 - VARTEXFONTS="${T}"/fonts \
563 - emake SPHINXOPTS= O=-Dplot_formats=png:100 html
564 - fi
565 -}
566 -
567 -src_test() {
568 - virtx distutils-r1_src_test
569 -}
570 -
571 -python_test() {
572 - # we need to rebuild mpl against bundled freetype, otherwise
573 - # over 1000 tests will fail because of mismatched font rendering
574 - grep -v system_freetype "${BUILD_DIR}"/setup.cfg \
575 - > "${BUILD_DIR}"/test-setup.cfg || die
576 - local -x MPLSETUPCFG="${BUILD_DIR}"/test-setup.cfg
577 - ln -s "${WORKDIR}/freetype-${FT_PV}" "${BUILD_DIR}" || die
578 - distutils-r1_python_compile -j1 --build-lib="${BUILD_DIR}"/test-lib
579 - local -x PYTHONPATH=${BUILD_DIR}/test-lib:${PYTHONPATH}
580 -
581 - "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(m.test(argv=['-m', 'not network'], verbosity=2))" || die
582 -}
583 -
584 -python_install() {
585 - wrap_setup distutils-r1_python_install
586 -
587 - # mpl_toolkits namespace
588 - python_moduleinto mpl_toolkits
589 - python_domodule lib/mpl_toolkits/__init__.py
590 -}
591 -
592 -python_install_all() {
593 - use doc && local HTML_DOCS=( doc/build/html/. )
594 -
595 - distutils-r1_python_install_all
596 -
597 - if use examples; then
598 - dodoc -r examples
599 - docompress -x /usr/share/doc/${PF}/examples
600 - fi
601 -
602 - find "${D}" -name '*.pth' -delete || die
603 -}
604
605 diff --git a/dev-python/matplotlib/matplotlib-3.4.0.ebuild b/dev-python/matplotlib/matplotlib-3.4.0.ebuild
606 deleted file mode 100644
607 index 70fc4ea111b..00000000000
608 --- a/dev-python/matplotlib/matplotlib-3.4.0.ebuild
609 +++ /dev/null
610 @@ -1,280 +0,0 @@
611 -# Copyright 1999-2021 Gentoo Authors
612 -# Distributed under the terms of the GNU General Public License v2
613 -
614 -EAPI=7
615 -
616 -PYTHON_COMPAT=( python3_{7..9} )
617 -PYTHON_REQ_USE='tk?,threads(+)'
618 -
619 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
620 -
621 -FT_PV=2.6.1
622 -DESCRIPTION="Pure python plotting library with matlab like syntax"
623 -HOMEPAGE="https://matplotlib.org/"
624 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
625 - test? (
626 - https://downloads.sourceforge.net/project/freetype/freetype2/${FT_PV}/freetype-${FT_PV}.tar.gz
627 - )"
628 -
629 -# Main license: matplotlib
630 -# Some modules: BSD
631 -# matplotlib/backends/qt4_editor: MIT
632 -# Fonts: BitstreamVera, OFL-1.1
633 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
634 -SLOT="0"
635 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
636 -IUSE="cairo doc excel examples gtk3 latex qt5 tk webagg wxwidgets"
637 -
638 -# internal copy of pycxx highly patched
639 -# dev-python/pycxx
640 -RDEPEND="
641 - dev-python/certifi[${PYTHON_USEDEP}]
642 - >=dev-python/cycler-0.10.0-r1[${PYTHON_USEDEP}]
643 - >=dev-python/kiwisolver-1.2.0[${PYTHON_USEDEP}]
644 - >=dev-python/numpy-1.18.2[${PYTHON_USEDEP}]
645 - >=dev-python/pillow-7.1.1[jpeg,${PYTHON_USEDEP}]
646 - >=dev-python/pyparsing-2.2.1[${PYTHON_USEDEP}]
647 - >=dev-python/python-dateutil-2.7[${PYTHON_USEDEP}]
648 - >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
649 - >=dev-python/six-1.14.0[${PYTHON_USEDEP}]
650 - dev-python/versioneer[${PYTHON_USEDEP}]
651 - media-fonts/dejavu
652 - media-fonts/stix-fonts
653 - media-libs/freetype:2
654 - media-libs/libpng:0
655 - >=media-libs/qhull-2013:=
656 - cairo? (
657 - dev-python/cairocffi[${PYTHON_USEDEP}]
658 - )
659 - excel? (
660 - dev-python/xlwt[${PYTHON_USEDEP}]
661 - )
662 - gtk3? (
663 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
664 - x11-libs/gtk+:3[introspection]
665 - )
666 - latex? (
667 - virtual/latex-base
668 - app-text/dvipng
669 - app-text/ghostscript-gpl
670 - app-text/poppler[utils]
671 - dev-texlive/texlive-fontsrecommended
672 - dev-texlive/texlive-latexextra
673 - dev-texlive/texlive-xetex
674 - )
675 - qt5? (
676 - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
677 - )
678 - webagg? (
679 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
680 - )
681 - wxwidgets? (
682 - $(python_gen_cond_dep '
683 - dev-python/wxpython:*[${PYTHON_USEDEP}]
684 - ' python3_{6,7,8})
685 - )
686 -"
687 -
688 -BDEPEND="
689 - ${RDEPEND}
690 - virtual/pkgconfig
691 - doc? (
692 - >=app-text/dvipng-1.15-r1
693 - >=dev-python/colorspacious-1.1.2[${PYTHON_USEDEP}]
694 - >=dev-python/ipython-1.18.2[${PYTHON_USEDEP}]
695 - >=dev-python/numpydoc-0.9.2[${PYTHON_USEDEP}]
696 - >=dev-python/scipy-1.4.1[${PYTHON_USEDEP}]
697 - >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}]
698 - >=dev-python/sphinx-gallery-0.3.1-r1[${PYTHON_USEDEP}]
699 - >=dev-python/xlwt-1.3.0-r1[${PYTHON_USEDEP}]
700 - dev-texlive/texlive-latexextra
701 - dev-texlive/texlive-fontsrecommended
702 - dev-texlive/texlive-latexrecommended
703 - >=media-gfx/graphviz-2.42.3[cairo]
704 - )
705 - test? (
706 - dev-python/flaky[${PYTHON_USEDEP}]
707 - dev-python/mock[${PYTHON_USEDEP}]
708 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
709 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
710 - x11-libs/gtk+:3[introspection]
711 - )
712 -"
713 -
714 -# A few C++ source files are written to srcdir.
715 -# Other than that, the ebuild shall be fit for out-of-source build.
716 -DISTUTILS_IN_SOURCE_BUILD=1
717 -
718 -distutils_enable_tests pytest
719 -
720 -pkg_setup() {
721 - unset DISPLAY # bug #278524
722 -}
723 -
724 -use_supported() {
725 - case ${1} in
726 - wxwidgets)
727 - [[ ${EPYTHON} == python3.[678] ]]
728 - ;;
729 - esac
730 -
731 - return 0
732 -}
733 -
734 -use_setup() {
735 - local uword="${2:-${1}}"
736 - if use_supported "${1}" && use "${1}"; then
737 - echo "${uword} = True"
738 - echo "${uword}agg = True"
739 - else
740 - echo "${uword} = False"
741 - echo "${uword}agg = False"
742 - fi
743 -}
744 -
745 -python_prepare_all() {
746 -# Generates test failures, but fedora does it
747 -# local PATCHES=(
748 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
749 -# "${FILESDIR}"/${P}-unbundle-agg.patch
750 -# )
751 -# rm -r agg24 CXX || die
752 -# rm -r agg24 || die
753 -
754 -# cat > lib/${PN}/externals/six.py <<-EOF
755 -# from __future__ import absolute_import
756 -# from six import *
757 -# EOF
758 -
759 - local PATCHES=(
760 - "${FILESDIR}"/matplotlib-3.4.0-test.patch
761 - "${FILESDIR}"/matplotlib-3.3.3-disable-lto.patch
762 - )
763 -
764 - # requires jupyter-nbconvert
765 - rm lib/matplotlib/tests/test_backend_nbagg.py || die
766 -
767 - sed \
768 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
769 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
770 - || die "sed pyparsing failed"
771 -
772 - sed -e 's:\(@pytest.mark.flaky\)(reruns=3):\1:' \
773 - -i lib/matplotlib/tests/test_*.py || die
774 -
775 - hprefixify setupext.py
776 -
777 - rm -rf libqhull || die
778 -
779 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
780 - mkdir "${XDG_RUNTIME_DIR}" || die
781 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
782 -
783 - distutils-r1_python_prepare_all
784 -}
785 -
786 -python_configure_all() {
787 - append-flags -fno-strict-aliasing
788 - append-cppflags -DNDEBUG # or get old trying to do triangulation
789 - tc-export PKG_CONFIG
790 -}
791 -
792 -python_configure() {
793 - mkdir -p "${BUILD_DIR}" || die
794 -
795 - # create setup.cfg (see setup.cfg.template for any changes).
796 -
797 - # common switches.
798 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
799 - [directories]
800 - basedirlist = ${EPREFIX}/usr
801 - [provide_packages]
802 - pytz = False
803 - dateutil = False
804 - [libs]
805 - system_freetype = True
806 - system_qhull = True
807 - [packages]
808 - tests = $(usex test True False)
809 - [gui_support]
810 - agg = True
811 - gtk = False
812 - gtkagg = False
813 - macosx = False
814 - pyside = False
815 - pysideagg = False
816 - qt4 = False
817 - qt4agg = False
818 - $(use_setup cairo)
819 - $(use_setup gtk3)
820 - $(use_setup qt5)
821 - $(use_setup tk)
822 - $(use_setup wxwidgets wx)
823 - EOF
824 -
825 - if use gtk3 && use cairo; then
826 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
827 - else
828 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
829 - fi
830 -}
831 -
832 -wrap_setup() {
833 - local MAKEOPTS=-j1
834 - local -x MPLSETUPCFG="${BUILD_DIR}"/setup.cfg
835 - "$@"
836 -}
837 -
838 -python_compile() {
839 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
840 -}
841 -
842 -python_compile_all() {
843 - if use doc; then
844 - cd doc || die
845 -
846 - # necessary for in-source build
847 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
848 -
849 - VARTEXFONTS="${T}"/fonts \
850 - emake SPHINXOPTS= O=-Dplot_formats=png:100 html
851 - fi
852 -}
853 -
854 -src_test() {
855 - virtx distutils-r1_src_test
856 -}
857 -
858 -python_test() {
859 - # we need to rebuild mpl against bundled freetype, otherwise
860 - # over 1000 tests will fail because of mismatched font rendering
861 - grep -v system_freetype "${BUILD_DIR}"/setup.cfg \
862 - > "${BUILD_DIR}"/test-setup.cfg || die
863 - local -x MPLSETUPCFG="${BUILD_DIR}"/test-setup.cfg
864 - ln -s "${WORKDIR}/freetype-${FT_PV}" "${BUILD_DIR}" || die
865 - distutils-r1_python_compile -j1 --build-lib="${BUILD_DIR}"/test-lib
866 - local -x PYTHONPATH=${BUILD_DIR}/test-lib:${PYTHONPATH}
867 -
868 - "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(m.test(argv=['-m', 'not network'], verbosity=2))" || die
869 -}
870 -
871 -python_install() {
872 - wrap_setup distutils-r1_python_install
873 -
874 - # mpl_toolkits namespace
875 - python_moduleinto mpl_toolkits
876 - python_domodule lib/mpl_toolkits/__init__.py
877 -}
878 -
879 -python_install_all() {
880 - use doc && local HTML_DOCS=( doc/build/html/. )
881 -
882 - distutils-r1_python_install_all
883 -
884 - if use examples; then
885 - dodoc -r examples
886 - docompress -x /usr/share/doc/${PF}/examples
887 - fi
888 -
889 - find "${D}" -name '*.pth' -delete || die
890 -}
891
892 diff --git a/dev-python/matplotlib/matplotlib-3.4.1.ebuild b/dev-python/matplotlib/matplotlib-3.4.1.ebuild
893 deleted file mode 100644
894 index a145e84f8c2..00000000000
895 --- a/dev-python/matplotlib/matplotlib-3.4.1.ebuild
896 +++ /dev/null
897 @@ -1,279 +0,0 @@
898 -# Copyright 1999-2021 Gentoo Authors
899 -# Distributed under the terms of the GNU General Public License v2
900 -
901 -EAPI=7
902 -
903 -PYTHON_COMPAT=( python3_{8..9} )
904 -PYTHON_REQ_USE='tk?,threads(+)'
905 -
906 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
907 -
908 -FT_PV=2.6.1
909 -DESCRIPTION="Pure python plotting library with matlab like syntax"
910 -HOMEPAGE="https://matplotlib.org/"
911 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
912 - test? (
913 - https://downloads.sourceforge.net/project/freetype/freetype2/${FT_PV}/freetype-${FT_PV}.tar.gz
914 - )"
915 -
916 -# Main license: matplotlib
917 -# Some modules: BSD
918 -# matplotlib/backends/qt4_editor: MIT
919 -# Fonts: BitstreamVera, OFL-1.1
920 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
921 -SLOT="0"
922 -KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~sparc ~x86"
923 -IUSE="cairo doc excel examples gtk3 latex qt5 tk webagg wxwidgets"
924 -
925 -# internal copy of pycxx highly patched
926 -# dev-python/pycxx
927 -RDEPEND="
928 - dev-python/certifi[${PYTHON_USEDEP}]
929 - >=dev-python/cycler-0.10.0-r1[${PYTHON_USEDEP}]
930 - >=dev-python/kiwisolver-1.2.0[${PYTHON_USEDEP}]
931 - >=dev-python/numpy-1.18.2[${PYTHON_USEDEP}]
932 - >=dev-python/pillow-7.1.1[jpeg,${PYTHON_USEDEP}]
933 - >=dev-python/pyparsing-2.2.1[${PYTHON_USEDEP}]
934 - >=dev-python/python-dateutil-2.7[${PYTHON_USEDEP}]
935 - >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
936 - >=dev-python/six-1.14.0[${PYTHON_USEDEP}]
937 - dev-python/versioneer[${PYTHON_USEDEP}]
938 - media-fonts/dejavu
939 - media-fonts/stix-fonts
940 - media-libs/freetype:2
941 - media-libs/libpng:0
942 - >=media-libs/qhull-2013:=
943 - cairo? (
944 - dev-python/cairocffi[${PYTHON_USEDEP}]
945 - )
946 - excel? (
947 - dev-python/xlwt[${PYTHON_USEDEP}]
948 - )
949 - gtk3? (
950 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
951 - x11-libs/gtk+:3[introspection]
952 - )
953 - latex? (
954 - virtual/latex-base
955 - app-text/dvipng
956 - app-text/ghostscript-gpl
957 - app-text/poppler[utils]
958 - dev-texlive/texlive-fontsrecommended
959 - dev-texlive/texlive-latexextra
960 - dev-texlive/texlive-xetex
961 - )
962 - qt5? (
963 - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
964 - )
965 - webagg? (
966 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
967 - )
968 - wxwidgets? (
969 - dev-python/wxpython:*[${PYTHON_USEDEP}]
970 - )
971 -"
972 -
973 -BDEPEND="
974 - ${RDEPEND}
975 - virtual/pkgconfig
976 - doc? (
977 - >=app-text/dvipng-1.15-r1
978 - >=dev-python/colorspacious-1.1.2[${PYTHON_USEDEP}]
979 - >=dev-python/ipython-1.18.2[${PYTHON_USEDEP}]
980 - >=dev-python/numpydoc-0.9.2[${PYTHON_USEDEP}]
981 - >=dev-python/scipy-1.4.1[${PYTHON_USEDEP}]
982 - >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}]
983 - >=dev-python/sphinx-gallery-0.3.1-r1[${PYTHON_USEDEP}]
984 - >=dev-python/xlwt-1.3.0-r1[${PYTHON_USEDEP}]
985 - dev-texlive/texlive-latexextra
986 - dev-texlive/texlive-fontsrecommended
987 - dev-texlive/texlive-latexrecommended
988 - >=media-gfx/graphviz-2.42.3[cairo]
989 - )
990 - test? (
991 - dev-python/flaky[${PYTHON_USEDEP}]
992 - dev-python/mock[${PYTHON_USEDEP}]
993 - dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}]
994 - >=www-servers/tornado-6.0.4[${PYTHON_USEDEP}]
995 - x11-libs/gtk+:3[introspection]
996 - )
997 -"
998 -
999 -# A few C++ source files are written to srcdir.
1000 -# Other than that, the ebuild shall be fit for out-of-source build.
1001 -DISTUTILS_IN_SOURCE_BUILD=1
1002 -
1003 -distutils_enable_tests pytest
1004 -
1005 -pkg_setup() {
1006 - unset DISPLAY # bug #278524
1007 -}
1008 -
1009 -use_supported() {
1010 - case ${1} in
1011 - wxwidgets)
1012 - [[ ${EPYTHON} == python3.[678] ]]
1013 - ;;
1014 - esac
1015 -
1016 - return 0
1017 -}
1018 -
1019 -use_setup() {
1020 - local uword="${2:-${1}}"
1021 - if use_supported "${1}" && use "${1}"; then
1022 - echo "${uword} = True"
1023 - echo "${uword}agg = True"
1024 - else
1025 - echo "${uword} = False"
1026 - echo "${uword}agg = False"
1027 - fi
1028 -}
1029 -
1030 -python_prepare_all() {
1031 -# Generates test failures, but fedora does it
1032 -# local PATCHES=(
1033 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
1034 -# "${FILESDIR}"/${P}-unbundle-agg.patch
1035 -# )
1036 -# rm -r agg24 CXX || die
1037 -# rm -r agg24 || die
1038 -
1039 -# cat > lib/${PN}/externals/six.py <<-EOF
1040 -# from __future__ import absolute_import
1041 -# from six import *
1042 -# EOF
1043 -
1044 - local PATCHES=(
1045 - "${FILESDIR}"/matplotlib-3.4.0-test.patch
1046 - "${FILESDIR}"/matplotlib-3.3.3-disable-lto.patch
1047 - "${FILESDIR}"/matplotlib-3.4.1-xelatex-test.patch
1048 - )
1049 -
1050 - # requires jupyter-nbconvert
1051 - rm lib/matplotlib/tests/test_backend_nbagg.py || die
1052 -
1053 - sed \
1054 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
1055 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
1056 - || die "sed pyparsing failed"
1057 -
1058 - sed -e 's:\(@pytest.mark.flaky\)(reruns=3):\1:' \
1059 - -i lib/matplotlib/tests/test_*.py || die
1060 -
1061 - hprefixify setupext.py
1062 -
1063 - rm -rf libqhull || die
1064 -
1065 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
1066 - mkdir "${XDG_RUNTIME_DIR}" || die
1067 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
1068 -
1069 - distutils-r1_python_prepare_all
1070 -}
1071 -
1072 -python_configure_all() {
1073 - append-flags -fno-strict-aliasing
1074 - append-cppflags -DNDEBUG # or get old trying to do triangulation
1075 - tc-export PKG_CONFIG
1076 -}
1077 -
1078 -python_configure() {
1079 - mkdir -p "${BUILD_DIR}" || die
1080 -
1081 - # create setup.cfg (see setup.cfg.template for any changes).
1082 -
1083 - # common switches.
1084 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
1085 - [directories]
1086 - basedirlist = ${EPREFIX}/usr
1087 - [provide_packages]
1088 - pytz = False
1089 - dateutil = False
1090 - [libs]
1091 - system_freetype = True
1092 - system_qhull = True
1093 - [packages]
1094 - tests = $(usex test True False)
1095 - [gui_support]
1096 - agg = True
1097 - gtk = False
1098 - gtkagg = False
1099 - macosx = False
1100 - pyside = False
1101 - pysideagg = False
1102 - qt4 = False
1103 - qt4agg = False
1104 - $(use_setup cairo)
1105 - $(use_setup gtk3)
1106 - $(use_setup qt5)
1107 - $(use_setup tk)
1108 - $(use_setup wxwidgets wx)
1109 - EOF
1110 -
1111 - if use gtk3 && use cairo; then
1112 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
1113 - else
1114 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
1115 - fi
1116 -}
1117 -
1118 -wrap_setup() {
1119 - local MAKEOPTS=-j1
1120 - local -x MPLSETUPCFG="${BUILD_DIR}"/setup.cfg
1121 - "$@"
1122 -}
1123 -
1124 -python_compile() {
1125 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
1126 -}
1127 -
1128 -python_compile_all() {
1129 - if use doc; then
1130 - cd doc || die
1131 -
1132 - # necessary for in-source build
1133 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
1134 -
1135 - VARTEXFONTS="${T}"/fonts \
1136 - emake SPHINXOPTS= O=-Dplot_formats=png:100 html
1137 - fi
1138 -}
1139 -
1140 -src_test() {
1141 - virtx distutils-r1_src_test
1142 -}
1143 -
1144 -python_test() {
1145 - # we need to rebuild mpl against bundled freetype, otherwise
1146 - # over 1000 tests will fail because of mismatched font rendering
1147 - grep -v system_freetype "${BUILD_DIR}"/setup.cfg \
1148 - > "${BUILD_DIR}"/test-setup.cfg || die
1149 - local -x MPLSETUPCFG="${BUILD_DIR}"/test-setup.cfg
1150 - ln -s "${WORKDIR}/freetype-${FT_PV}" "${BUILD_DIR}" || die
1151 - distutils-r1_python_compile -j1 --build-lib="${BUILD_DIR}"/test-lib
1152 - local -x PYTHONPATH=${BUILD_DIR}/test-lib:${PYTHONPATH}
1153 -
1154 - "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(m.test(argv=['-m', 'not network'], verbosity=2))" || die
1155 -}
1156 -
1157 -python_install() {
1158 - wrap_setup distutils-r1_python_install
1159 -
1160 - # mpl_toolkits namespace
1161 - python_moduleinto mpl_toolkits
1162 - python_domodule lib/mpl_toolkits/__init__.py
1163 -}
1164 -
1165 -python_install_all() {
1166 - use doc && local HTML_DOCS=( doc/build/html/. )
1167 -
1168 - distutils-r1_python_install_all
1169 -
1170 - if use examples; then
1171 - dodoc -r examples
1172 - docompress -x /usr/share/doc/${PF}/examples
1173 - fi
1174 -
1175 - find "${D}" -name '*.pth' -delete || die
1176 -}