diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-03-31 19:55:28 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-03-31 19:55:28 +0000 |
commit | ce87617a90bdab9d9a6ee0777453a69a54a44ef5 (patch) | |
tree | 8a77627d03783fc87e192703cde82cbee8fe2918 /dev-python/sphinx | |
parent | Require the opengl useflag on libva, fails configure without it. Reported by ... (diff) | |
download | gentoo-2-ce87617a90bdab9d9a6ee0777453a69a54a44ef5.tar.gz gentoo-2-ce87617a90bdab9d9a6ee0777453a69a54a44ef5.tar.bz2 gentoo-2-ce87617a90bdab9d9a6ee0777453a69a54a44ef5.zip |
Make sphinx-build wrapper respect EPYTHON. Ported from Progress.
(Portage version: 2.2.0_alpha96/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/sphinx')
-rw-r--r-- | dev-python/sphinx/ChangeLog | 7 | ||||
-rw-r--r-- | dev-python/sphinx/sphinx-1.1.3-r1.ebuild | 86 |
2 files changed, 92 insertions, 1 deletions
diff --git a/dev-python/sphinx/ChangeLog b/dev-python/sphinx/ChangeLog index df92580a2a13..8f4ce1f3251c 100644 --- a/dev-python/sphinx/ChangeLog +++ b/dev-python/sphinx/ChangeLog @@ -1,6 +1,11 @@ # 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.101 2012/03/29 10:41:46 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/ChangeLog,v 1.102 2012/03/31 19:55:28 floppym Exp $ + +*sphinx-1.1.3-r1 (31 Mar 2012) + + 31 Mar 2012; Mike Gilbert <floppym@gentoo.org> +sphinx-1.1.3-r1.ebuild: + Make sphinx-build wrapper respect EPYTHON. Ported from Progress. 29 Mar 2012; Agostino Sarubbo <ago@gentoo.org> sphinx-1.1.2.ebuild: Stable for amd64, wrt bug #410115 diff --git a/dev-python/sphinx/sphinx-1.1.3-r1.ebuild b/dev-python/sphinx/sphinx-1.1.3-r1.ebuild new file mode 100644 index 000000000000..33264bdbe857 --- /dev/null +++ b/dev-python/sphinx/sphinx-1.1.3-r1.ebuild @@ -0,0 +1,86 @@ +# 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-r1.ebuild,v 1.1 2012/03/31 19:55:28 floppym Exp $ + +EAPI="3" +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" +DISTUTILS_SRC_TEST="nosetests" + +inherit distutils + +MY_PN="Sphinx" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Python documentation generator" +HOMEPAGE="http://sphinx.pocoo.org/ http://pypi.python.org/pypi/Sphinx" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="doc latex" + +DEPEND=">=dev-python/docutils-0.7 + >=dev-python/jinja-2.3 + >=dev-python/pygments-1.2 + dev-python/setuptools + latex? ( dev-texlive/texlive-latexextra )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +DOCS="CHANGES" + +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" + popd > /dev/null + fi +} + +src_install() { + distutils_src_install + python_generate_wrapper_scripts -E -f -q "${ED}usr/bin/sphinx-build" + + if use doc; then + dohtml -A txt -r doc/_build/html/* || die "Installation of documentation failed" + fi +} + +pkg_postinst() { + distutils_pkg_postinst + + # Generate the Grammar pickle to avoid sandbox violations. + generation_of_grammar_pickle() { + "$(PYTHON)" -c "import sys; sys.path.insert(0, '${EROOT}$(python_get_sitedir -b)'); from sphinx.pycode.pgen2.driver import load_grammar; load_grammar('${EROOT}$(python_get_sitedir -b)/sphinx/pycode/Grammar.txt')" + } + python_execute_function \ + --action-message 'Generation of Grammar pickle with $(python_get_implementation_and_version)...' \ + --failure-message 'Generation of Grammar pickle with $(python_get_implementation_and_version) failed' \ + generation_of_grammar_pickle +} + +pkg_postrm() { + distutils_pkg_postrm + + deletion_of_grammar_pickle() { + rm -f "${EROOT}$(python_get_sitedir -b)/sphinx/pycode"/Grammar*.pickle || return 1 + + # Delete empty parent directories. + local dir="${EROOT}$(python_get_sitedir -b)/sphinx/pycode" + while [[ "${dir}" != "${EROOT%/}" ]]; do + rmdir "${dir}" 2> /dev/null || break + dir="${dir%/*}" + done + } + python_execute_function \ + --action-message 'Deletion of Grammar pickle with $(python_get_implementation_and_version)...' \ + --failure-message 'Deletion of Grammar pickle with $(python_get_implementation_and_version) failed' \ + deletion_of_grammar_pickle +} |