diff options
author | Louis Sautier <sautier.louis@gmail.com> | 2018-06-17 19:57:34 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2018-06-17 22:24:52 +0200 |
commit | 44c23f0ca11a9ccb952e95b526a0233200884121 (patch) | |
tree | 8eebc2e4f041929f365ef20f5554abbfca1bdfd1 | |
parent | dev-python/pygal: add GitHub and bugs-to to metadata.xml (diff) | |
download | gentoo-44c23f0ca11a9ccb952e95b526a0233200884121.tar.gz gentoo-44c23f0ca11a9ccb952e95b526a0233200884121.tar.bz2 gentoo-44c23f0ca11a9ccb952e95b526a0233200884121.zip |
dev-python/pygal: bump to 2.4.0; add doc, tests and examples
Also make sure Python has xml support and add setuptools to DEPEND
because pkg_resources is used.
Closes: https://bugs.gentoo.org/650062
Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r-- | dev-python/pygal/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pygal/pygal-2.4.0.ebuild | 62 |
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/pygal/Manifest b/dev-python/pygal/Manifest index 3a2d1f86e083..706caacf92a1 100644 --- a/dev-python/pygal/Manifest +++ b/dev-python/pygal/Manifest @@ -1 +1,2 @@ DIST pygal-2.1.1.tar.gz 69757 BLAKE2B d79e65c374e9d191a8e6671fd3bebfee4680c46b54ae141db74d67a08696e8bfa9ef88dcbb07ebf9e267fa5a7024b97a0c9f91f056753caf169e0518a6f49786 SHA512 79851bd6278a3a71f067ea11f273fcd0755ac0ab2ba51266b161fff1f3b49d690bc2a1b3432255da4f3cd5b9cfcff570d713d0bbfaf6f2dfe5b6f922989c72bd +DIST pygal-2.4.0.tar.gz 4554802 BLAKE2B 9627558e734420bfb3137989d0cc1978a0a06a597d3d5d071e13653876a4bb3266f12f1a8a358076619d997998754c29ee75058356ba66da64b112a24c2cbe2a SHA512 d69fbcff3792cb0b952addc3bfbaea76628d5546482c291ef217c592a820a73a65b1eb522c5d7877e7a794d19b74636126d99a4ff280e8467ab07a95000ba823 diff --git a/dev-python/pygal/pygal-2.4.0.ebuild b/dev-python/pygal/pygal-2.4.0.ebuild new file mode 100644 index 000000000000..43ff035e62b6 --- /dev/null +++ b/dev-python/pygal/pygal-2.4.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 + +DESCRIPTION="A python SVG charts generator" +HOMEPAGE="http://pygal.org/" +# PyPI tarballs do not contain docs +# https://github.com/Kozea/pygal/pull/428 +SRC_URI="https://github.com/Kozea/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples test" + +RDEPEND=" + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + media-gfx/cairosvg[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + ${RDEPEND} + dev-python/pyquery[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ) +" + +# CHANGELOG is a symlink to docs/changelog.rst +DOCS=( docs/changelog.rst README.md ) + +python_prepare_all() { + sed -i "/sphinx.ext.intersphinx/d" docs/conf.py || die + distutils-r1_python_prepare_all +} + +python_compile_all() { + if use doc; then + sphinx-build docs docs/_build/html || die + HTML_DOCS=( docs/_build/html/. ) + fi +} + +python_test() { + py.test || die "tests failed with ${EPYTHON}" +} + +python_install_all() { + if use examples; then + docinto examples + dodoc -r demo/. + docompress -x /usr/share/doc/${PF}/examples + fi + distutils-r1_python_install_all +} |