1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DISTUTILS_USE_SETUPTOOLS=rdepend
7 PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
8 PYTHON_REQ_USE="threads(+)"
12 DESCRIPTION="A full-featured template engine for Python"
13 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 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris"
21 RESTRICT="!test? ( test )"
24 dev-python/markupsafe[${PYTHON_USEDEP}]
25 !dev-python/jinja:compat"
28 distutils_enable_sphinx docs \
29 dev-python/sphinx-issues \
30 dev-python/pallets-sphinx-themes
31 distutils_enable_tests pytest
33 # XXX: handle Babel better?
36 local mydistutilsargs=()
38 if [[ ${EPYTHON} == python* ]]; then
39 mydistutilargs+=( --with-debugsupport )
46 # avoid unnecessary dep on extra sphinxcontrib modules
47 sed -i '/sphinxcontrib.log_cabinet/ d' docs/conf.py || die
48 printf "############################# SED ###############################\n"
50 distutils-r1_src_prepare
54 # async is not supported on python2
55 if ! python_is_python3; then
56 rm -f jinja2/async*.py || die "Failed to remove async from python2"
61 wrap_opts distutils-r1_python_compile
64 python_install_all() {
65 if use examples ; then
70 distutils-r1_python_install_all
72 insinto /usr/share/vim/vimfiles/syntax
77 if ! has_version dev-python/Babel; then
78 elog "For i18n support, please emerge dev-python/Babel."