diff --git a/srcpkgs/python-Pygments/template b/srcpkgs/python-Pygments/template index eb87ee46283..ff588ce6c5f 100644 --- a/srcpkgs/python-Pygments/template +++ b/srcpkgs/python-Pygments/template @@ -1,9 +1,10 @@ # Template file for 'python-Pygments' pkgname=python-Pygments -version=2.0.2 +version=2.1 revision=1 noarch=yes wrksrc="Pygments-${version}" +build_style=python-module python_versions="2.7 3.4" hostmakedepends="python-setuptools python3.4-setuptools" depends="python-setuptools" @@ -11,35 +12,14 @@ pycompile_module="pygments" short_desc="Python2 syntax highlighter" maintainer="Juan RP " homepage="http://pygments.org/" -license="BSD" +license="2-clause-BSD" distfiles="${PYPI_SITE}/P/Pygments/Pygments-${version}.tar.gz" -checksum=7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51 +checksum=13a0ef5fafd7b16cf995bc28fe7aab0780dab1b2fda0fc89e033709af8b8a47b -post_extract() { - cp -a ${wrksrc} /tmp/python2.7-build - cp -a ${wrksrc} /tmp/python3.4-build - mv /tmp/python{2.7,3.4}-build ${wrksrc} -} - -pre_build() { - cd ${wrksrc}/python3.4-build - sed -i 's,pygmentize ,pygmentize3 ,' setup.py -} - -do_build() { - cd ${wrksrc}/python2.7-build - python setup.py build - - cd ${wrksrc}/python3.4-build - python3.4 setup.py build -} - -do_install() { - cd ${wrksrc}/python2.7-build - python setup.py install --root=${DESTDIR} - - cd ${wrksrc}/python3.4-build - python3.4 setup.py install --root=${DESTDIR} +post_install() { + cp -f ${DESTDIR}/usr/bin/pygmentize{,3.4} + replace_interpreter python ${DESTDIR}/usr/bin/pygmentize + vlicense LICENSE } python3.4-Pygments_package() { @@ -49,7 +29,8 @@ python3.4-Pygments_package() { pycompile_module="pygments" short_desc="${short_desc/Python2/Python3.4}" pkg_install() { - vmove usr/bin/pygmentize3 + vmove usr/bin/pygmentize3.4 vmove usr/lib/python3.4 + vlicense LICENSE } }