desktop/python-aspectlib/PKGBUILD

55 lines
1.4 KiB
Bash

# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgbase=python-aspectlib
pkgname=('python-aspectlib' 'python2-aspectlib')
pkgver=1.4.2
pkgrel=2
pkgdesc="Development library for quickly writing configurable applications and daemons"
arch=('any')
license=('BSD')
url="https://github.com/ionelmc/python-aspectlib"
makedepends=('python-setuptools' 'python2-setuptools' 'git')
checkdepends=('python-mock'
'python2-mock' 'python-tornado' 'python2-tornado' 'python-process-tests'
'python2-process-tests' 'python2-trollius' 'python-profilestats'
'python2-profilestats') # 'mysql-python')
source=("git+https://github.com/ionelmc/python-aspectlib.git#tag=v$pkgver")
sha512sums=('SKIP')
prepare() {
cp -a python-aspectlib{,-py2}
}
build() {
cd "$srcdir"/python-aspectlib
python setup.py build
cd "$srcdir"/python-aspectlib-py2
python2 setup.py build
}
check() {
cd "$srcdir"/python-aspectlib
LC_CTYPE=en_US.UTF-8 py.test
cd "$srcdir"/python-aspectlib-py2
py.test2
}
package_python-aspectlib() {
depends=('python')
cd python-aspectlib
python setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-aspectlib() {
depends=('python2')
cd python-aspectlib-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}