summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e414430a337b5d99ead9eac0cac401d0b047c7d6 (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
# Contributor: Florian Klink <flokli at flokli dot de>
pkgname=python-pystache
_pkgname=pystache
pkgver=0.5.4
pkgrel=7
pkgdesc="The mustache template engine written in python"
arch=("any")
url="http://github.com/defunkt/pystache"
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/defunkt/$_pkgname/archive/v$pkgver.tar.gz")
sha256sums=('163f5b8fb45f6be3a5074a53a47e79ef51ec015ee43f3ec34b16be279147c96f')

build() {
	cd "$_pkgname-$pkgver"
	python setup.py build
}

check() {
	cd "$_pkgname-$pkgver"
	# This package uses 2to3 to convert itself to Python 3 on the fly
	# So we need to jump through some hoops here
	test_dir="../test_dir"
	rm -rf "$test_dir"
	mkdir "$test_dir"
	python setup.py install --root="$test_dir"
	PYTHONPATH=$(readlink -e "$test_dir"/usr/lib/python*/site-packages/) \
		"$test_dir"/usr/bin/pystache-test .
}

package() {
	cd "$_pkgname-$pkgver"
	python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}