Files
MSYS2-packages/python-pygments/PKGBUILD
2023-08-10 08:40:55 +02:00

47 lines
1.2 KiB
Bash

# Maintainer: João Guerra <joca.bt@gmail.com>
_pyname=Pygments
pkgbase="python-pygments"
pkgname=("python-pygments")
pkgver=2.16.1
pkgrel=1
pkgdesc="A syntax highlighting engine written in Python"
arch=("i686" "x86_64")
url="https://pygments.org/"
license=('spdx:BSD-2-Clause')
depends=("python")
makedepends=(
"python-setuptools"
"python-wheel"
"python-build"
"python-installer"
)
provides=("python3-pygments")
conflicts=("python3-pygments")
replaces=("python3-pygments")
source=("https://pypi.python.org/packages/source/P/Pygments/Pygments-${pkgver}.tar.gz")
noextract=("Pygments-${pkgver}.tar.gz")
sha256sums=('1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29')
prepare () {
# workaround for symlink issue
tar -xf ${_pyname}-${pkgver}.tar.gz || true
cp ${_pyname}-${pkgver}/scripts/debug_lexer.py \
${_pyname}-${pkgver}/scripts/find_error.py
}
build() {
cd "${_pyname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package () {
cd "${_pyname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 external/pygments.bashcomp "${pkgdir}/usr/share/bash-completion/completions/pygmentize"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}