diff options
-rw-r--r-- | dev-python/jinja/Manifest | 1 | ||||
-rw-r--r-- | dev-python/jinja/jinja-2.8.1.ebuild | 75 | ||||
-rw-r--r-- | dev-python/jinja/metadata.xml | 12 |
3 files changed, 88 insertions, 0 deletions
diff --git a/dev-python/jinja/Manifest b/dev-python/jinja/Manifest new file mode 100644 index 0000000..4deb182 --- /dev/null +++ b/dev-python/jinja/Manifest @@ -0,0 +1 @@ +DIST jinja-2.8.1.tar.gz 397144 SHA256 4db3be5bee0552ff185ab9f26d45694caf3b0fb1de68c474d107671ce9559801 SHA512 f4655f1a43c06f7651fbd5251d0538788a3a6a3ffb93d9a8c239711cf043082c43d34706b6d71a18679d957faa6590e7e0259ffb8f7cc5e3300749526417a987 WHIRLPOOL 5a3fc2617b88fdeda0ab21c52761405eb759142589355e34a3c6d0bc96945b1c41a8c64e9e28100c8489b0e270fe4ae21e85bf05d6d82913de5976582d4a2714 diff --git a/dev-python/jinja/jinja-2.8.1.ebuild b/dev-python/jinja/jinja-2.8.1.ebuild new file mode 100644 index 0000000..2aa32bd --- /dev/null +++ b/dev-python/jinja/jinja-2.8.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit eutils distutils-r1 + +DESCRIPTION="A full-featured template engine for Python" +HOMEPAGE="http://jinja.pocoo.org/ https://pypi.org/project/Jinja2/" + +# pypi tarball is missing tests +SRC_URI="https://github.com/pallets/jinja/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris" +IUSE="doc examples test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/markupsafe[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + !dev-python/jinja:compat" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/pytest[${PYTHON_USEDEP}] )" + +# XXX: handle Babel better? + +wrap_opts() { + local mydistutilsargs=() + + if [[ ${EPYTHON} == python* ]]; then + mydistutilargs+=( --with-debugsupport ) + fi + + "${@}" +} + +python_compile() { + wrap_opts distutils-r1_python_compile + if [[ ${EPYTHON} == python3.2 ]]; then + 2to3 --no-diffs -n -w -f unicode "${BUILD_DIR}/lib" || die + fi +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test || die +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + if use examples ; then + docinto examples + dodoc -r examples/. + fi + + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles/syntax + doins ext/Vim/* +} + +pkg_postinst() { + if ! has_version dev-python/Babel; then + elog "For i18n support, please emerge dev-python/Babel." + fi +} diff --git a/dev-python/jinja/metadata.xml b/dev-python/jinja/metadata.xml new file mode 100644 index 0000000..03be641 --- /dev/null +++ b/dev-python/jinja/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">Jinja2</remote-id> + <remote-id type="github">pallets/jinja</remote-id> + </upstream> +</pkgmetadata> |