aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-cheetah
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-cheetah')
-rw-r--r--community/py3-cheetah/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/community/py3-cheetah/APKBUILD b/community/py3-cheetah/APKBUILD
new file mode 100644
index 0000000000..7acf1db394
--- /dev/null
+++ b/community/py3-cheetah/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com>
+# Maintainer: TBK <alpine@jjtc.eu>
+pkgname=py-cheetah
+_pkgreal=${pkgname#py-}
+_pkgname=Cheetah3
+pkgver=3.2.3
+pkgrel=0
+pkgdesc="Cheetah is a template engine and code generation tool"
+url="http://www.cheetahtemplate.org/"
+arch="all"
+license="MIT"
+makedepends="python2-dev python3-dev py-setuptools py3-setuptools"
+subpackages="py3-$_pkgreal:_py3 py2-$_pkgreal:_py2"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ python2 setup.py check
+ python3 setup.py check
+}
+
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _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"
+}
+
+sha512sums="ebc735b59d61912679405469f9d509fc73bbdde51c414320994421849f4a02266d2c286c0f618cab2a592ab47ac0a4be9ec444fab75145a0c31dd0c3c39fc1e3 Cheetah3-3.2.3.tar.gz"