diff options
author | Ian Delaney <idella4@gentoo.org> | 2014-05-21 05:45:44 +0000 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2014-05-21 05:45:44 +0000 |
commit | 3c2024dfdb2c3b53ff79cff7920208cf622a04ef (patch) | |
tree | 9f6cbcbd117d7e01c576edb4f67b0b21418ee9fd /dev-python/waitress | |
parent | Bump (diff) | |
download | gentoo-2-3c2024dfdb2c3b53ff79cff7920208cf622a04ef.tar.gz gentoo-2-3c2024dfdb2c3b53ff79cff7920208cf622a04ef.tar.bz2 gentoo-2-3c2024dfdb2c3b53ff79cff7920208cf622a04ef.zip |
add IUSE doc, doc build
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python/waitress')
-rw-r--r-- | dev-python/waitress/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/waitress/files/waitress-0.8.9-doc.patch | 29 | ||||
-rw-r--r-- | dev-python/waitress/waitress-0.8.9.ebuild | 27 |
3 files changed, 56 insertions, 6 deletions
diff --git a/dev-python/waitress/ChangeLog b/dev-python/waitress/ChangeLog index 413337dac125..1135cf20c504 100644 --- a/dev-python/waitress/ChangeLog +++ b/dev-python/waitress/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/waitress # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/waitress/ChangeLog,v 1.8 2014/05/21 03:30:59 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/waitress/ChangeLog,v 1.9 2014/05/21 05:45:44 idella4 Exp $ + + 21 May 2014; Ian Delaney <idella4@gentoo.org> +files/waitress-0.8.9-doc.patch, + waitress-0.8.9.ebuild: + add IUSE doc, doc build *waitress-0.8.9 (21 May 2014) diff --git a/dev-python/waitress/files/waitress-0.8.9-doc.patch b/dev-python/waitress/files/waitress-0.8.9-doc.patch new file mode 100644 index 000000000000..f7ff3b01467d --- /dev/null +++ b/dev-python/waitress/files/waitress-0.8.9-doc.patch @@ -0,0 +1,29 @@ +diff -ur waitress-0.8.9.orig/docs/conf.py waitress-0.8.9/docs/conf.py +--- docs/conf.py 2014-05-17 05:39:35.000000000 +0800 ++++ docs/conf.py 2014-05-21 13:28:12.921485962 +0800 +@@ -21,24 +21,7 @@ + import pkg_resources + + # Add and use Pylons theme +-if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers +- from subprocess import call, Popen, PIPE +- +- p = Popen('which git', shell=True, stdout=PIPE) +- git = p.stdout.read().strip() +- cwd = os.getcwd() +- _themes = os.path.join(cwd, '_themes') +- +- if not os.path.isdir(_themes): +- call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git', +- '_themes']) +- else: +- os.chdir(_themes) +- call([git, 'checkout', 'master']) +- call([git, 'pull']) +- os.chdir(cwd) +- +- sys.path.append(os.path.abspath('_themes')) ++sys.path.append(os.path.abspath('_themes')) + + # General configuration + # --------------------- diff --git a/dev-python/waitress/waitress-0.8.9.ebuild b/dev-python/waitress/waitress-0.8.9.ebuild index 697429759292..49bd324d51e2 100644 --- a/dev-python/waitress/waitress-0.8.9.ebuild +++ b/dev-python/waitress/waitress-0.8.9.ebuild @@ -1,29 +1,46 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/waitress/waitress-0.8.9.ebuild,v 1.1 2014/05/21 03:30:59 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/waitress/waitress-0.8.9.ebuild,v 1.2 2014/05/21 05:45:44 idella4 Exp $ EAPI=5 PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} pypy ) -# doc creation is fatally broken. well not fatally but it's bad - inherit distutils-r1 DESCRIPTION="A pure-Python WSGI server" HOMEPAGE="http://docs.pylonsproject.org/projects/waitress/en/latest/ https://pypi.python.org/pypi/waitress/ https://github.com/Pylons/waitress" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz \ + doc? ( http://dev.gentoo.org/~idella4/pylons_sphinx_theme.tar.gz )" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="test" +IUSE="doc test" RDEPEND="" DEPEND="${RDEPEND} app-arch/unzip test? ( dev-python/nose )" +python_prepare_all() { + if use doc; then + local PATCHES=( "${FILESDIR}"/${P}-doc.patch ) + einfo "doc patch applied" + mv "${WORKDIR}"/_themes ./docs/ || die + fi + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + python_test() { nosetests || die "Tests fail with ${EPYTHON}" } + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} |