Files
python-pygments/PKGBUILD
LemonPie 55e82cf00f
All checks were successful
packages/python-pygments/pipeline/head This commit looks good
[world-gremlins] 'python-pygments-2.20.0-1' add
2026-03-29 21:02:39 +00:00

58 lines
1.5 KiB
Bash

# Maintainer: Evangelos Foutras <[email protected]>
# Maintainer: Carl Smedstad <[email protected]>
# Contributor: Timm Preetz <[email protected]>
pkgname=python-pygments
pkgver=2.20.0
pkgrel=1
pkgdesc="Python syntax highlighter"
arch=('any')
url="https://pygments.org/"
license=('BSD-2-Clause')
depends=('python')
makedepends=(
'python-build'
'python-hatchling'
'python-installer'
'python-setuptools'
'python-sphinx'
'python-wcag-contrast-ratio'
'python-wheel'
)
checkdepends=(
'python-lxml'
'python-pytest'
)
provides=('pygmentize')
conflicts=('pygmentize')
replaces=('pygmentize')
source=("https://github.com/pygments/pygments/archive/$pkgver/$pkgname-$pkgver.tar.gz")
b2sums=('e9d6d5f21cb02c14ee38410aa88106002ae7bdf726f04bacf67b3971c07f65377f735c27e4a97fb9270fa5a4b9c468d7b5ae1dad7f18d47ba4ad76370097718c')
build() {
cd ${pkgname#python-}-$pkgver
python -m build --wheel --no-isolation
make -C doc html
}
check() {
cd ${pkgname#python-}-$pkgver
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest
}
package() {
cd ${pkgname#python-}-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
mkdir -vp "$pkgdir/usr/share/doc"
cp -vrT doc/_build/html "$pkgdir/usr/share/doc/$pkgname"
install -vDm644 doc/pygmentize.1 -t "$pkgdir/usr/share/man/man1"
install -vDm644 external/pygments.bashcomp \
"$pkgdir/usr/share/bash-completion/completions/pygmentize"
}
# vim:set ts=2 sw=2 et: