arch-pkgs/python-croniter/PKGBUILD

39 lines
1.2 KiB
Text
Raw Normal View History

2021-08-26 01:36:47 +00:00
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: Thomas Andrejak <thomas.andrejak@gmail.com>
pkgname=python-croniter
_pkgname="${pkgname#python-}"
pkgver=1.0.15
pkgrel=1
pkgdesc="Provides iteration for the datetime object with a cron like format"
arch=('any')
url="https://github.com/kiorky/croniter"
license=('MIT')
depends=('python-dateutil' 'python-natsort')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-pytz')
source=("$pkgname-$pkgver.tar.gz::https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
b2sums=('daf40bcc7c791dd2a65d2cd132c380dff03353ab6d7920adddff2b1b6a87166050be6ed2b7bac5eb2b9543dcab9a4f2f65738506dc35eff0836cc591e486f885')
build() {
cd "$_pkgname-$pkgver"
python setup.py build
}
check() {
cd "$_pkgname-$pkgver"
pytest
}
package() {
cd "$_pkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" docs/LICENSE
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.rst docs/CHANGES.rst
}