aports/main/py3-jinja2/APKBUILD

60 lines
1.9 KiB
Text

# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-jinja2
_pkgname=jinja2
pkgver=3.1.6
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.6-r0:
# - CVE-2025-27516 GHSA-cpwx-vrp4-4pq7
# 3.1.5-r0:
# - CVE-2024-56326 GHSA-q2x7-8rv6-6q7h
# - CVE-2024-56201 GHSA-gmj6-6f8f-6699
# 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
# async tests depend on community/py3-trio
.testenv/bin/python3 -m pytest -W ignore::DeprecationWarning \
-k "not test_elif_deep" \
--ignore-glob="tests/test_async*.py"
}
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="
bddd5e142f1462426c57b2efafdfafdfc6b66de257668707940896feae71eabdf19e0b6e34ef49b965153baf9b1eb59bb5a97349bb287ea0921dd2a751e967ab jinja2-3.1.6.tar.gz
"