addpkg: python-croniter 1.0.15-1

This commit is contained in:
George Rawlinson 2021-08-26 01:36:47 +00:00
parent 445d73d341
commit aa2f9324a5
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

38
python-croniter/PKGBUILD Normal file
View file

@ -0,0 +1,38 @@
# 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
}