2024-10-18 18:03:52 +00:00

49 lines
1.2 KiB
Plaintext

# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=py3-sqlparse
_pkgname=sqlparse
pkgver=0.5.1
pkgrel=0
pkgdesc="A non-validating SQL parser module for Python"
url="https://sqlparse.readthedocs.io/"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="
py3-hatchling
py3-gpep517
"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-sqlparse" # Backwards compatibility
provides="py-sqlparse=$pkgver-r$pkgrel" # Backwards compatibility
# secfixes:
# 0.4.2-r0:
# - CVE-2021-32839
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
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
5d93e942d6a26a544827a877cb2035328f406dc8e8475e217ba75571672b6c5eaca6f87c2c76244c0dea32449c818fcca9bb8fff53679e6f0ba2bef2a6b92b6f sqlparse-0.5.1.tar.gz
"