Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/matplotlib/
Date: Sat, 10 Feb 2018 16:14:53
Message-Id: 1518279247.bf447e19ba0a82365c8fdc0d5244d66483cf7dc5.grozin@gentoo
1 commit: bf447e19ba0a82365c8fdc0d5244d66483cf7dc5
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 10 16:14:07 2018 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 10 16:14:07 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf447e19
7
8 dev-python/matplotlib: with USE=doc depend on scipy
9
10 Closes: https://bugs.gentoo.org/647206
11 Package-Manager: Portage-2.3.19, Repoman-2.3.6
12
13 dev-python/matplotlib/matplotlib-2.1.2-r1.ebuild | 1 +
14 dev-python/matplotlib/matplotlib-2.1.2.ebuild | 254 -----------------------
15 2 files changed, 1 insertion(+), 254 deletions(-)
16
17 diff --git a/dev-python/matplotlib/matplotlib-2.1.2-r1.ebuild b/dev-python/matplotlib/matplotlib-2.1.2-r1.ebuild
18 index b7615416dc6..4152f565087 100644
19 --- a/dev-python/matplotlib/matplotlib-2.1.2-r1.ebuild
20 +++ b/dev-python/matplotlib/matplotlib-2.1.2-r1.ebuild
21 @@ -71,6 +71,7 @@ DEPEND="${COMMON_DEPEND}
22 dev-python/ipython[${PYTHON_USEDEP}]
23 dev-python/mock[${PY2_USEDEP}]
24 dev-python/numpydoc[${PYTHON_USEDEP}]
25 + sci-libs/scipy[${PYTHON_USEDEP}]
26 dev-python/sphinx[${PYTHON_USEDEP}]
27 >=dev-python/sphinx-gallery-0.1.12[${PYTHON_USEDEP}]
28 dev-python/xlwt[${PYTHON_USEDEP}]
29
30 diff --git a/dev-python/matplotlib/matplotlib-2.1.2.ebuild b/dev-python/matplotlib/matplotlib-2.1.2.ebuild
31 deleted file mode 100644
32 index 074c4285d47..00000000000
33 --- a/dev-python/matplotlib/matplotlib-2.1.2.ebuild
34 +++ /dev/null
35 @@ -1,254 +0,0 @@
36 -# Copyright 1999-2018 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -
41 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
42 -PYTHON_REQ_USE='tk?,threads(+)'
43 -
44 -inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
45 -
46 -DESCRIPTION="Pure python plotting library with matlab like syntax"
47 -HOMEPAGE="http://matplotlib.org/"
48 -SRC_URI="https://dev.gentoo.org/~grozin/${P}.tar.bz2"
49 -
50 -SLOT="0"
51 -# Main license: matplotlib
52 -# Some modules: BSD
53 -# matplotlib/backends/qt4_editor: MIT
54 -# Fonts: BitstreamVera, OFL-1.1
55 -LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
56 -KEYWORDS="~amd64 ~arm64 ~x86"
57 -IUSE="cairo doc excel examples gtk2 gtk3 latex pyside qt5 test tk wxwidgets"
58 -
59 -PY2_FLAGS="|| ( $(python_gen_useflags python2_7) )"
60 -REQUIRED_USE="
61 - doc? ( ${PY2_FLAGS} )
62 - excel? ( ${PY2_FLAGS} )
63 - gtk2? ( ${PY2_FLAGS} )
64 - wxwidgets? ( ${PY2_FLAGS} )
65 - test? (
66 - cairo latex qt5 tk wxwidgets
67 - || ( gtk2 gtk3 )
68 - )"
69 -
70 -# #456704 -- a lot of py2-only deps
71 -PY2_USEDEP=$(python_gen_usedep python2_7)
72 -PY2_DEPEND="
73 - $(python_gen_cond_dep 'dev-python/functools32[${PYTHON_USEDEP}]' python2_7)
74 - $(python_gen_cond_dep 'dev-python/subprocess32[${PYTHON_USEDEP}]' python2_7)
75 - $(python_gen_cond_dep 'dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]' python2_7)"
76 -COMMON_DEPEND="
77 - dev-python/cycler[${PYTHON_USEDEP}]
78 - >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
79 - dev-python/python-dateutil:0[${PYTHON_USEDEP}]
80 - dev-python/pytz[${PYTHON_USEDEP}]
81 - >=dev-python/six-1.10[${PYTHON_USEDEP}]
82 - media-fonts/stix-fonts
83 - media-libs/freetype:2
84 - media-libs/libpng:0
85 - >=media-libs/qhull-2013
86 - cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
87 - gtk2? (
88 - dev-libs/glib:2=
89 - x11-libs/gdk-pixbuf
90 - x11-libs/gtk+:2
91 - dev-python/pygtk[${PY2_USEDEP}] )
92 - wxwidgets? ( >=dev-python/wxpython-2.8:*[${PY2_USEDEP}] )"
93 -
94 -# internal copy of pycxx highly patched
95 -# dev-python/pycxx
96 -
97 -DEPEND="${COMMON_DEPEND}
98 - ${PY2_DEPEND}
99 - dev-python/versioneer[${PYTHON_USEDEP}]
100 - dev-python/setuptools[${PYTHON_USEDEP}]
101 - virtual/pkgconfig
102 - doc? (
103 - app-text/dvipng
104 - dev-python/colorspacious[${PYTHON_USEDEP}]
105 - dev-python/pillow[${PYTHON_USEDEP}]
106 - dev-python/ipython[${PYTHON_USEDEP}]
107 - dev-python/mock[${PY2_USEDEP}]
108 - dev-python/numpydoc[${PYTHON_USEDEP}]
109 - dev-python/sphinx[${PYTHON_USEDEP}]
110 - dev-python/xlwt[${PYTHON_USEDEP}]
111 - dev-texlive/texlive-latexextra
112 - dev-texlive/texlive-fontsrecommended
113 - dev-texlive/texlive-latexrecommended
114 - media-gfx/graphviz[cairo]
115 - )
116 - test? (
117 - dev-python/mock[${PYTHON_USEDEP}]
118 - >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
119 - )"
120 -
121 -RDEPEND="${COMMON_DEPEND}
122 - ${PY2_DEPEND}
123 - >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
124 - excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
125 - gtk3? (
126 - dev-python/pygobject:3[${PYTHON_USEDEP}]
127 - x11-libs/gtk+:3[introspection] )
128 - latex? (
129 - virtual/latex-base
130 - app-text/ghostscript-gpl
131 - app-text/dvipng
132 - app-text/poppler[utils]
133 - dev-texlive/texlive-fontsrecommended
134 - dev-texlive/texlive-latexextra
135 - dev-texlive/texlive-xetex
136 - )
137 - pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
138 - qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )
139 - "
140 -
141 -# A few C++ source files are written to srcdir.
142 -# Other than that, the ebuild shall be fit for out-of-source build.
143 -DISTUTILS_IN_SOURCE_BUILD=1
144 -
145 -pkg_setup() {
146 - unset DISPLAY # bug #278524
147 -}
148 -
149 -use_setup() {
150 - local uword="${2:-${1}}"
151 - if use ${1}; then
152 - echo "${uword} = True"
153 - echo "${uword}agg = True"
154 - else
155 - echo "${uword} = False"
156 - echo "${uword}agg = False"
157 - fi
158 -}
159 -
160 -python_prepare_all() {
161 -# Generates test failures, but fedora does it
162 -# local PATCHES=(
163 -# "${FILESDIR}"/${P}-unbundle-pycxx.patch
164 -# "${FILESDIR}"/${P}-unbundle-agg.patch
165 -# )
166 -# rm -r agg24 CXX || die
167 -# rm -r agg24 || die
168 -
169 -# cat > lib/${PN}/externals/six.py <<-EOF
170 -# from __future__ import absolute_import
171 -# from six import *
172 -# EOF
173 -
174 - local PATCHES=( "${FILESDIR}"/${P}-doc-make.patch )
175 -
176 - sed \
177 - -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
178 - -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
179 - || die "sed pyparsing failed"
180 -
181 - hprefixify setupext.py
182 -
183 - export XDG_RUNTIME_DIR="${T}/runtime-dir"
184 - mkdir "${XDG_RUNTIME_DIR}" || die
185 - chmod 0700 "${XDG_RUNTIME_DIR}" || die
186 -
187 - distutils-r1_python_prepare_all
188 -}
189 -
190 -python_configure_all() {
191 - append-flags -fno-strict-aliasing
192 - append-cppflags -DNDEBUG # or get old trying to do triangulation
193 - tc-export PKG_CONFIG
194 -}
195 -
196 -python_configure() {
197 - mkdir -p "${BUILD_DIR}" || die
198 -
199 - # create setup.cfg (see setup.cfg.template for any changes).
200 -
201 - # common switches.
202 - cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
203 - [directories]
204 - basedirlist = ${EPREFIX}/usr
205 - [provide_packages]
206 - pytz = False
207 - dateutil = False
208 - [packages]
209 - tests = $(usex test True False)
210 - [gui_support]
211 - agg = True
212 - qt4 = False
213 - qt4agg = False
214 - $(use_setup cairo)
215 - $(use_setup gtk3)
216 - $(use_setup pyside)
217 - $(use_setup qt5)
218 - $(use_setup tk)
219 - EOF
220 -
221 - if use gtk3 && use cairo; then
222 - echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
223 - else
224 - echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
225 - fi
226 -
227 - if python_is_python3; then
228 - cat >> "${BUILD_DIR}"/setup.cfg <<- EOF || die
229 - gtk = False
230 - gtkagg = False
231 - wx = False
232 - wxagg = False
233 - EOF
234 - else
235 - cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
236 - $(use_setup gtk2 gtk)
237 - $(use_setup wxwidgets wx)
238 - EOF
239 - fi
240 -}
241 -
242 -wrap_setup() {
243 - local -x MPLSETUPCFG=${BUILD_DIR}/setup.cfg
244 - unset DISPLAY
245 - "$@"
246 -}
247 -
248 -python_compile() {
249 - wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
250 -}
251 -
252 -python_compile_all() {
253 - if use doc; then
254 - cd doc || die
255 -
256 - # necessary for in-source build
257 - local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
258 -
259 - VARTEXFONTS="${T}"/fonts \
260 - "${EPYTHON}" ./make.py --small html || die
261 - fi
262 -}
263 -
264 -python_test() {
265 - wrap_setup distutils_install_for_testing
266 -
267 - virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
268 -}
269 -
270 -python_install() {
271 - wrap_setup distutils-r1_python_install
272 -
273 - # mpl_toolkits namespace
274 - python_moduleinto mpl_toolkits
275 - python_domodule lib/mpl_toolkits/__init__.py
276 -}
277 -
278 -python_install_all() {
279 - use doc && local HTML_DOCS=( doc/build/html/. )
280 -
281 - distutils-r1_python_install_all
282 -
283 - if use examples; then
284 - dodoc -r examples
285 - docompress -x /usr/share/doc/${PF}/examples
286 - fi
287 -
288 - find "${D}" -name '*.pth' -delete || die
289 -}