python-Pygments: split package

New package: python3-Pygments-2.7.2

Support for Python 2.7 was dropped in Pygments 2.6.1.
This commit is contained in:
Andrew J. Hesford 2020-10-26 10:07:55 -04:00
parent 355c534867
commit 6048f6161c
5 changed files with 34 additions and 19 deletions

View file

@ -1,12 +1,12 @@
# Template file for 'python-Pygments'
pkgname=python-Pygments
version=2.5.2
revision=3
revision=4
wrksrc="Pygments-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
checkdepends="python-nose python3-nose"
build_style=python2-module
hostmakedepends="python-setuptools"
depends="python"
checkdepends="python-pytest"
short_desc="Python2 syntax highlighter"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="BSD-2-Clause"
@ -16,21 +16,10 @@ checksum=98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe
alternatives="pygments:pygmentize:/usr/bin/pygmentize2"
do_check() {
python2 tests/run.py
python3 tests/run.py
python2 -m pytest
}
post_install() {
vlicense LICENSE
}
python3-Pygments_package() {
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="pygments:pygmentize:/usr/bin/pygmentize3"
pkg_install() {
vmove usr/bin/pygmentize3
vmove usr/lib/python3*
vlicense LICENSE
}
mv ${DESTDIR}/usr/bin/pygmentize{,2}
}

View file

@ -1 +1,2 @@
ignore="*rc*"
pattern="Pygments-\K2\.5\.[0-9.]+(?=.tar)"

View file

@ -1 +0,0 @@
python-Pygments

View file

@ -0,0 +1,25 @@
# Template file for 'python3-Pygments'
pkgname=python3-Pygments
version=2.7.2
revision=1
wrksrc="Pygments-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3"
checkdepends="python3-pytest"
short_desc="Generic syntax highlighter written in Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-2-Clause"
homepage="https://pygments.org"
distfiles="${PYPI_SITE}/P/Pygments/Pygments-${version}.tar.gz"
checksum=381985fcc551eb9d37c52088a32914e00517e57f4a21609f48141ba08e193fa0
alternatives="pygments:pygmentize:/usr/bin/pygmentize3"
do_check() {
python3 -m pytest
}
post_install() {
vlicense LICENSE
mv ${DESTDIR}/usr/bin/pygmentize{,3}
}

View file

@ -0,0 +1 @@
ignore="*rc*"