1 |
commit: e099f966bfcfe82d06cf946568d6874ff37e1be4 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 26 01:13:40 2020 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 26 01:19:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e099f966 |
7 |
|
8 |
dev-python/matplotlib: bump to 3.1.2. |
9 |
|
10 |
- Unbundle qhull. |
11 |
- Depend on pyobject:3[cairo] for USE="gtk3 cairo". |
12 |
- p/arch/arm64/package.use.mask: mask USE=wxwidgets |
13 |
dev-python/wxpython does not have arm64 keyword. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/671796 |
16 |
Closes: https://bugs.gentoo.org/680176 |
17 |
Closes: https://bugs.gentoo.org/665560 |
18 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
19 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
20 |
|
21 |
dev-python/matplotlib/Manifest | 1 + |
22 |
.../matplotlib-3.1.2-no-jqueryui-download.patch | 15 ++ |
23 |
.../matplotlib/files/matplotlib-3.1.2-qhull.patch | 20 ++ |
24 |
dev-python/matplotlib/matplotlib-3.1.2.ebuild | 244 +++++++++++++++++++++ |
25 |
profiles/arch/arm64/package.use.mask | 4 + |
26 |
5 files changed, 284 insertions(+) |
27 |
|
28 |
diff --git a/dev-python/matplotlib/Manifest b/dev-python/matplotlib/Manifest |
29 |
index 5ce2a199f71..70225931856 100644 |
30 |
--- a/dev-python/matplotlib/Manifest |
31 |
+++ b/dev-python/matplotlib/Manifest |
32 |
@@ -1,2 +1,3 @@ |
33 |
DIST matplotlib-2.2.2.tar.gz 37317332 BLAKE2B 4120265263c5b1e4ab57f7c0eb7a477b4071a5f219d1d6328d6ed51d44460217c7c4da82a4b7d13c6ba9f80308406a217f2dbcfa310f3137cbe8bc56a9ef0eef SHA512 1d21ef821190f22354098f8f0db6449f237acbf3c1419ab3815ecd4e9c6922fd3f00c4a8f60858e319b55b6fb2e8fe2922c0bf8e72b204e7edff0b409cf76320 |
34 |
DIST matplotlib-2.2.4.tar.gz 36974286 BLAKE2B 9c4c69163a23ff02107ee155f72e142dcf31ba965f6a20f468b96f3f4b70b95ff6caade6b14bcbacd5b231848d2000ce6af9f113feefb41d6e186725349490d3 SHA512 968f5731b8a9a2c5575403c60d5b0a98a452b33094e520be44f4d901f892d082babc8fc1d73c519e1ff2baf756f3cb7652f4b796e166d66dfda31f7e50c58139 |
35 |
+DIST matplotlib-3.1.2.tar.gz 40909582 BLAKE2B 670907670335ca13ec01f3acf036fd502ce34abd12666b2e0d10867c6115a0fe80039326cee89099471aa6b3bbd25f1ca4aa837072dea624ee41984da9f647be SHA512 2eff3c0525d01824ed758a87f50a3f6094767b580fca1eae4e9dbc2cc972af3d0cc3ac9615e576c5685e8bfc1ec90754bc826635f4f2a919d0b26bbb686cccab |
36 |
|
37 |
diff --git a/dev-python/matplotlib/files/matplotlib-3.1.2-no-jqueryui-download.patch b/dev-python/matplotlib/files/matplotlib-3.1.2-no-jqueryui-download.patch |
38 |
new file mode 100644 |
39 |
index 00000000000..145f321039b |
40 |
--- /dev/null |
41 |
+++ b/dev-python/matplotlib/files/matplotlib-3.1.2-no-jqueryui-download.patch |
42 |
@@ -0,0 +1,15 @@ |
43 |
+Index: matplotlib-3.1.2/setup.py |
44 |
+=================================================================== |
45 |
+--- matplotlib-3.1.2.orig/setup.py |
46 |
++++ matplotlib-3.1.2/setup.py |
47 |
+@@ -125,7 +125,9 @@ cmdclass['build_ext'] = BuildExtraLibrar |
48 |
+ |
49 |
+ |
50 |
+ def _download_jquery_to(dest): |
51 |
+- if os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")): |
52 |
++ # Avoid downloading jquery ui during emerge: we already have it in |
53 |
++ # pypi's tarball. use this! |
54 |
++ if True: |
55 |
+ return |
56 |
+ |
57 |
+ # If we are installing from an sdist, use the already downloaded jquery-ui |
58 |
|
59 |
diff --git a/dev-python/matplotlib/files/matplotlib-3.1.2-qhull.patch b/dev-python/matplotlib/files/matplotlib-3.1.2-qhull.patch |
60 |
new file mode 100644 |
61 |
index 00000000000..e02e03e65ed |
62 |
--- /dev/null |
63 |
+++ b/dev-python/matplotlib/files/matplotlib-3.1.2-qhull.patch |
64 |
@@ -0,0 +1,20 @@ |
65 |
+Index: matplotlib-3.1.2/setupext.py |
66 |
+=================================================================== |
67 |
+--- matplotlib-3.1.2.orig/setupext.py |
68 |
++++ matplotlib-3.1.2/setupext.py |
69 |
+@@ -839,14 +839,7 @@ class Qhull(SetupPackage): |
70 |
+ name = "qhull" |
71 |
+ |
72 |
+ def add_flags(self, ext): |
73 |
+- # Qhull doesn't distribute pkg-config info, so we have no way of |
74 |
+- # knowing whether a system install is recent enough. Thus, always use |
75 |
+- # the vendored version. |
76 |
+- ext.include_dirs.insert(0, 'extern') |
77 |
+- ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c'))) |
78 |
+- if sysconfig.get_config_var('LIBM') == '-lm': |
79 |
+- ext.libraries.extend('m') |
80 |
+- |
81 |
++ ext.libraries.extend(['qhull']) |
82 |
+ |
83 |
+ class TTConv(SetupPackage): |
84 |
+ name = "ttconv" |
85 |
|
86 |
diff --git a/dev-python/matplotlib/matplotlib-3.1.2.ebuild b/dev-python/matplotlib/matplotlib-3.1.2.ebuild |
87 |
new file mode 100644 |
88 |
index 00000000000..db457aa8b79 |
89 |
--- /dev/null |
90 |
+++ b/dev-python/matplotlib/matplotlib-3.1.2.ebuild |
91 |
@@ -0,0 +1,244 @@ |
92 |
+# Copyright 1999-2020 Gentoo Authors |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+EAPI=7 |
96 |
+ |
97 |
+PYTHON_COMPAT=( python3_{6,7} ) |
98 |
+PYTHON_REQ_USE='tk?,threads(+)' |
99 |
+ |
100 |
+inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix |
101 |
+ |
102 |
+DESCRIPTION="Pure python plotting library with matlab like syntax" |
103 |
+HOMEPAGE="https://matplotlib.org/" |
104 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
105 |
+ |
106 |
+SLOT="0" |
107 |
+# Main license: matplotlib |
108 |
+# Some modules: BSD |
109 |
+# matplotlib/backends/qt4_editor: MIT |
110 |
+# Fonts: BitstreamVera, OFL-1.1 |
111 |
+LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1" |
112 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
113 |
+IUSE="cairo doc excel examples gtk3 latex qt5 test tk wxwidgets" |
114 |
+RESTRICT="!test? ( test )" |
115 |
+ |
116 |
+REQUIRED_USE=" |
117 |
+ test? ( |
118 |
+ cairo latex qt5 tk wxwidgets gtk3 |
119 |
+ )" |
120 |
+ |
121 |
+COMMON_DEPEND=" |
122 |
+ dev-python/cycler[${PYTHON_USEDEP}] |
123 |
+ >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}] |
124 |
+ dev-python/python-dateutil:0[${PYTHON_USEDEP}] |
125 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
126 |
+ >=dev-python/six-1.10[${PYTHON_USEDEP}] |
127 |
+ media-fonts/stix-fonts |
128 |
+ media-libs/freetype:2 |
129 |
+ media-libs/libpng:0 |
130 |
+ >=media-libs/qhull-2013 |
131 |
+ >=dev-python/kiwisolver-1.0.0[${PYTHON_USEDEP}] |
132 |
+ cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] ) |
133 |
+ wxwidgets? ( dev-python/wxpython:*[${PYTHON_USEDEP}] )" |
134 |
+ |
135 |
+# internal copy of pycxx highly patched |
136 |
+# dev-python/pycxx |
137 |
+ |
138 |
+DEPEND="${COMMON_DEPEND} |
139 |
+ dev-python/versioneer[${PYTHON_USEDEP}] |
140 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
141 |
+ virtual/pkgconfig |
142 |
+ doc? ( |
143 |
+ app-text/dvipng |
144 |
+ dev-python/colorspacious[${PYTHON_USEDEP}] |
145 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
146 |
+ dev-python/ipython[${PYTHON_USEDEP}] |
147 |
+ >=dev-python/numpydoc-0.8[${PYTHON_USEDEP}] |
148 |
+ <dev-python/numpydoc-0.9 |
149 |
+ sci-libs/scipy[${PYTHON_USEDEP}] |
150 |
+ >=dev-python/sphinx-1.3.0[${PYTHON_USEDEP}] |
151 |
+ >=dev-python/sphinx-gallery-0.3.1[${PYTHON_USEDEP}] |
152 |
+ dev-python/xlwt[${PYTHON_USEDEP}] |
153 |
+ dev-texlive/texlive-latexextra |
154 |
+ dev-texlive/texlive-fontsrecommended |
155 |
+ dev-texlive/texlive-latexrecommended |
156 |
+ media-gfx/graphviz[cairo] |
157 |
+ ) |
158 |
+ test? ( |
159 |
+ dev-python/mock[${PYTHON_USEDEP}] |
160 |
+ >=dev-python/nose-0.11.1[${PYTHON_USEDEP}] |
161 |
+ )" |
162 |
+ |
163 |
+RDEPEND="${COMMON_DEPEND} |
164 |
+ >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}] |
165 |
+ excel? ( dev-python/xlwt[${PYTHON_USEDEP}] ) |
166 |
+ gtk3? ( |
167 |
+ dev-python/pygobject:3[cairo?,${PYTHON_USEDEP}] |
168 |
+ x11-libs/gtk+:3[introspection] ) |
169 |
+ latex? ( |
170 |
+ virtual/latex-base |
171 |
+ app-text/ghostscript-gpl |
172 |
+ app-text/dvipng |
173 |
+ app-text/poppler[utils] |
174 |
+ dev-texlive/texlive-fontsrecommended |
175 |
+ dev-texlive/texlive-latexextra |
176 |
+ dev-texlive/texlive-xetex |
177 |
+ ) |
178 |
+ qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )" |
179 |
+ |
180 |
+# A few C++ source files are written to srcdir. |
181 |
+# Other than that, the ebuild shall be fit for out-of-source build. |
182 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
183 |
+ |
184 |
+pkg_setup() { |
185 |
+ unset DISPLAY # bug #278524 |
186 |
+} |
187 |
+ |
188 |
+use_setup() { |
189 |
+ local uword="${2:-${1}}" |
190 |
+ if use ${1}; then |
191 |
+ echo "${uword} = True" |
192 |
+ echo "${uword}agg = True" |
193 |
+ else |
194 |
+ echo "${uword} = False" |
195 |
+ echo "${uword}agg = False" |
196 |
+ fi |
197 |
+} |
198 |
+ |
199 |
+python_prepare_all() { |
200 |
+# Generates test failures, but fedora does it |
201 |
+# local PATCHES=( |
202 |
+# "${FILESDIR}"/${P}-unbundle-pycxx.patch |
203 |
+# "${FILESDIR}"/${P}-unbundle-agg.patch |
204 |
+# ) |
205 |
+# rm -r agg24 CXX || die |
206 |
+# rm -r agg24 || die |
207 |
+ |
208 |
+# cat > lib/${PN}/externals/six.py <<-EOF |
209 |
+# from __future__ import absolute_import |
210 |
+# from six import * |
211 |
+# EOF |
212 |
+ |
213 |
+ local PATCHES=( |
214 |
+ "${FILESDIR}"/${PN}-3.1.2-no-jqueryui-download.patch |
215 |
+ "${FILESDIR}"/${PN}-3.1.2-qhull.patch |
216 |
+ ) |
217 |
+ |
218 |
+ sed \ |
219 |
+ -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \ |
220 |
+ -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \ |
221 |
+ || die "sed pyparsing failed" |
222 |
+ |
223 |
+ hprefixify setupext.py |
224 |
+ |
225 |
+ rm -rf libqhull || die |
226 |
+ |
227 |
+ export XDG_RUNTIME_DIR="${T}/runtime-dir" |
228 |
+ mkdir "${XDG_RUNTIME_DIR}" || die |
229 |
+ chmod 0700 "${XDG_RUNTIME_DIR}" || die |
230 |
+ |
231 |
+ distutils-r1_python_prepare_all |
232 |
+} |
233 |
+ |
234 |
+python_configure_all() { |
235 |
+ append-flags -fno-strict-aliasing |
236 |
+ append-cppflags -DNDEBUG # or get old trying to do triangulation |
237 |
+ tc-export PKG_CONFIG |
238 |
+} |
239 |
+ |
240 |
+python_configure() { |
241 |
+ mkdir -p "${BUILD_DIR}" || die |
242 |
+ |
243 |
+ # create setup.cfg (see setup.cfg.template for any changes). |
244 |
+ |
245 |
+ # common switches. |
246 |
+ cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die |
247 |
+ [directories] |
248 |
+ basedirlist = ${EPREFIX}/usr |
249 |
+ [provide_packages] |
250 |
+ pytz = False |
251 |
+ dateutil = False |
252 |
+ [packages] |
253 |
+ tests = $(usex test True False) |
254 |
+ [gui_support] |
255 |
+ agg = True |
256 |
+ pyside = False |
257 |
+ pysideagg = False |
258 |
+ qt4 = False |
259 |
+ qt4agg = False |
260 |
+ $(use_setup cairo) |
261 |
+ $(use_setup gtk3) |
262 |
+ $(use_setup qt5) |
263 |
+ $(use_setup tk) |
264 |
+ EOF |
265 |
+ |
266 |
+ if use gtk3 && use cairo; then |
267 |
+ echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die |
268 |
+ else |
269 |
+ echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die |
270 |
+ fi |
271 |
+ |
272 |
+ if python_is_python3; then |
273 |
+ cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die |
274 |
+ gtk = False |
275 |
+ gtkagg = False |
276 |
+ wx = False |
277 |
+ wxagg = False |
278 |
+ EOF |
279 |
+ else |
280 |
+ cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die |
281 |
+ $(use_setup gtk2 gtk) |
282 |
+ $(use_setup wxwidgets wx) |
283 |
+ EOF |
284 |
+ fi |
285 |
+} |
286 |
+ |
287 |
+wrap_setup() { |
288 |
+ local MAKEOPTS=-j1 |
289 |
+ local -x MPLSETUPCFG="${BUILD_DIR}"/setup.cfg |
290 |
+ unset DISPLAY |
291 |
+ "$@" |
292 |
+} |
293 |
+ |
294 |
+python_compile() { |
295 |
+ wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib |
296 |
+} |
297 |
+ |
298 |
+python_compile_all() { |
299 |
+ if use doc; then |
300 |
+ cd doc || die |
301 |
+ |
302 |
+ # necessary for in-source build |
303 |
+ local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH} |
304 |
+ |
305 |
+ VARTEXFONTS="${T}"/fonts \ |
306 |
+ emake SPHINXOPTS= O=-Dplot_formats=png:100 html |
307 |
+ fi |
308 |
+} |
309 |
+ |
310 |
+python_test() { |
311 |
+ wrap_setup distutils_install_for_testing |
312 |
+ |
313 |
+ virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)" |
314 |
+} |
315 |
+ |
316 |
+python_install() { |
317 |
+ wrap_setup distutils-r1_python_install |
318 |
+ |
319 |
+ # mpl_toolkits namespace |
320 |
+ python_moduleinto mpl_toolkits |
321 |
+ python_domodule lib/mpl_toolkits/__init__.py |
322 |
+} |
323 |
+ |
324 |
+python_install_all() { |
325 |
+ use doc && local HTML_DOCS=( doc/build/html/. ) |
326 |
+ |
327 |
+ distutils-r1_python_install_all |
328 |
+ |
329 |
+ if use examples; then |
330 |
+ dodoc -r examples |
331 |
+ docompress -x /usr/share/doc/${PF}/examples |
332 |
+ fi |
333 |
+ |
334 |
+ find "${D}" -name '*.pth' -delete || die |
335 |
+} |
336 |
|
337 |
diff --git a/profiles/arch/arm64/package.use.mask b/profiles/arch/arm64/package.use.mask |
338 |
index a721782b857..035197f40ac 100644 |
339 |
--- a/profiles/arch/arm64/package.use.mask |
340 |
+++ b/profiles/arch/arm64/package.use.mask |
341 |
@@ -1,6 +1,10 @@ |
342 |
# Copyright 1999-2020 Gentoo Authors |
343 |
# Distributed under the terms of the GNU General Public License v2 |
344 |
|
345 |
+# Benda Xu <heroxbd@g.o> (2020-01-26) |
346 |
+# Unkeyworded dep. |
347 |
+dev-python/matplotlib wxwidgets |
348 |
+ |
349 |
# Michał Górny <mgorny@g.o> (2020-01-11) |
350 |
# Unkeyworded dep. |
351 |
kde-apps/cantor julia |