From 13b2e29923cb48ee63671232c5c2f4afa0f88c28 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 27 Jul 2010 18:15:56 +0000 Subject: Version bump. (Portage version: HEAD/cvs/Linux x86_64) --- dev-python/sphinx/ChangeLog | 8 +++- dev-python/sphinx/sphinx-1.0.1.ebuild | 84 +++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 dev-python/sphinx/sphinx-1.0.1.ebuild (limited to 'dev-python/sphinx') diff --git a/dev-python/sphinx/ChangeLog b/dev-python/sphinx/ChangeLog index e3994fdf3092..e7190d0c0e77 100644 --- a/dev-python/sphinx/ChangeLog +++ b/dev-python/sphinx/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/sphinx # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/ChangeLog,v 1.61 2010/07/23 11:30:45 djc Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/ChangeLog,v 1.62 2010/07/27 18:15:56 arfrever Exp $ + +*sphinx-1.0.1 (27 Jul 2010) + + 27 Jul 2010; Arfrever Frehtes Taifersar Arahesis + +sphinx-1.0.1.ebuild: + Version bump. *sphinx-1.0 (23 Jul 2010) diff --git a/dev-python/sphinx/sphinx-1.0.1.ebuild b/dev-python/sphinx/sphinx-1.0.1.ebuild new file mode 100644 index 000000000000..91c3d4ef147f --- /dev/null +++ b/dev-python/sphinx/sphinx-1.0.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/sphinx-1.0.1.ebuild,v 1.1 2010/07/27 18:15:56 arfrever 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="Tool to create documentation for Python projects" +HOMEPAGE="http://sphinx.pocoo.org/ http://pypi.python.org/pypi/Sphinx" +SRC_URI="http://pypi.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="doc latex" + +RDEPEND=">=dev-python/pygments-0.8 + >=dev-python/jinja-2.2 + >=dev-python/docutils-0.5 + latex? ( dev-texlive/texlive-latexextra )" +DEPEND="${RDEPEND} + dev-python/setuptools" + +S="${WORKDIR}/${MY_P}" + +DOCS="CHANGES" + +src_compile() { + distutils_src_compile + + if use doc; then + cd doc + einfo "Generation of documentation" + PYTHONPATH="../" emake SPHINXBUILD="$(PYTHON -f) ../sphinx-build.py" html || die "Generation of documentation failed" + fi +} + +src_install() { + distutils_src_install + + 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) $(python_get_version)...' \ + --failure-message 'Generation of Grammar pickle with $(python_get_implementation) $(python_get_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) $(python_get_version)...' \ + --failure-message 'Deletion of Grammar pickle with $(python_get_implementation) $(python_get_version) failed' \ + deletion_of_grammar_pickle +} -- cgit v1.2.3-65-gdbad