Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/matplotlib-python2/
Date: Fri, 01 May 2020 17:31:59
Message-Id: 1588354295.3bbd3cdb0c55c43b0537b64fb366790b526d087c.pacho@gentoo
1 commit: 3bbd3cdb0c55c43b0537b64fb366790b526d087c
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 1 17:31:35 2020 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Fri May 1 17:31:35 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bbd3cdb
7
8 dev-python/matplotlib-python2: Bump to 2.2.5
9
10 Package-Manager: Portage-2.3.96, Repoman-2.3.22
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 dev-python/matplotlib-python2/Manifest | 1 +
14 .../matplotlib-python2-2.2.5.ebuild | 215 +++++++++++++++++++++
15 2 files changed, 216 insertions(+)
16
17 diff --git a/dev-python/matplotlib-python2/Manifest b/dev-python/matplotlib-python2/Manifest
18 index 0f0b9048ffb..913bdedd409 100644
19 --- a/dev-python/matplotlib-python2/Manifest
20 +++ b/dev-python/matplotlib-python2/Manifest
21 @@ -1 +1,2 @@
22 DIST matplotlib-2.2.4.tar.gz 36974286 BLAKE2B 9c4c69163a23ff02107ee155f72e142dcf31ba965f6a20f468b96f3f4b70b95ff6caade6b14bcbacd5b231848d2000ce6af9f113feefb41d6e186725349490d3 SHA512 968f5731b8a9a2c5575403c60d5b0a98a452b33094e520be44f4d901f892d082babc8fc1d73c519e1ff2baf756f3cb7652f4b796e166d66dfda31f7e50c58139
23 +DIST matplotlib-2.2.5.tar.gz 36678633 BLAKE2B fb3084a2d34a920413c44a23a956ffdcf7a31d521e2d1df50a68c9f17882cb87deebb403ec47154284593b39df24dad72e6352e1427091f795058db11f1d3a1b SHA512 f4771dca4b3c936e0d47f42630759207ccfe11586b3efadb401144b014a600914a6521af4fbe060fa80fd74132c92f1d3b37cac4fea9999ca90300c1dec8391b
24
25 diff --git a/dev-python/matplotlib-python2/matplotlib-python2-2.2.5.ebuild b/dev-python/matplotlib-python2/matplotlib-python2-2.2.5.ebuild
26 new file mode 100644
27 index 00000000000..0e57cbe0d8c
28 --- /dev/null
29 +++ b/dev-python/matplotlib-python2/matplotlib-python2-2.2.5.ebuild
30 @@ -0,0 +1,215 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +PYTHON_COMPAT=( python2_7 )
37 +PYTHON_REQ_USE='tk?,threads(+)'
38 +
39 +inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
40 +
41 +MY_PN=${PN/-python2}
42 +MY_P=${MY_PN}-${PV}
43 +
44 +DESCRIPTION="Pure python plotting library with matlab like syntax (py2 version)"
45 +HOMEPAGE="https://matplotlib.org/"
46 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
47 +S=${WORKDIR}/${MY_P}
48 +
49 +SLOT="0"
50 +# Main license: matplotlib
51 +# Some modules: BSD
52 +# matplotlib/backends/qt4_editor: MIT
53 +# Fonts: BitstreamVera, OFL-1.1
54 +LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
55 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
56 +IUSE="cairo excel gtk2 gtk3 latex qt5 test tk wxwidgets"
57 +RESTRICT="!test? ( test )"
58 +
59 +REQUIRED_USE="
60 + test? (
61 + cairo latex qt5 tk wxwidgets
62 + || ( gtk2 gtk3 )
63 + )"
64 +
65 +# #456704 -- a lot of py2-only deps
66 +COMMON_DEPEND="
67 + dev-python/functools32[${PYTHON_USEDEP}]
68 + dev-python/subprocess32[${PYTHON_USEDEP}]
69 + dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]
70 + dev-python/cycler[${PYTHON_USEDEP}]
71 + || (
72 + >=dev-python/numpy-python2-1.7.1[${PYTHON_USEDEP}]
73 + >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
74 + )
75 + dev-python/python-dateutil:0[${PYTHON_USEDEP}]
76 + dev-python/pytz[${PYTHON_USEDEP}]
77 + >=dev-python/six-1.10[${PYTHON_USEDEP}]
78 + media-fonts/stix-fonts
79 + media-libs/freetype:2
80 + media-libs/libpng:0
81 + >=media-libs/qhull-2013
82 + >=dev-python/kiwisolver-1.0.0[${PYTHON_USEDEP}]
83 + cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
84 + gtk2? (
85 + dev-libs/glib:2=
86 + x11-libs/gdk-pixbuf
87 + x11-libs/gtk+:2
88 + dev-python/pygtk[${PYTHON_USEDEP}] )
89 + wxwidgets? ( >=dev-python/wxpython-2.8:*[${PYTHON_USEDEP}] )"
90 +
91 +# internal copy of pycxx highly patched
92 +# dev-python/pycxx
93 +
94 +DEPEND="${COMMON_DEPEND}
95 + dev-python/versioneer[${PYTHON_USEDEP}]
96 + dev-python/setuptools[${PYTHON_USEDEP}]
97 + virtual/pkgconfig
98 + test? (
99 + dev-python/mock[${PYTHON_USEDEP}]
100 + >=dev-python/nose-0.11.1[${PYTHON_USEDEP}]
101 + )"
102 +
103 +RDEPEND="${COMMON_DEPEND}
104 + !<dev-python/matplotlib-3
105 + >=dev-python/pyparsing-1.5.6[${PYTHON_USEDEP}]
106 + excel? ( dev-python/xlwt[${PYTHON_USEDEP}] )
107 + gtk3? (
108 + dev-python/pygobject:3[${PYTHON_USEDEP}]
109 + x11-libs/gtk+:3[introspection] )
110 + latex? (
111 + virtual/latex-base
112 + app-text/ghostscript-gpl
113 + app-text/dvipng
114 + app-text/poppler[utils]
115 + dev-texlive/texlive-fontsrecommended
116 + dev-texlive/texlive-latexextra
117 + dev-texlive/texlive-xetex
118 + )
119 + qt5? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )"
120 +
121 +# A few C++ source files are written to srcdir.
122 +# Other than that, the ebuild shall be fit for out-of-source build.
123 +DISTUTILS_IN_SOURCE_BUILD=1
124 +
125 +pkg_setup() {
126 + unset DISPLAY # bug #278524
127 +}
128 +
129 +use_setup() {
130 + local uword="${2:-${1}}"
131 + if use ${1}; then
132 + echo "${uword} = True"
133 + echo "${uword}agg = True"
134 + else
135 + echo "${uword} = False"
136 + echo "${uword}agg = False"
137 + fi
138 +}
139 +
140 +python_prepare_all() {
141 +# Generates test failures, but fedora does it
142 +# local PATCHES=(
143 +# "${FILESDIR}"/${P}-unbundle-pycxx.patch
144 +# "${FILESDIR}"/${P}-unbundle-agg.patch
145 +# )
146 +# rm -r agg24 CXX || die
147 +# rm -r agg24 || die
148 +
149 +# cat > lib/${PN}/externals/six.py <<-EOF
150 +# from __future__ import absolute_import
151 +# from six import *
152 +# EOF
153 +
154 + local PATCHES=(
155 + "${FILESDIR}"/${MY_PN}-2.2.4-doc-fix.patch
156 + )
157 +
158 + sed \
159 + -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
160 + -i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
161 + || die "sed pyparsing failed"
162 +
163 + hprefixify setupext.py
164 +
165 + export XDG_RUNTIME_DIR="${T}/runtime-dir"
166 + mkdir "${XDG_RUNTIME_DIR}" || die
167 + chmod 0700 "${XDG_RUNTIME_DIR}" || die
168 +
169 + distutils-r1_python_prepare_all
170 +}
171 +
172 +python_configure_all() {
173 + append-flags -fno-strict-aliasing
174 + append-cppflags -DNDEBUG # or get old trying to do triangulation
175 + tc-export PKG_CONFIG
176 +}
177 +
178 +python_configure() {
179 + mkdir -p "${BUILD_DIR}" || die
180 +
181 + # create setup.cfg (see setup.cfg.template for any changes).
182 +
183 + # common switches.
184 + cat > "${BUILD_DIR}"/setup.cfg <<- EOF || die
185 + [directories]
186 + basedirlist = ${EPREFIX}/usr
187 + [provide_packages]
188 + pytz = False
189 + dateutil = False
190 + [packages]
191 + tests = $(usex test True False)
192 + [gui_support]
193 + agg = True
194 + pyside = False
195 + pysideagg = False
196 + qt4 = False
197 + qt4agg = False
198 + $(use_setup cairo)
199 + $(use_setup gtk3)
200 + $(use_setup qt5)
201 + $(use_setup tk)
202 + EOF
203 +
204 + if use gtk3 && use cairo; then
205 + echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
206 + else
207 + echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
208 + fi
209 +
210 + cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
211 + $(use_setup gtk2 gtk)
212 + $(use_setup wxwidgets wx)
213 + EOF
214 +}
215 +
216 +wrap_setup() {
217 + local MAKEOPTS=-j1
218 + local -x MPLSETUPCFG="${BUILD_DIR}"/setup.cfg
219 + unset DISPLAY
220 + "$@"
221 +}
222 +
223 +python_compile() {
224 + wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/lib
225 +}
226 +
227 +python_test() {
228 + wrap_setup distutils_install_for_testing
229 +
230 + virtx "${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)"
231 +}
232 +
233 +python_install() {
234 + wrap_setup distutils-r1_python_install
235 +
236 + # mpl_toolkits namespace
237 + python_moduleinto mpl_toolkits
238 + python_domodule lib/mpl_toolkits/__init__.py
239 +}
240 +
241 +python_install_all() {
242 + distutils-r1_python_install_all
243 +
244 + find "${D}" -name '*.pth' -delete || die
245 +}