# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-asyncpg
_pyname=asyncpg
pkgver=0.18.3
pkgrel=0
pkgdesc="An asyncio PostgreSQL driver"
url="https://github.com/MagicStack/asyncpg"
arch="all"
license="Apache-2.0"
makedepends="python3-dev py3-setuptools cython cython-dev"
checkdepends="postgresql postgresql-contrib postgresql-dev"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
replaces="py-asyncpg"
builddir="$srcdir"/$_pyname-$pkgver
build() {
python3 setup.py build
}
check() {
# https://github.com/MagicStack/asyncpg/pull/399
# Fixed in next version
cat >.flake8 <<-EOF
[flake8]
ignore = E402,E731
exclude = .git,__pycache__,build,dist,.eggs,.github,.local
EOF
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="695774aca0847a1ab2bc1a4ec052a6c241aac127ff8fd9d013f95483e93512320458e60eb8d6e9b3d5a4f8e7b0975251a5cafb8d96ba5efcf8f9042d82b235b6 asyncpg-0.18.3.tar.gz"