diff options
| author | Michał Górny <mgorny@gentoo.org> | 2023-05-17 05:04:46 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2023-05-17 05:33:20 +0200 |
| commit | 29268508611cb0e4eab8adbc3a10eddb3670bd53 (patch) | |
| tree | 97157727db2d4496da95b4f5f3b5ac4746ed68c6 /dev-python/docutils/docutils-0.20.1.ebuild | |
| parent | b4fed417dbb4eae123c1cad1b2d1612e6985f3bc (diff) | |
| download | gentoo-29268508611cb0e4eab8adbc3a10eddb3670bd53.tar.gz gentoo-29268508611cb0e4eab8adbc3a10eddb3670bd53.tar.bz2 gentoo-29268508611cb0e4eab8adbc3a10eddb3670bd53.zip | |
dev-python/docutils: Bump to 0.20.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/docutils/docutils-0.20.1.ebuild')
| -rw-r--r-- | dev-python/docutils/docutils-0.20.1.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/docutils/docutils-0.20.1.ebuild b/dev-python/docutils/docutils-0.20.1.ebuild new file mode 100644 index 000000000000..b93993c2b79b --- /dev/null +++ b/dev-python/docutils/docutils-0.20.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python Documentation Utilities (reference reStructuredText impl.)" +HOMEPAGE=" + https://docutils.sourceforge.io/ + https://pypi.org/project/docutils/ +" + +LICENSE="BSD-2 GPL-3 public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + dev-python/pygments[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} +" + +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 +} + +src_test() { + cd test || die + distutils-r1_src_test +} + +python_test() { + "${EPYTHON}" alltests.py -v || die "Testing failed with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install + + # Install tools. + python_doscript tools/buildhtml.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) +} |
