1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} pypy3 )
7 PYTHON_REQ_USE="threads(+)"
11 DESCRIPTION="A full-featured template engine for Python"
12 HOMEPAGE="http://jinja.pocoo.org/ https://pypi.org/project/Jinja2/"
14 # pypi tarball is missing tests
15 SRC_URI="https://github.com/pallets/jinja/archive/${PV}.tar.gz -> ${P}.tar.gz"
19 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris"
20 IUSE="doc examples test"
21 RESTRICT="!test? ( test )"
23 CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
24 !dev-python/jinja:compat"
26 dev-python/markupsafe[${PYTHON_USEDEP}]"
28 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
30 distutils_enable_tests pytest
32 # XXX: handle Babel better?
35 local mydistutilsargs=()
37 if [[ ${EPYTHON} == python* ]]; then
38 mydistutilargs+=( --with-debugsupport )
45 # async is not supported on python2
46 if ! python_is_python3; then
47 rm -f jinja2/async*.py || die "Failed to remove async from python2"
52 wrap_opts distutils-r1_python_compile
55 python_compile_all() {
56 use doc && emake -C docs html
59 python_install_all() {
60 use doc && local HTML_DOCS=( docs/_build/html/. )
61 if use examples ; then
66 distutils-r1_python_install_all
68 insinto /usr/share/vim/vimfiles/syntax
73 if ! has_version dev-python/Babel; then
74 elog "For i18n support, please emerge dev-python/Babel."