# Template file for 'python-Pygments'
pkgname=python-Pygments
version=2.4.2
revision=2
archs=noarch
wrksrc="Pygments-${version}"
build_style=python-module
pycompile_module="pygments"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
checkdepends="python-nose python3-nose"
short_desc="Python2 syntax highlighter"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="BSD-2-Clause"
homepage="http://pygments.org/"
distfiles="${PYPI_SITE}/P/Pygments/Pygments-${version}.tar.gz"
checksum=881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297
alternatives="pygments:pygmentize:/usr/bin/pygmentize2"

do_check() {
	python2 tests/run.py
	python3 tests/run.py
}

post_install() {
	vlicense LICENSE
}

python3-Pygments_package() {
	archs=noarch
	depends="python3-setuptools"
	pycompile_module="pygments"
	short_desc="${short_desc/Python2/Python3}"
	alternatives="pygments:pygmentize:/usr/bin/pygmentize3"
	pkg_install() {
		vmove usr/bin/pygmentize3
		vmove usr/lib/python3*
		vlicense LICENSE
	}
}
