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/pygal/
Date: Sat, 26 Feb 2022 08:34:57
Message-Id: 1645864483.0e09231c468f2e0252dcfe3ee7bd0607c15a9ced.mgorny@gentoo
1 commit: 0e09231c468f2e0252dcfe3ee7bd0607c15a9ced
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 26 08:22:03 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 26 08:34:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e09231c
7
8 dev-python/pygal: Migrate to PEP517 build
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pygal/pygal-3.0.0-r2.ebuild | 44 ++++++++++++++++++++++++++++++++++
13 1 file changed, 44 insertions(+)
14
15 diff --git a/dev-python/pygal/pygal-3.0.0-r2.ebuild b/dev-python/pygal/pygal-3.0.0-r2.ebuild
16 new file mode 100644
17 index 000000000000..59615d98fba6
18 --- /dev/null
19 +++ b/dev-python/pygal/pygal-3.0.0-r2.ebuild
20 @@ -0,0 +1,44 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +DISTUTILS_USE_PEP517=setuptools
27 +PYTHON_COMPAT=( python3_{8..10} )
28 +PYTHON_REQ_USE="xml(+)"
29 +
30 +inherit distutils-r1 optfeature
31 +
32 +DESCRIPTION="A python SVG charts generator"
33 +HOMEPAGE="https://github.com/Kozea/pygal/"
34 +SRC_URI="https://github.com/Kozea/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
35 +
36 +LICENSE="LGPL-3+"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~x86"
39 +
40 +BDEPEND="
41 + test? (
42 + dev-python/lxml[${PYTHON_USEDEP}]
43 + dev-python/pyquery[${PYTHON_USEDEP}]
44 + media-gfx/cairosvg[${PYTHON_USEDEP}]
45 + )
46 +"
47 +
48 +# CHANGELOG is a symlink to docs/changelog.rst
49 +DOCS=( docs/changelog.rst README.md )
50 +
51 +distutils_enable_sphinx docs
52 +distutils_enable_tests pytest
53 +
54 +python_prepare_all() {
55 + # Not actually required unless we want to do setup.py test
56 + # https://github.com/Kozea/pygal/issues/430
57 + sed -i -e "/setup_requires/d" setup.py || die
58 + distutils-r1_python_prepare_all
59 +}
60 +
61 +pkg_postinst() {
62 + optfeature "improving rendering speed" "dev-python/lxml"
63 + optfeature "png rendering" "dev-python/cairosvg"
64 +}