Date: Tuesday, April 23, 2013 @ 23:33:54
  Author: eric
Revision: 183571

upgpkg: python-mako 0.8.0-1

Upstream update, Add prepare and check function

Modified:
  python-mako/trunk/PKGBUILD

----------+
 PKGBUILD |   32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2013-04-23 18:54:32 UTC (rev 183570)
+++ PKGBUILD    2013-04-23 21:33:54 UTC (rev 183571)
@@ -3,40 +3,52 @@
 # Contributor: Roberto Alsina <rals...@kde.org>
 
 pkgname=('python-mako' 'python2-mako')
-pkgver=0.7.3
+pkgver=0.8.0
 pkgrel=1
-pkgdesc="Hyperfast and lightweight templating for the Python2 platform."
+pkgdesc="Hyperfast and lightweight templating for the Python2 platform"
 arch=('any')
 url="http://www.makotemplates.org/";
 license=('MIT')
 makedepends=('python-distribute' 'python2-distribute')
+checkdepends=('python-nose' 'python2-nose')
 source=("http://www.makotemplates.org/downloads/Mako-$pkgver.tar.gz";)
-md5sums=('d41a87c0c1f2943940cb370cf895e2be')
+md5sums=('4ac2c6fdfb076b9387ca5f62d8c9384f')
 
-build() {
+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
+}
 
-    cd "$srcdir/Mako-$pkgver"
+build() {
+    cd Mako-$pkgver
     python3 setup.py build
 
-    cd "$srcdir/python2-Mako-$pkgver"
+    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 "$srcdir/Mako-$pkgver"
+    cd Mako-$pkgver
     python3 setup.py install --root="$pkgdir" --optimize=1
-    mv "$pkgdir"/usr/bin/mako-render "$pkgdir"/usr/bin/python3-mako-render
-    2to3 -nw "$pkgdir"/usr/bin/python3-mako-render # FS#33023
     install -D LICENSE "$pkgdir/usr/share/licenses/python-mako/COPYING"
 }
 
 package_python2-mako() {
     depends=('python2-markupsafe' 'python2-beaker')
 
-    cd "$srcdir/python2-Mako-$pkgver"
+    cd python2-Mako-$pkgver
     python2 setup.py install --root="$pkgdir" --optimize=1
     install -D LICENSE "$pkgdir/usr/share/licenses/python2-mako/COPYING"
 }

Reply via email to