desktop/python-freezegun/PKGBUILD

51 lines
1.3 KiB
Bash

# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgbase=python-freezegun
pkgname=('python-freezegun' 'python2-freezegun')
pkgver=0.3.10
pkgrel=1
pkgdesc="Let your Python tests travel through time"
arch=('any')
license=('Apache')
url="https://github.com/spulec/freezegun"
makedepends=('python-setuptools' 'python2-setuptools' 'python-dateutil' 'python2-dateutil')
checkdepends=('python-nose' 'python2-nose' 'python-mock' 'python2-mock'
'python-coverage' 'python2-coverage' 'python-dateutil' 'python2-dateutil')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/spulec/freezegun/archive/$pkgver.tar.gz")
sha512sums=('5914a219000898d1840e8bd014f4a9dd23da4ae0b6b2761102ffb25a88a0031fec05d3f75684a4e17249f4b5138f9b69ff3f950bb840ea5f2aad97341be396de')
prepare() {
cp -a freezegun-$pkgver{,-py2}
}
build() {
cd "$srcdir"/freezegun-$pkgver
python setup.py build
cd "$srcdir"/freezegun-$pkgver-py2
python2 setup.py build
}
check() {
cd "$srcdir"/freezegun-$pkgver
nosetests3
cd "$srcdir"/freezegun-$pkgver-py2
nosetests2
}
package_python-freezegun() {
depends=('python-dateutil')
cd freezegun-$pkgver
python setup.py install --root="$pkgdir" --optimize=1
}
package_python2-freezegun() {
depends=('python2-dateutil')
cd freezegun-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
}