# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=python-crontab
pkgver=2.5.1
pkgrel=1
pkgdesc="A module for reading/writing crontab files & accessing the system cron"
arch=('any')
url="https://gitlab.com/doctormo/python-crontab"
license=('GPL3')
depends=('python' 'python-croniter' 'python-cron-descriptor')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/doctormo/python-crontab/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz")
b2sums=('884ee9ff95e3e055bac894322910ecc81afb27158a7d08443589e9544871d9403a53b9a9206da231be9818390e98a2e59f6f5c6e390fda6e18060c0b53240c95')

build() {
  cd "$pkgname-v$pkgver"
  python setup.py build
}

# requires usage of a deprecated lib (test.support)
#check() {
#  cd "$pkgname-v$pkgver"
#  PYTHONPATH="$(pwd):$PYTHONPATH" python -m unittest
#}

package() {
  cd "$pkgname-v$pkgver"
  python setup.py install --root="$pkgdir" --optimize=1
}