python-pygments: port to build/installer
This commit is contained in:
@@ -4,13 +4,18 @@ _pyname=Pygments
|
||||
pkgbase="python-pygments"
|
||||
pkgname=("python-pygments")
|
||||
pkgver=2.13.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A syntax highlighting engine written in Python"
|
||||
arch=("i686" "x86_64")
|
||||
url="http://pygments.org/"
|
||||
license=('BSD')
|
||||
license=('spdx:BSD-2-Clause')
|
||||
depends=("python")
|
||||
makedepends=("python-setuptools")
|
||||
makedepends=(
|
||||
"python-setuptools"
|
||||
"python-wheel"
|
||||
"python-build"
|
||||
"python-installer"
|
||||
)
|
||||
provides=("python3-pygments")
|
||||
conflicts=("python3-pygments")
|
||||
replaces=("python3-pygments")
|
||||
@@ -26,10 +31,16 @@ prepare () {
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${_pyname}-${pkgver}"
|
||||
|
||||
python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
package () {
|
||||
cd "${_pyname}-${pkgver}"
|
||||
|
||||
/usr/bin/python setup.py install --root="${pkgdir}" -O1
|
||||
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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user