diff options
author | Mathy Vanvoorden <mathy@vanvoorden.be> | 2016-10-19 12:09:44 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-10-19 18:30:06 +0200 |
commit | 37751f69b9bf96a30be87c43c4600d715953adf0 (patch) | |
tree | 782e96f00e72891a93ed389a57df1445d63136d7 /dev-python/docutils/docutils-0.12-r1.ebuild | |
parent | app-vim/zenburn: Stable for amd64. Mark stable for the remaining arches using... (diff) | |
download | gentoo-37751f69b9bf96a30be87c43c4600d715953adf0.tar.gz gentoo-37751f69b9bf96a30be87c43c4600d715953adf0.tar.bz2 gentoo-37751f69b9bf96a30be87c43c4600d715953adf0.zip |
dev-python/docutils: major improvements.
This commit:
* bumps EAPI.
* fixes EPYTHON.
* removes python3.3.
* removes version 0.10 and version 0.9.1-r1.
* revision-bumps to version 0.12-r1.
* fixes testing: testing was broken both for CPython and PyPy, it was solved
by two patches. One is from upstream, the other has been submitted to upstream.
Upstream submission: https://sourceforge.net/p/docutils/patches/136/
Gentoo-Bug: https://bugs.gentoo.org/452792
Gentoo-Bug: https://bugs.gentoo.org/451830
Gentoo-Bug: https://bugs.gentoo.org/529930
Gentoo-Bug: https://bugs.gentoo.org/593754
Courtesy of Mathy Vanvoorden <mathy@vanvoorden.be>.
Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2600
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'dev-python/docutils/docutils-0.12-r1.ebuild')
-rw-r--r-- | dev-python/docutils/docutils-0.12-r1.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/docutils/docutils-0.12-r1.ebuild b/dev-python/docutils/docutils-0.12-r1.ebuild new file mode 100644 index 000000000000..ff9e7696d428 --- /dev/null +++ b/dev-python/docutils/docutils-0.12-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Python Documentation Utilities" +HOMEPAGE="http://docutils.sourceforge.net/ https://pypi.python.org/pypi/docutils" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD-2 GPL-3 public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="dev-python/pygments[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND}" + +PATCHES=( + # Upstream patch to fix tests + "${FILESDIR}/${P}-fix-tests-pygments.patch" + + # Patch to fix pypyp tests + "${FILESDIR}/${P}-fix-tests-pypy.patch" +) + +python_compile_all() { + # Generate html docs from reStructured text sources. + + # Place html4css1.css in base directory to ensure that the generated reference to it is correct. + cp docutils/writers/html4css1/html4css1.css . || die + + cd tools || die + "${EPYTHON}" buildhtml.py --input-encoding=utf-8 \ + --stylesheet-path=../html4css1.css, --traceback ../docs || die +} + +python_test() { + if python_is_python3; then + pushd test3 > /dev/null || die + else + pushd test > /dev/null || die + fi + "${EPYTHON}" alltests.py || die "Testing failed with ${EPYTHON}" + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + # Install tools. + python_doscript tools/{buildhtml,quicktest}.py +} + +install_txt_doc() { + local doc="${1}" + local dir="txt/$(dirname ${doc})" + docinto "${dir}" + dodoc "${doc}" +} + +python_install_all() { + local DOCS=( *.txt ) + local HTML_DOCS=( docs tools docutils/writers/html4css1/html4css1.css ) + + distutils-r1_python_install_all + + local doc + while IFS= read -r -d '' doc; do + install_txt_doc "${doc}" + done < <(find docs tools -name '*.txt' -print0) +} |