47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
# Maintainer: João Guerra <joca.bt@gmail.com>
|
|
|
|
_pyname=Pygments
|
|
pkgbase="python-pygments"
|
|
pkgname=("python-pygments")
|
|
pkgver=2.13.0
|
|
pkgrel=2
|
|
pkgdesc="A syntax highlighting engine written in Python"
|
|
arch=("i686" "x86_64")
|
|
url="http://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=('56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1')
|
|
|
|
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"
|
|
}
|