arch-pkgs/python-croniter/PKGBUILD

40 lines
1.3 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.3.1
pkgrel=1
2021-08-26 01:36:47 +00:00
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")
sha512sums=('40b211fedddcaa5cdc1de4e34cb1343063c684b70ef404aa5f92ebdbbf6afcc1f511af9a52fc4eda42c3f27556a35059681ddad2cda6f6b3e1f334bea7c1e3ce')
b2sums=('b6542e25878ea15c0fd1c48f8af485fa0f03809473a09fb95367134edd91a5d3b9053673589902e8c70faa372d096e2fbbbaf02d9ebd08982f2dd382ecebd8c5')
2021-08-26 01:36:47 +00:00
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
}