50 lines
1.3 KiB
Plaintext

# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-sqlalchemy-utils
_pkgname=sqlalchemy-utils
pkgver=0.42.1
pkgrel=1
pkgdesc="Various utility functions and custom data types for SQLAlchemy"
url="https://sqlalchemy-utils.readthedocs.io/"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-sqlalchemy"
makedepends="
py3-gpep517
py3-setuptools
py3-wheel
"
checkdepends="
py3-pytest
py3-flexmock
py3-psycopg2
py3-pymysql
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kvesteri/sqlalchemy-utils/archive/refs/tags/$pkgver.tar.gz"
# Many checks require test database
# TODO: Figure out how to create user-space pgsql test db
options="!check"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
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 -v
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
26c7e0287c5dd3d7c74fd764caa9d7e2afed2f03f2efec7cc22bed34997b764fbd03c92a82d14e627593eaf5457a8849f5f2e0e7df59a84d40f20e7597f182f5 py3-sqlalchemy-utils-0.42.1.tar.gz
"