# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=py3-sqlglot
pkgver=25.29.0
pkgrel=0
pkgdesc="Python SQL Parser and Transpiler"
url="https://github.com/tobymao/sqlglot"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
options="!check"
# tests are included in the github release tarball but seem to require
# additional aports to be added, see requirements.txt
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/s/sqlglot/sqlglot-$pkgver.tar.gz"
builddir="$srcdir/sqlglot-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
232feafb2c6a8e37c50398ca7f4739e02feecf175740d8d5d164c28737a6c69b7a0a01cb1754e5520bcc6a0013f4798bdcaae29a8be564f3a9a6250ca057fa58  sqlglot-25.29.0.tar.gz
"
