33 lines
900 B
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=python-validators
pkgver=0.20.2
pkgrel=2
pkgdesc="Python Data Validation for Humans"
url="https://github.com/kvesteri/validators"
license=('MIT')
arch=(any)
depends=('python')
makedepends=('python-build' 'python-installer' 'python-poetry-core')
checkdepends=('python-pytest')
source=("https://github.com/kvesteri/validators/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('95a7b1fd7f6462535fff49542230d8026b7148d5659e9055ae828d9f2247ceafd4244360570c96fb4fdc03438073ef9a922d0403e73a947f25c844259ee51375')
build() {
cd validators-$pkgver
python -m build -nw
}
check() {
cd validators-$pkgver
python -m pytest
}
package() {
cd validators-$pkgver
python -m installer -d "$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}