desktop/python-dateutil/PKGBUILD
2017-10-27 00:01:37 +02:00

41 lines
1.1 KiB
Bash

pkgbase=python-dateutil
pkgname=('python3-dateutil' 'python2-dateutil')
pkgver=2.6.1
pkgrel=1
pkgdesc="Provides powerful extensions to the standard datetime module"
arch=('any')
license=('custom')
url="https://github.com/dateutil/dateutil"
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-six' 'python2-six')
source=("$pkgbase-$pkgver.tar.gz"::https://github.com/dateutil/dateutil/archive/$pkgver.tar.gz)
sha1sums=('33b66da1a9118550d4ef5350b0cfdb72e1f7774a')
build() {
cd $srcdir
cp -r dateutil-$pkgver python2-dateutil-$pkgver
}
package_python3-dateutil() {
depends=('python3-six')
cd dateutil-$pkgver
python3 setup.py install --root=$pkgdir --optimize=1
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
package_python2-dateutil() {
depends=('python2-six')
cd $srcdir/python2-dateutil-$pkgver
python2 setup.py install --root=$pkgdir --optimize=1
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
check() {
cd dateutil-$pkgver
python3 updatezinfo.py
python3 setup.py test
cd $srcdir/python2-dateutil-$pkgver
python2 updatezinfo.py
python2 setup.py test
}