summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-dateutil/PKGBUILD
blob: 7088ced14fb8cb156ed2ef411883b27c0e70f21b (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
#Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
#Contributor: lilydjwg <lilydjwg@gmail.com>

pkgbase=python-dateutil
pkgname=('python-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=('python-setuptools' 'python2-setuptools' 'python-six' 'python2-six')
source=("$pkgbase-$pkgver.tar.gz"::"https://github.com/dateutil/dateutil/archive/$pkgver.tar.gz")
md5sums=('8d1081ed9d4eaef11d47a7bbd62ca903')

build() {
  cd $srcdir
  cp -r  dateutil-$pkgver python2-dateutil-$pkgver
}

package_python-dateutil() {
depends=('python-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
}