1 |
commit: 3017cf5138cdd90bda307ad0e820e5890350738a |
2 |
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 2 15:10:35 2019 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 2 15:10:35 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3017cf51 |
7 |
|
8 |
dev-python/matplotlib: bump to 2.2.4 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/684798 |
11 |
Closes: https://bugs.gentoo.org/656262 |
12 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
14 |
|
15 |
dev-python/matplotlib/Manifest | 1 + |
16 |
.../files/matplotlib-2.2.4-doc-fix.patch | 18 ++ |
17 |
.../matplotlib-2.2.4-no-jqueryui-download.patch | 18 ++ |
18 |
dev-python/matplotlib/matplotlib-2.2.4.ebuild | 258 +++++++++++++++++++++ |
19 |
4 files changed, 295 insertions(+) |
20 |
|
21 |
diff --git a/dev-python/matplotlib/Manifest b/dev-python/matplotlib/Manifest |
22 |
index edf2d8bbaa2..5ce2a199f71 100644 |
23 |
--- a/dev-python/matplotlib/Manifest |
24 |
+++ b/dev-python/matplotlib/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST matplotlib-2.2.2.tar.gz 37317332 BLAKE2B 4120265263c5b1e4ab57f7c0eb7a477b4071a5f219d1d6328d6ed51d44460217c7c4da82a4b7d13c6ba9f80308406a217f2dbcfa310f3137cbe8bc56a9ef0eef SHA512 1d21ef821190f22354098f8f0db6449f237acbf3c1419ab3815ecd4e9c6922fd3f00c4a8f60858e319b55b6fb2e8fe2922c0bf8e72b204e7edff0b409cf76320 |
27 |
+DIST matplotlib-2.2.4.tar.gz 36974286 BLAKE2B 9c4c69163a23ff02107ee155f72e142dcf31ba965f6a20f468b96f3f4b70b95ff6caade6b14bcbacd5b231848d2000ce6af9f113feefb41d6e186725349490d3 SHA512 968f5731b8a9a2c5575403c60d5b0a98a452b33094e520be44f4d901f892d082babc8fc1d73c519e1ff2baf756f3cb7652f4b796e166d66dfda31f7e50c58139 |
28 |
|
29 |
diff --git a/dev-python/matplotlib/files/matplotlib-2.2.4-doc-fix.patch b/dev-python/matplotlib/files/matplotlib-2.2.4-doc-fix.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..b6a01b097a6 |
32 |
--- /dev/null |
33 |
+++ b/dev-python/matplotlib/files/matplotlib-2.2.4-doc-fix.patch |
34 |
@@ -0,0 +1,18 @@ |
35 |
+diff --git a/doc/conf.py b/doc/conf.py |
36 |
+index 017ce210e..5a397082b 100644 |
37 |
+--- a/doc/conf.py |
38 |
++++ b/doc/conf.py |
39 |
+@@ -170,10 +170,10 @@ source_encoding = "utf-8" |
40 |
+ master_doc = 'contents' |
41 |
+ |
42 |
+ # General substitutions. |
43 |
+-from matplotlib.compat.subprocess import check_output |
44 |
+-SHA = check_output(['git', 'describe', '--dirty']).decode('utf-8').strip() |
45 |
++#from matplotlib.compat.subprocess import check_output |
46 |
++#SHA = check_output(['git', 'describe', '--dirty']).decode('utf-8').strip() |
47 |
+ |
48 |
+-html_context = {'sha': SHA} |
49 |
++#html_context = {'sha': SHA} |
50 |
+ |
51 |
+ project = 'Matplotlib' |
52 |
+ copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, ' |
53 |
|
54 |
diff --git a/dev-python/matplotlib/files/matplotlib-2.2.4-no-jqueryui-download.patch b/dev-python/matplotlib/files/matplotlib-2.2.4-no-jqueryui-download.patch |
55 |
new file mode 100644 |
56 |
index 00000000000..9d13adb8ab5 |
57 |
--- /dev/null |
58 |
+++ b/dev-python/matplotlib/files/matplotlib-2.2.4-no-jqueryui-download.patch |
59 |
@@ -0,0 +1,18 @@ |
60 |
+diff --git a/setup.py b/setup.py |
61 |
+index 41037e95d..6a438fa99 100644 |
62 |
+--- a/setup.py |
63 |
++++ b/setup.py |
64 |
+@@ -178,9 +178,10 @@ class sdist_with_jquery(_orgin_sdist): |
65 |
+ class install_lib_with_jquery(InstallLibCommand): |
66 |
+ def run(self): |
67 |
+ InstallLibCommand.run(self) |
68 |
+- _download_jquery_to( |
69 |
+- os.path.join(self.install_dir, "matplotlib/backends/web_backend/")) |
70 |
+- |
71 |
++ # Avoid downloading jquery ui during emerge: we already have it in |
72 |
++ # pypi's tarball. use this! |
73 |
++ name = "matplotlib/backends/web_backend/jquery-ui-1.12.1" |
74 |
++ os.rename(os.path.join('lib', name), os.path.join(self.install_dir, name)) |
75 |
+ |
76 |
+ class develop_with_jquery(DevelopCommand): |
77 |
+ def run(self): |
78 |
|
79 |
diff --git a/dev-python/matplotlib/matplotlib-2.2.4.ebuild b/dev-python/matplotlib/matplotlib-2.2.4.ebuild |
80 |
new file mode 100644 |
81 |
index 00000000000..8db934dba89 |
82 |
--- /dev/null |
83 |
+++ b/dev-python/matplotlib/matplotlib-2.2.4.ebuild |
84 |
@@ -0,0 +1,258 @@ |
85 |
+# Copyright 1999-2019 Gentoo Authors |
86 |
+# Distributed under the terms of the GNU General Public License v2 |
87 |
+ |
88 |
+EAPI=6 |
89 |
+ |
90 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) |
91 |
+PYTHON_REQ_USE='tk?,threads(+)' |
92 |
+ |
93 |
+inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix |
94 |
+ |
95 |
+DESCRIPTION="Pure python plotting library with matlab like syntax" |
96 |
+HOMEPAGE="https://matplotlib.org/" |
97 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
98 |
+ |
99 |
+SLOT="0" |
100 |
+# Main license: matplotlib |
101 |
+# Some modules: BSD |
102 |
+# matplotlib/backends/qt4_editor: MIT |
103 |
+# Fonts: BitstreamVera, OFL-1.1 |
104 |
+LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1" |
105 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
106 |
+IUSE="cairo doc excel examples gtk2 gtk3 latex qt5 test tk wxwidgets" |
107 |
+ |
108 |
+PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )" |
109 |
+REQUIRED_USE=" |
110 |
+ gtk2? ( ${PY2_FLAGS} ) |
111 |
+ wxwidgets? ( ${PY2_FLAGS} ) |
112 |
+ test? ( |
113 |
+ cairo latex qt5 tk wxwidgets |
114 |
+ || ( gtk2 gtk3 ) |
115 |
+ )" |
116 |
+ |
117 |
+# #456704 -- a lot of py2-only deps |
118 |
+PY2_USEDEP=$(python_gen_usedep python2_7) |
119 |
+PY2_DEPEND=" |
120 |
+ $(python_gen_cond_dep 'dev-python/functools32[${PYTHON_USEDEP}]' python2_7) |
121 |
+ $(python_gen_cond_dep 'dev-python/subprocess32[${PYTHON_USEDEP}]' python2_7) |
122 |
+ $(python_gen_cond_dep 'dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]' python2_7)" |
123 |
+COMMON_DEPEND=" |
124 |
+ dev-python/cycler[${PYTHON_USEDEP}] |
125 |
+ >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}] |
126 |
+ dev-python/python-dateutil:0[${PYTHON_USEDEP}] |
127 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
128 |
+ >=dev-python/six-1.10[${PYTHON_USEDEP}] |
129 |
+ media-fonts/stix-fonts |
130 |
+ media-libs/freetype:2 |
131 |
+ media-libs/libpng:0 |
132 |
+ >=media-libs/qhull-2013 |
133 |
+ >=dev-python/kiwisolver-1.0.0[${PYTHON_USEDEP}] |
134 |
+ cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] ) |
135 |
+ gtk2? ( |
136 |
+ dev-libs/glib:2= |
137 |
+ x11-libs/gdk-pixbuf |
138 |
+ x11-libs/gtk+:2 |
139 |
+ dev-python/pygtk[${PY2_USEDEP}] ) |
140 |
+ wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )" |
141 |
+ |
142 |
+# internal copy of pycxx highly patched |
143 |
+# dev-python/pycxx |
144 |
+ |
145 |
+DEPEND="${COMMON_DEPEND} |
146 |
+ ${PY2_DEPEND} |
147 |
+ dev-python/versioneer[${PYTHON_USEDEP}] |
148 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
149 |
+ virtual/pkgconfig |
150 |
+ doc? ( |
151 |
+ app-text/dvipng |
152 |
+ dev-python/colorspacious[${PYTHON_USEDEP}] |
153 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
154 |
+ dev-python/ipython[${PYTHON_USEDEP}] |
155 |
+ dev-python/mock[${PY2_USEDEP}] |
156 |
+ >=dev-python/numpydoc-0.8[${PYTHON_USEDEP}] |
157 |
+ <dev-python/numpydoc-0.9 |
158 |
+ sci-libs/scipy[${PYTHON_USEDEP}] |
159 |
+ >=dev-python/sphinx-1.3.0[${PYTHON_USEDEP}] |
160 |
+ >=dev-python/sphinx-gallery-0.3.1[${PYTHON_USEDEP}] |
161 |
+ dev-python/xlwt[${PYTHON_USEDEP}] |
162 |
+ dev-texlive/texlive-latexextra |
163 |
+ dev-texlive/texlive-fontsrecommended |
164 |
+ dev-texlive/texlive-latexrecommended |
165 |
+ media-gfx/graphviz[cairo] |
166 |
+ ) |
167 |
+ test? ( |
168 |
+ dev-python/mock[${PYTHON_USEDEP}] |
169 |
+ >=dev-python/nose-0.11.1[${PYTHON_USEDEP}] |
170 |
+ )" |
171 |
+ |
172 |
+RDEPEND="${COMMON_DEPEND} |
173 |
+ ${PY2_DEPEND} |
174 |
+ >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}] |
175 |
+ excel? ( dev-python/xlwt[${PYTHON_USEDEP}] ) |
176 |
+ gtk3? ( |
177 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
178 |
+ x11-libs/gtk+:3[introspection] ) |
179 |
+ latex? ( |
180 |
+ virtual/latex-base |
181 |
+ app-text/ghostscript-gpl |
182 |
+ app-text/dvipng |
183 |
+ app-text/poppler[utils] |
184 |
+ dev-texlive/texlive-fontsrecommended |
185 |
+ dev-texlive/texlive-latexextra |
186 |
+ dev-texlive/texlive-xetex |
187 |
+ ) |
188 |
+ qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )" |
189 |
+ |
190 |
+# A few C++ source files are written to srcdir. |
191 |
+# Other than that, the ebuild shall be fit for out-of-source build. |
192 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
193 |
+ |
194 |
+pkg_setup() { |
195 |
+ unset DISPLAY # bug #278524 |
196 |
+} |
197 |
+ |
198 |
+use_setup() { |
199 |
+ local uword="${2:-${1}}" |
200 |
+ if use ${1}; then |
201 |
+ echo "${uword} = True" |
202 |
+ echo "${uword}agg = True" |
203 |
+ else |
204 |
+ echo "${uword} = False" |
205 |
+ echo "${uword}agg = False" |
206 |
+ fi |
207 |
+} |
208 |
+ |
209 |
+python_prepare_all() { |
210 |
+# Generates test failures, but fedora does it |
211 |
+# local PATCHES=( |
212 |
+# "${FILESDIR}"/${P}-unbundle-pycxx.patch |
213 |
+# "${FILESDIR}"/${P}-unbundle-agg.patch |
214 |
+# ) |
215 |
+# rm -r agg24 CXX || die |
216 |
+# rm -r agg24 || die |
217 |
+ |
218 |
+# cat > lib/${PN}/externals/six.py <<-EOF |
219 |
+# from __future__ import absolute_import |
220 |
+# from six import * |
221 |
+# EOF |
222 |
+ |
223 |
+ local PATCHES=( |
224 |
+ "${FILESDIR}"/${PN}-2.2.4-doc-fix.patch |
225 |
+ "${FILESDIR}"/${PN}-2.2.4-no-jqueryui-download.patch |
226 |
+ ) |
227 |
+ |
228 |
+ sed \ |
229 |
+ -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \ |
230 |
+ -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \ |
231 |
+ || die "sed pyparsing failed" |
232 |
+ |
233 |
+ hprefixify setupext.py |
234 |
+ |
235 |
+ export XDG_RUNTIME_DIR="${T}/runtime-dir" |
236 |
+ mkdir "${XDG_RUNTIME_DIR}" || die |
237 |
+ chmod 0700 "${XDG_RUNTIME_DIR}" || die |
238 |
+ |
239 |
+ distutils-r1_python_prepare_all |
240 |
+} |
241 |
+ |
242 |
+python_configure_all() { |
243 |
+ append-flags -fno-strict-aliasing |
244 |
+ append-cppflags -DNDEBUG # or get old trying to do triangulation |
245 |
+ tc-export PKG_CONFIG |
246 |
+} |
247 |
+ |
248 |
+python_configure() { |
249 |
+ mkdir -p "${BUILD_DIR}" || die |
250 |
+ |
251 |
+ # create setup.cfg (see setup.cfg.template for any changes). |
252 |
+ |
253 |
+ # common switches. |
254 |
+ cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die |
255 |
+ [directories] |
256 |
+ basedirlist = ${EPREFIX}/usr |
257 |
+ [provide_packages] |
258 |
+ pytz = False |
259 |
+ dateutil = False |
260 |
+ [packages] |
261 |
+ tests = $(usex test True False) |
262 |
+ [gui_support] |
263 |
+ agg = True |
264 |
+ pyside = False |
265 |
+ pysideagg = False |
266 |
+ qt4 = False |
267 |
+ qt4agg = False |
268 |
+ $(use_setup cairo) |
269 |
+ $(use_setup gtk3) |
270 |
+ $(use_setup qt5) |
271 |
+ $(use_setup tk) |
272 |
+ EOF |
273 |
+ |
274 |
+ if use gtk3 && use cairo; then |
275 |
+ echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die |
276 |
+ else |
277 |
+ echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die |
278 |
+ fi |
279 |
+ |
280 |
+ if python_is_python3; then |
281 |
+ cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die |
282 |
+ gtk = False |
283 |
+ gtkagg = False |
284 |
+ wx = False |
285 |
+ wxagg = False |
286 |
+ EOF |
287 |
+ else |
288 |
+ cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die |
289 |
+ $(use_setup gtk2 gtk) |
290 |
+ $(use_setup wxwidgets wx) |
291 |
+ EOF |
292 |
+ fi |
293 |
+} |
294 |
+ |
295 |
+wrap_setup() { |
296 |
+ local -x MPLSETUPCFG=${BUILD_DIR}/setup.cfg |
297 |
+ unset DISPLAY |
298 |
+ "$@" |
299 |
+} |
300 |
+ |
301 |
+python_compile() { |
302 |
+ wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib |
303 |
+} |
304 |
+ |
305 |
+python_compile_all() { |
306 |
+ if use doc; then |
307 |
+ cd doc || die |
308 |
+ |
309 |
+ # necessary for in-source build |
310 |
+ local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH} |
311 |
+ |
312 |
+ VARTEXFONTS="${T}"/fonts \ |
313 |
+ emake SPHINXOPTS= O=-Dplot_formats=png:100 html |
314 |
+ fi |
315 |
+} |
316 |
+ |
317 |
+python_test() { |
318 |
+ wrap_setup distutils_install_for_testing |
319 |
+ |
320 |
+ virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)" |
321 |
+} |
322 |
+ |
323 |
+python_install() { |
324 |
+ wrap_setup distutils-r1_python_install |
325 |
+ |
326 |
+ # mpl_toolkits namespace |
327 |
+ python_moduleinto mpl_toolkits |
328 |
+ python_domodule lib/mpl_toolkits/__init__.py |
329 |
+} |
330 |
+ |
331 |
+python_install_all() { |
332 |
+ use doc && local HTML_DOCS=( doc/build/html/. ) |
333 |
+ |
334 |
+ distutils-r1_python_install_all |
335 |
+ |
336 |
+ if use examples; then |
337 |
+ dodoc -r examples |
338 |
+ docompress -x /usr/share/doc/${PF}/examples |
339 |
+ fi |
340 |
+ |
341 |
+ find "${D}" -name '*.pth' -delete || die |
342 |
+} |