summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2009-05-13 08:57:51 +0000
committerTiziano Müller <dev-zero@gentoo.org>2009-05-13 08:57:51 +0000
commita2b706186aabf02986bd2b3b3c0528918f0ac09c (patch)
tree4057516bad98893cf641128ff4d4e55ac46dabb1 /dev-python/sphinx/sphinx-0.6.1-r1.ebuild
parentx11-base/xorg-server: drop XPrint support from 1.3 and 1.4, no-one missed it ... (diff)
downloadgentoo-2-a2b706186aabf02986bd2b3b3c0528918f0ac09c.tar.gz
gentoo-2-a2b706186aabf02986bd2b3b3c0528918f0ac09c.tar.bz2
gentoo-2-a2b706186aabf02986bd2b3b3c0528918f0ac09c.zip
Revision bump to fix access violations in packages generating docs using sphinx (bug #266015).
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/sphinx/sphinx-0.6.1-r1.ebuild')
-rw-r--r--dev-python/sphinx/sphinx-0.6.1-r1.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-python/sphinx/sphinx-0.6.1-r1.ebuild b/dev-python/sphinx/sphinx-0.6.1-r1.ebuild
new file mode 100644
index 000000000000..cb10dd3dc78c
--- /dev/null
+++ b/dev-python/sphinx/sphinx-0.6.1-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/sphinx/sphinx-0.6.1-r1.ebuild,v 1.1 2009/05/13 08:57:51 dev-zero Exp $
+
+inherit distutils multilib
+
+MY_PN="Sphinx"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Tool to create documentation for Python projects"
+HOMEPAGE="http://sphinx.pocoo.org/"
+SRC_URI="http://pypi.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="doc test"
+
+RDEPEND=">=dev-python/pygments-0.8
+ >=dev-python/jinja2-2.1
+ >=dev-python/docutils-0.4"
+
+DEPEND="${RDEPEND}
+ dev-python/setuptools
+ test? ( dev-python/nose )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ DOCS="CHANGES"
+ distutils_src_compile
+
+ if use doc ; then
+ cd doc
+ PYTHONPATH="../" emake \
+ SPHINXBUILD="${python} ../sphinx-build.py" \
+ html || die "making docs failed"
+ fi
+}
+
+src_install() {
+ distutils_src_install
+
+ if use doc ; then
+ dohtml -A txt -r doc/_build/html/* || die
+ fi
+}
+
+src_test() {
+ PYTHONPATH="./build/lib" "${python}" tests/run.py || die "Tests failed"
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ # Generating the Grammar pickle to avoid on the fly generation causing sandbox violations (bug #266015)
+ "${python}" \
+ -c "from sphinx.pycode.pgen2.driver import load_grammar ; load_grammar('${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages/sphinx/pycode/Grammar.txt')" \
+ || die "generating grammar pickle failed"
+}
+
+pkg_postrm() {
+ rm "${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages/sphinx/pycode"/Grammar*.pickle
+ distutils_pkg_postrm
+}