diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-30 12:57:05 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-30 12:57:05 +0000 |
commit | 101d242c93747c77b050f5db2538d92f7408ac3a (patch) | |
tree | 0a0974c6bfff98ae371e49fc39db7e0b7d3ecdd4 | |
parent | 3ce79ff981ccd67e8876352f9f8cc4db78b573a4 (diff) | |
parent | 03069278417dec5d230555f1d26884435aab112a (diff) | |
download | packages-101d242c93747c77b050f5db2538d92f7408ac3a.tar.gz packages-101d242c93747c77b050f5db2538d92f7408ac3a.tar.bz2 packages-101d242c93747c77b050f5db2538d92f7408ac3a.tar.xz packages-101d242c93747c77b050f5db2538d92f7408ac3a.zip |
Merge branch 'add-pygments' into 'master'
user/py3-pygments: new package
Pygments is useful for cgit, Pelican, and basically anything else that's Python and involves code highlighting. Works with cgit's default code highlighting ootb.
I left the `check()` function there despite us missing nose and flake8 since we'll need that call to `sed` once we do ship them.
See merge request !118
-rw-r--r-- | user/py3-pygments/APKBUILD | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/user/py3-pygments/APKBUILD b/user/py3-pygments/APKBUILD new file mode 100644 index 000000000..59055ed48 --- /dev/null +++ b/user/py3-pygments/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Peter Bui <pnutzh4x0r@gmail.com> +# Contributor: Matt Smith <mcs@darkregion.net> +# Maintainer: zlg <zlg+packages@zlg.space> +pkgname=py3-pygments +_pkgname=Pygments +pkgver=2.2.0 +pkgrel=0 +pkgdesc="A syntax highlighting package written in Python." +url="http://pygments.org/" +arch="noarch" +options="!check" # needs nose, flake8 +license="BSD-2-Clause" +depends="python3" +makedepends="python3-dev" +subpackages="" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python3 setup.py build +} + +# Reactivate once nose and flake8 are packaged +check() { + cd "$builddir" + sed -i -e 's:python:python3:' Makefile + make test +} + +package() { + cd "$builddir" + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +doc() { + cd "$builddir" + install -m 644 -D doc/pygmentize.1 "$pkgdir"/usr/share/man/man1/pygmentize.1 +} + +sha512sums="cc0a4f73e19fa6cbf46314de2e809460c807c631e39ba05cbe5edb5f40db1a687aafcd9715585a0ed45f791710eb6038305e273f282f8682df76f30e63710b29 Pygments-2.2.0.tar.gz" |