blob: 1600abc001982f8e3a18e81a35f2ff30ec86dac7 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py-jinja2
_pkgname=Jinja2
pkgver=2.10.1
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="py-markupsafe"
checkdepends="pytest"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3
$pkgname-doc $pkgname-vim"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
cd "$builddir"
python2 -m pytest .
python3 -m pytest .
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
depends="${depends//py-/py2-}"
replaces="$pkgname"
_py python2
}
_py3() {
depends="${depends//py-/py3-}"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
doc() {
default_doc
local docdir="$subpkgdir/usr/share/doc/$pkgname"
cd "$builddir"
# 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 "$subpkgdir"/usr/share/licenses/$pkgname/LICENSE
}
vim() {
pkgdesc="Vim syntax for Jinja2"
depends="vim"
install_if="$pkgname=$pkgver-r$pkgrel vim"
install -m 644 -D "$builddir"/ext/Vim/jinja.vim \
"$subpkgdir"/usr/share/vim/vimfiles/syntax/jinja.vim
}
sha512sums="a00153a0e07bb7d67f301b4eaf7af657726a1985e9ffc7ae2d76bdbb4c062d672efc8065e398767e1039b18a483a0092e206deac91e4047aad64920b56869623 Jinja2-2.10.1.tar.gz"
|