Date: Saturday, March 14, 2020 @ 19:23:58 Author: dvzrv Revision: 597095
archrelease: copy trunk to community-any Added: python-cfgv/repos/community-any/ python-cfgv/repos/community-any/PKGBUILD (from rev 597094, python-cfgv/trunk/PKGBUILD) ----------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Copied: python-cfgv/repos/community-any/PKGBUILD (from rev 597094, python-cfgv/trunk/PKGBUILD) =================================================================== --- community-any/PKGBUILD (rev 0) +++ community-any/PKGBUILD 2020-03-14 19:23:58 UTC (rev 597095) @@ -0,0 +1,43 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=cfgv +pkgname=python-cfgv +pkgver=3.1.0 +pkgrel=2 +pkgdesc="Validate configuration and produce human readable error messages" +arch=('any') +url="https://github.com/asottile/cfgv" +license=('MIT') +depends=('python') +makedepends=('python-setuptools') +checkdepends=('python-pytest') +# pypi sdist tarballs don't contain tests: +# https://github.com/asottile/cfgv/issues/23 +# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +source=("${_name}-${pkgver}.tar.gz::https://github.com/asottile/${_name}/archive/v${pkgver}.tar.gz") +sha512sums=('b44977920651dc24150b2d1ae9e5c912a4936acf4516fca794d7d850ba14544d9bac69e5f97706ca5151b99005466282f0e9b837637d8c9e71abc635b37508b0') + +prepare() { + mv -v "${_name}-${pkgver}" "$pkgname-$pkgver" +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver" + export PYTHONPATH="build:${PYTHONPATH}" + pytest -v +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" +}