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.14.0
|
|
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=('b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297')
|
|
|
|
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"
|
|
}
|