arch-pkgs/python-cron-descriptor/PKGBUILD

53 lines
1.0 KiB
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=python-cron-descriptor
_pkgname="${pkgname#python-}"
pkgver=1.2.32
pkgrel=1
pkgdesc='A Python library that converts cron expressions into human readable strings'
arch=('any')
url='https://github.com/Salamek/cron-descriptor'
license=('MIT')
depends=('python')
makedepends=(
'git'
'python-build'
'python-installer'
'python-wheel'
'python-setuptools'
)
_commit='2fbbff864afb86aeec378834a508d58e46a7da98'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
build() {
cd "$pkgname"
python -m build --wheel --no-isolation
}
check() {
cd "$pkgname"
python -m unittest
}
package() {
cd "$pkgname"
python -m installer --destdir="$pkgdir" dist/*.whl
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
cp -vr examples "$pkgdir/usr/share/doc/$pkgname"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}