diff --git a/srcpkgs/python-Pygments/template b/srcpkgs/python-Pygments/template index 5245394266c..51b6f977f84 100644 --- a/srcpkgs/python-Pygments/template +++ b/srcpkgs/python-Pygments/template @@ -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 " 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} } diff --git a/srcpkgs/python-Pygments/update b/srcpkgs/python-Pygments/update index e299d00ea67..542e7125fce 100644 --- a/srcpkgs/python-Pygments/update +++ b/srcpkgs/python-Pygments/update @@ -1 +1,2 @@ ignore="*rc*" +pattern="Pygments-\K2\.5\.[0-9.]+(?=.tar)" diff --git a/srcpkgs/python3-Pygments b/srcpkgs/python3-Pygments deleted file mode 120000 index 60428a1bfb0..00000000000 --- a/srcpkgs/python3-Pygments +++ /dev/null @@ -1 +0,0 @@ -python-Pygments \ No newline at end of file diff --git a/srcpkgs/python3-Pygments/template b/srcpkgs/python3-Pygments/template new file mode 100644 index 00000000000..9289a1369e9 --- /dev/null +++ b/srcpkgs/python3-Pygments/template @@ -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 " +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} +} diff --git a/srcpkgs/python3-Pygments/update b/srcpkgs/python3-Pygments/update new file mode 100644 index 00000000000..e299d00ea67 --- /dev/null +++ b/srcpkgs/python3-Pygments/update @@ -0,0 +1 @@ +ignore="*rc*"