# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Jonathan Kotta <jpkotta AT gmail DOT com>

pkgname=python-sqlparse
pkgver=0.5.3
pkgrel=1
pkgdesc='Non-validating SQL parser for Python'
arch=('any')
url=https://github.com/andialbrecht/sqlparse
license=('BSD')
depends=('python')
makedepends=('python-setuptools' 'python-flit-core' 'python-build' 'python-installer' 'python-wheel' 'python-hatchling')
source=("$pkgname-$pkgver.tar.gz::https://github.com/andialbrecht/sqlparse/archive/$pkgver.tar.gz")
sha256sums=('86434381e1144b72a8b22860e00db95efaba34ebfeb07922686128c6a3bb652f')

build() {
  cd sqlparse-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd sqlparse-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
