void-packages/srcpkgs/python-Jinja2/template

38 lines
1.1 KiB
Bash

# Template file for 'python-Jinja2'
pkgname=python-Jinja2
version=2.11.3
revision=1
wrksrc="Jinja2-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-MarkupSafe"
checkdepends="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=a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6
do_check() {
PYTHONPATH=src python2 -m pytest
PYTHONPATH=src python3 -m pytest
}
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
}
}