blob: 74df61e4a95ed8c34adc3358af90334d331ad64f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-pygments
_pkgname=Pygments
pkgver=2.5.2
pkgrel=0
pkgdesc="A syntax highlighting package written in Python."
url="http://pygments.org/"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-doc::noarch"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-pygments" # Backwards compatibility
provides="py-pygments=$pkgver-r$pkgrel" # Backwards compatibility
build() {
python3 setup.py build
}
check() {
python3 -m pytest
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
mkdir -p "$pkgdir"/usr/bin
ln -s pygmentize "$pkgdir"/usr/bin/pygmentize-3
}
doc() {
local destdir="$subpkgdir/usr/share/doc/$pkgname"
cd "$builddir"
install -m 644 -D doc/pygmentize.1 \
"$subpkgdir"/usr/share/man/man1/pygmentize.1
mkdir -p "$destdir"
cp AUTHORS CHANGES LICENSE "$destdir"/
# Note: The documentation in the doc directory needs to be generated
# by py-sphinx
cp -R ./doc/docs/* "$destdir"/
default_doc
}
sha512sums="d6715ca26cdb68d4c771bb530b2395805025c14c78d9099b033d3410ea239c41033fb611e43e39cbaa4ac38078a09324d8cfde42269129be0a096dcc13586859 Pygments-2.5.2.tar.gz"
|