app-text/pelican: Add live ebuild
[gentoo.git] / app-text / pelican / pelican-9999.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6 PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
7
8 inherit distutils-r1 git-r3
9
10 DESCRIPTION="A tool to generate a static blog, with restructured text or markdown input files"
11 HOMEPAGE="http://blog.getpelican.com/ https://pypi.python.org/pypi/pelican"
12 EGIT_REPO_URI="https://github.com/getpelican/pelican.git"
13 EGIT_CHECKOUT_DIR="${WORKDIR}/${P}"
14
15 LICENSE="AGPL-3"
16 SLOT="0"
17 KEYWORDS=""
18 IUSE="doc examples markdown test"
19 # Tests fail for this release but are fixed upstream
20 RESTRICT="test"
21
22 DEPEND=">=dev-python/feedgenerator-1.6[${PYTHON_USEDEP}]
23         >=dev-python/jinja-2.7[${PYTHON_USEDEP}]
24         dev-python/docutils[${PYTHON_USEDEP}]
25         dev-python/pygments[${PYTHON_USEDEP}]
26         dev-python/pytz[${PYTHON_USEDEP}]
27         dev-python/unidecode[${PYTHON_USEDEP}]
28         dev-python/blinker[${PYTHON_USEDEP}]
29         >=dev-python/six-1.4[${PYTHON_USEDEP}]
30         dev-python/python-dateutil[${PYTHON_USEDEP}]
31         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
32         markdown? ( dev-python/markdown[${PYTHON_USEDEP}] )
33         test? (
34                 dev-python/nose[${PYTHON_USEDEP}]
35                 dev-python/markdown[${PYTHON_USEDEP}]
36         )"
37 RDEPEND=""
38
39 DOCS=( README.rst )
40
41 python_compile_all() {
42         use doc && emake -C docs html
43 }
44
45 python_install_all() {
46         use doc && local HTML_DOCS=( docs/_build/html/. )
47         if use examples; then
48                 insinto "/usr/share/doc/${PF}"
49                 docompress -x "/usr/share/doc/${PF}/samples"
50                 doins -r samples
51         fi
52         distutils-r1_python_install_all
53 }
54
55 python_test() {
56         nosetests || die "Testing failed with ${EPYTHON}"
57 }