summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-mako/PKGBUILD
blob: 71440e48352b5a598ea632da017fdc4f5d74c530 (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
# $Id$
# Maintainer : 

pkgname=('python2-mako')
pkgver=0.9.1
pkgrel=2
pkgdesc="Hyperfast and lightweight templating for the Python2 platform"
arch=('any')
url="http://www.makotemplates.org/"
license=('MIT')
makedepends=('python2-setuptools')
checkdepends=('python2-nose')
source=(https://pypi.python.org/packages/source/M/Mako/Mako-$pkgver.tar.gz{,.asc})
sha1sums=('aa01bafca5a835eb92a9048be92414fa83da102b'
          'SKIP')

prepare() {
    cp -r Mako-$pkgver python2-Mako-$pkgver
    mv Mako-$pkgver/scripts/mako-render Mako-$pkgver/scripts/python3-mako-render
#    2to3 -nw Mako-$pkgver/scripts/python3-mako-render
    sed -i 's/mako-render/python3-mako-render/' Mako-$pkgver/setup.py
}

build() {
    cd Mako-$pkgver
#    python3 setup.py build

    cd ../python2-Mako-$pkgver
    python2 setup.py build
}

check() {
    cd Mako-$pkgver
#    python3 setup.py test

    cd ../python2-Mako-$pkgver
    python2 setup.py test
}

#package_python-mako() {
#    depends=('python-markupsafe' 'python-beaker')

#    cd Mako-$pkgver
#    python3 setup.py install --root="$pkgdir" --optimize=1
#    install -D LICENSE "$pkgdir/usr/share/licenses/python-mako/COPYING"
#}

package_python2-mako() {
    depends=('python2-markupsafe' 'python2-beaker')

    cd python2-Mako-$pkgver
    python2 setup.py install --root="$pkgdir" --optimize=1
    install -D LICENSE "$pkgdir/usr/share/licenses/python2-mako/COPYING"
}