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