upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / python-jinja / repos / community-any / PKGBUILD
blob1efd63ea20ccc88fd930de8d4e8266e355f414ef
1 # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
2 # Contributor: David Runge <dave@sleepmap.de>
3 # Contributor: Peter Baldwin <bald_pete@hotmail.com>
5 pkgname=python-jinja
6 pkgver=3.1.2
7 pkgrel=4
8 epoch=1
9 pkgdesc="A simple pythonic template language written in Python"
10 arch=('any')
11 url="https://palletsprojects.com/p/jinja/"
12 license=('BSD')
13 depends=('python-markupsafe')
14 makedepends=('python-setuptools')
15 optdepends=('python-babel: for i18n support')
16 checkdepends=('python-pytest')
17 source=(https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-$pkgver.tar.gz
18         pytest-7.2.patch)
19 sha256sums=('31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852'
20             'fe9f7ca84fdeb06d10fdfc22a7cc66efe927ebd98e4cbb2e270850af32fbb6ce')
22 prepare() {
23   cd Jinja2-$pkgver
24   # https://github.com/pallets/jinja/issues/1758
25   patch -Np1 -i ../pytest-7.2.patch
28 build() {
29   cd Jinja2-$pkgver
30   python3 setup.py build
33 check() {
34   cd Jinja2-$pkgver
35   # https://github.com/pypa/setuptools/issues/2466
36   PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=build/lib pytest \
37     --deselect tests/test_loader.py::test_package_dir_list \
38     --deselect tests/test_loader.py::test_package_dir_source \
39     --deselect tests/test_loader.py::test_package_file_list \
40     --deselect tests/test_loader.py::test_package_file_source \
41     --deselect tests/test_loader.py::test_package_zip_list \
42     --deselect tests/test_loader.py::test_package_zip_omit_curdir \
43     --deselect tests/test_loader.py::test_package_zip_source
46 package() {
47   cd Jinja2-$pkgver
48   python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
49   install -Dm644 LICENSE.rst -t "$pkgdir/usr/share/licenses/$pkgname"
52 # vim:set ts=2 sw=2 et: