1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/community/py3-sqlparse/APKBUILD
psykose deb62258ec */*: set --skip-build for python installs
this marginally increases install speed by not checking if it needs a rebuild.
also remove --prefix=/usr as it defaults to /usr already.

might break a build or two, will fix later
2023-01-10 04:19:31 +01:00

46 lines
1.2 KiB
Text

# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=py3-sqlparse
_pkgname=sqlparse
pkgver=0.4.3
pkgrel=1
pkgdesc="A non-validating SQL parser module for Python"
url="https://sqlparse.readthedocs.io/"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
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() {
python3 setup.py build
}
check() {
python3 -m pytest .
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
# Add version suffix to executable files.
local path; for path in "$pkgdir"/usr/bin/*; do
mv "$path" "$path-3"
done
mkdir -p "$pkgdir"/usr/bin
ln -s sqlformat-3 "$pkgdir"/usr/bin/sqlformat
}
sha512sums="
4061653705a7a44af4e89d370f0b21f276271f9fa75a30b8b1df278abe742e579c7f15008e65d2e1f29e0e815fd946cb9f3c35f1aa391e5698705b8c7bc0945f sqlparse-0.4.3.tar.gz
"