summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-12-31 12:16:19 +0000
committerMichał Górny <mgorny@gentoo.org>2012-12-31 12:16:19 +0000
commit51d2e0249c10cd27cd8ebc9f306e08ed27cb2b93 (patch)
tree175af242084d27abfb68b1b77b1f851b46e08b0f /dev-python/docutils
parentIntroduce a split ebuild for GLEP support for docutils. (diff)
downloadgentoo-2-51d2e0249c10cd27cd8ebc9f306e08ed27cb2b93.tar.gz
gentoo-2-51d2e0249c10cd27cd8ebc9f306e08ed27cb2b93.tar.bz2
gentoo-2-51d2e0249c10cd27cd8ebc9f306e08ed27cb2b93.zip
Version bump with a patch for buildhtml.py. Move GLEP support to dev-python/docutils-glep.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 42B9401D)
Diffstat (limited to 'dev-python/docutils')
-rw-r--r--dev-python/docutils/ChangeLog9
-rw-r--r--dev-python/docutils/docutils-0.10.ebuild72
-rw-r--r--dev-python/docutils/files/docutils-0.10-optparser.patch34
3 files changed, 114 insertions, 1 deletions
diff --git a/dev-python/docutils/ChangeLog b/dev-python/docutils/ChangeLog
index 2ee4c30aa2bb..996422127b81 100644
--- a/dev-python/docutils/ChangeLog
+++ b/dev-python/docutils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/docutils
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.163 2012/12/17 19:56:00 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.164 2012/12/31 12:16:18 mgorny Exp $
+
+*docutils-0.10 (31 Dec 2012)
+
+ 31 Dec 2012; Michał Górny <mgorny@gentoo.org> +docutils-0.10.ebuild,
+ +files/docutils-0.10-optparser.patch:
+ Version bump with a patch for buildhtml.py. Move GLEP support to dev-python
+ /docutils-glep.
17 Dec 2012; Michał Górny <mgorny@gentoo.org> docutils-0.9.1-r1.ebuild:
Bump to EAPI=5 to make Paludis happy, bug #447524.
diff --git a/dev-python/docutils/docutils-0.10.ebuild b/dev-python/docutils/docutils-0.10.ebuild
new file mode 100644
index 000000000000..5f6ad64129c1
--- /dev/null
+++ b/dev-python/docutils/docutils-0.10.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/docutils-0.10.ebuild,v 1.1 2012/12/31 12:16:18 mgorny Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2} pypy{1_8,1_9} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python Documentation Utilities"
+HOMEPAGE="http://docutils.sourceforge.net/ http://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 ~hppa ~ia64 ~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="glep"
+
+DEPEND="dev-python/pygments[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ dev-python/docutils-glep[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ # fix buildhtml.py option parsing
+ "${FILESDIR}"/${P}-optparser.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
+ "${PYTHON}" buildhtml.py --input-encoding=utf-8 \
+ --stylesheet-path=../html4css1.css, --traceback ../docs || die
+}
+
+python_test() {
+ local tests=test
+ [[ ${EPYTHON} == python3* ]] && tests=test3
+
+ cp -r -l ${tests} "${BUILD_DIR}"/test || die
+ ln -s "${S}"/docs "${BUILD_DIR}"/ || die
+ "${PYTHON}" "${BUILD_DIR}"/test/alltests.py || die "Tests fail with ${EPYTHON}"
+}
+
+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)
+}
diff --git a/dev-python/docutils/files/docutils-0.10-optparser.patch b/dev-python/docutils/files/docutils-0.10-optparser.patch
new file mode 100644
index 000000000000..a65fbde71ce0
--- /dev/null
+++ b/dev-python/docutils/files/docutils-0.10-optparser.patch
@@ -0,0 +1,34 @@
+Patch by Arfrever
+http://sourceforge.net/tracker/?func=detail&aid=3598893&group_id=38414&atid=422030
+
+Index: docutils/frontend.py
+===================================================================
+--- docutils/frontend.py (revision 7578)
++++ docutils/frontend.py (working copy)
+@@ -158,7 +158,7 @@
+
+ def validate_colon_separated_string_list(
+ setting, value, option_parser, config_parser=None, config_section=None):
+- if isinstance(value, unicode):
++ if isinstance(value, basestring):
+ value = value.split(':')
+ else:
+ last = value.pop()
+@@ -171,7 +171,7 @@
+ """
+ # `value` is already a list when given as command line option
+ # and "action" is "append"
+- if isinstance(value, unicode):
++ if isinstance(value, basestring):
+ value = [value]
+ # this function is called for every option added to `value`
+ # -> split the last item and apped the result:
+@@ -731,7 +731,7 @@
+ """Wrapper around sys.stderr catching en-/decoding errors"""
+
+ def read(self, filenames, option_parser):
+- if type(filenames) in (str, unicode):
++ if isinstance(filenames, basestring):
+ filenames = [filenames]
+ for filename in filenames:
+ try: