38 lines
1.3 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Sebastien Leduc <sebastien@sleduc.fr>
# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
pkgname=python-prettytable
pkgver=3.11.0
pkgrel=2
pkgdesc="A simple Python library for easily displaying tabular data"
url="https://github.com/jazzband/prettytable"
arch=(any)
license=('BSD')
depends=('python-wcwidth')
makedepends=('git' 'python-build' 'python-installer' 'python-hatchling' 'python-hatch-vcs')
checkdepends=('python-pytest-lazy-fixtures')
conflicts=('python-ptable')
source=("git+https://github.com/jazzband/prettytable.git#tag=$pkgver")
sha512sums=('fac6125f7e85eb267597c56d3a255b6f04f1ee99c0f6f19b43cb9d42a88c9f963cc224c2b158bb8984d2551ef79152e80dc13d7c12c33196ea325f9b4ea25178')
build() {
cd prettytable
python -m build -nw
}
check() {
cd prettytable
python -m installer --destdir="$PWD/tmp_install" dist/*.whl
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
PYTHONPATH="$PWD/tmp_install/$site_packages" pytest
}
package() {
cd prettytable
python -m installer -d "$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}