diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-04-03 15:26:24 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-04-03 15:26:24 +0000 |
commit | 31a832549fe3433f5527629c90a51015f81aa8c3 (patch) | |
tree | 98c87ff089dd83cde3c48ee95fd334256342b4fb /dev-python/sphinx | |
parent | Do not inline nl_object_priv by Jiri Denemark (bug #366561). (diff) | |
download | gentoo-2-31a832549fe3433f5527629c90a51015f81aa8c3.tar.gz gentoo-2-31a832549fe3433f5527629c90a51015f81aa8c3.tar.bz2 gentoo-2-31a832549fe3433f5527629c90a51015f81aa8c3.zip |
Fix generation of docs with python 3. Solution copied from Progress overlay.
(Portage version: 2.2.0_alpha98/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/sphinx')
-rw-r--r-- | dev-python/sphinx/ChangeLog | 5 | ||||
-rw-r--r-- | dev-python/sphinx/sphinx-1.1.3-r2.ebuild | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/dev-python/sphinx/ChangeLog b/dev-python/sphinx/ChangeLog index c28d8750fded..525d98970b6c 100644 --- a/dev-python/sphinx/ChangeLog +++ b/dev-python/sphinx/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-python/sphinx # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/ChangeLog,v 1.103 2012/04/02 17:08:23 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/ChangeLog,v 1.104 2012/04/03 15:26:24 floppym Exp $ + + 03 Apr 2012; Mike Gilbert <floppym@gentoo.org> sphinx-1.1.3-r2.ebuild: + Fix generation of docs with python 3. Solution copied from Progress overlay. *sphinx-1.1.3-r2 (02 Apr 2012) diff --git a/dev-python/sphinx/sphinx-1.1.3-r2.ebuild b/dev-python/sphinx/sphinx-1.1.3-r2.ebuild index 55e7cd66e241..31b100595567 100644 --- a/dev-python/sphinx/sphinx-1.1.3-r2.ebuild +++ b/dev-python/sphinx/sphinx-1.1.3-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/sphinx-1.1.3-r2.ebuild,v 1.1 2012/04/02 17:08:23 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/sphinx-1.1.3-r2.ebuild,v 1.2 2012/04/03 15:26:24 floppym Exp $ EAPI="4" PYTHON_DEPEND="2" @@ -50,9 +50,10 @@ src_compile() { distutils_src_compile if use doc; then - pushd doc > /dev/null einfo "Generation of documentation" - PYTHONPATH=".." emake SPHINXBUILD="$(PYTHON -f) ../sphinx-build.py" html || die "Generation of documentation failed" + sed -e "/import sys/a sys.path.insert(0, '${S}/build-$(PYTHON -f --ABI)/lib')" -i sphinx-build.py + pushd doc > /dev/null + emake SPHINXBUILD="$(PYTHON -f) ../sphinx-build.py" html || die popd > /dev/null fi } @@ -63,7 +64,6 @@ src_test() { echo PYTHONPATH=lib nosetests --verbosity=1 PYTHONPATH=lib nosetests --verbosity=1 local rv=$? - rm -f lib/sphinx/pycode/Grammar*.pickle popd > /dev/null return $rv } @@ -74,6 +74,11 @@ src_install() { distutils_src_install python_generate_wrapper_scripts -E -f -q "${ED}usr/bin/sphinx-build" + delete_grammar_pickle() { + rm -f "${ED}$(python_get_sitedir)/sphinx/pycode/Grammar$(python_get_version -l).pickle" + } + python_execute_function -q delete_grammar_pickle + if use doc; then dohtml -A txt -r doc/_build/html/* || die "Installation of documentation failed" fi |