# Contributor: Matt Smith # Maintainer: Matt Smith pkgname=py3-jinja2 _pkgname=jinja2 pkgver=3.1.4 pkgrel=0 pkgdesc="A small but fast and easy to use stand-alone python template engine" url="https://palletsprojects.com/p/jinja/" arch="noarch" license="BSD-3-Clause" depends="py3-markupsafe" checkdepends="py3-pytest" makedepends="python3-dev py3-gpep517 py3-flit-core py3-wheel" subpackages="$pkgname-pyc $pkgname-doc" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" # secfixes: # 3.1.4-r0: # - CVE-2024-34064 GHSA-h75v-3vvj-5mfj # 3.1.3-r0: # - CVE-2024-22195 GHSA-h5c8-rqwp-cp95 # 1.11.3-r0: # - CVE-2020-28493 build() { gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl # test_elif_deep fails on s390x .testenv/bin/python3 -m pytest -W ignore::DeprecationWarning \ -k "not test_elif_deep" } package() { python3 -m installer -d "$pkgdir" .dist/*.whl local docdir="$pkgdir/usr/share/doc/$pkgname" # Note: The documentation in the docs directory needs to be generated # by py-sphinx, however, this package (py-jinja2) is a dependency of # Sphinx itself! mkdir -p "$docdir" cp -R docs "$docdir"/ install -m 644 -D LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt } sha512sums=" d07d68a2687af68c705d3b7f5a2c67aca7b9d125316b15085888b9d0d6e769981af76f6f524728b89b5501bd671d518fcb2638f9ae112e57ca2bf2a53482cd89 jinja2-3.1.4.tar.gz "