summaryrefslogtreecommitdiff
path: root/main/py3-jinja2/APKBUILD
blob: bc8bc55693e360c8e9ee0cf0158e6817ccc7f644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-jinja2
_pkgname=Jinja2
pkgver=3.1.2
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-setuptools"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

# secfixes:
#   1.11.3-r0:
#     - CVE-2020-28493

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=build/lib pytest -W ignore::DeprecationWarning
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	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 examples "$docdir"/

	install -m 644 -D LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst
}

sha512sums="
5dfe122c1beef5305b34d25f22f96607bd3a6cba098b03091850ea36fefe62b645a7218d7584b35bea252393ac922c9bb3654a9e90f23bcfb273e811fcf2f2c1  Jinja2-3.1.2.tar.gz
"