void-packages/srcpkgs/python-Jinja2/template

37 lines
1.1 KiB
Bash

# Template file for 'python-Jinja2'
pkgname=python-Jinja2
version=2.11.2
revision=1
wrksrc="Jinja2-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-MarkupSafe"
checkdepends="tox python-MarkupSafe python3-MarkupSafe python-pytest python3-pytest"
short_desc="Full featured template engine (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="BSD-3-Clause"
homepage="http://jinja.pocoo.org/"
changelog="https://raw.githubusercontent.com/pallets/jinja/master/CHANGES.rst"
distfiles="${PYPI_SITE}/J/Jinja2/Jinja2-${version}.tar.gz"
checksum=89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0
do_check() {
tox -e py,py27,docs
}
post_install() {
vlicense LICENSE.rst
# these files are valid only on Python 3.6+
rm -f ${DESTDIR}/${py2_sitelib}/jinja2/asyncsupport.py
rm -f ${DESTDIR}/${py2_sitelib}/jinja2/asyncfilters.py
}
python3-Jinja2_package() {
depends="python3-MarkupSafe"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE.rst
}
}