aports/main/py3-jinja2/APKBUILD

61 lines
1.9 KiB
Text
Raw Permalink Normal View History

2010-12-14 23:29:05 -06:00
# Contributor: Matt Smith <mcs@darkregion.net>
2013-03-11 08:49:49 +00:00
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-jinja2
_pkgname=jinja2
pkgver=3.1.6
pkgrel=0
2013-03-11 08:49:49 +00:00
pkgdesc="A small but fast and easy to use stand-alone python template engine"
2019-08-27 02:32:45 -03:00
url="https://palletsprojects.com/p/jinja/"
arch="noarch"
2019-08-27 02:32:45 -03:00
license="BSD-3-Clause"
depends="py3-markupsafe"
checkdepends="py3-pytest"
makedepends="python3-dev py3-gpep517 py3-flit-core py3-wheel"
2023-04-18 16:39:19 +00:00
subpackages="$pkgname-pyc $pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
2010-12-14 23:29:05 -06:00
2021-03-29 03:40:39 +02:00
# 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
2021-03-29 03:40:39 +02:00
# 1.11.3-r0:
# - CVE-2020-28493
2010-12-14 23:29:05 -06:00
build() {
2023-10-27 00:10:17 +00:00
gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
2010-12-14 23:29:05 -06:00
}
check() {
2023-10-27 00:10:17 +00:00
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"
}
2010-12-14 23:29:05 -06:00
package() {
2023-10-27 00:10:17 +00:00
python3 -m installer -d "$pkgdir" .dist/*.whl
2010-12-14 23:29:05 -06:00
local docdir="$pkgdir/usr/share/doc/$pkgname"
2010-12-14 23:29:05 -06:00
# 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
}
2010-12-14 23:29:05 -06:00
sha512sums="
bddd5e142f1462426c57b2efafdfafdfc6b66de257668707940896feae71eabdf19e0b6e34ef49b965153baf9b1eb59bb5a97349bb287ea0921dd2a751e967ab jinja2-3.1.6.tar.gz
"