aports/community/py3-pgspecial/APKBUILD

38 lines
1.2 KiB
Text

# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: omni <omni+alpine@hack.org>
maintainer="omni <omni+alpine@hack.org>"
pkgname=py3-pgspecial
pkgver=2.2.1
pkgrel=0
pkgdesc="Meta-commands handler for Postgres Database"
url="https://pypi.org/project/pgspecial"
arch="noarch"
license="BSD-3-Clause"
depends="py3-click py3-psycopg-c py3-sqlparse"
makedepends="py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest py3-configobj"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dbcli/pgspecial/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pgspecial-$pkgver"
replaces="py-pgspecial" # Backwards compatibility
provides="py-pgspecial=$pkgver-r$pkgrel" # Backwards compatibility
build() {
export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"
gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" .dist/*.whl
}
sha512sums="
2a3abefb0f1cf7e3bb228d473273d713881e975648d4f9515b62ca908085cc87942bccca18536a057e9445d447bcd4a1d0b094d6439684aa15cb58615fe7bf9e py3-pgspecial-2.2.1.tar.gz
"