diff options
Diffstat (limited to 'abs/core/python_modules/python-pygments/PKGBUILD')
-rw-r--r-- | abs/core/python_modules/python-pygments/PKGBUILD | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/abs/core/python_modules/python-pygments/PKGBUILD b/abs/core/python_modules/python-pygments/PKGBUILD index fa1e572..37fe169 100644 --- a/abs/core/python_modules/python-pygments/PKGBUILD +++ b/abs/core/python_modules/python-pygments/PKGBUILD @@ -2,51 +2,58 @@ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Timm Preetz <timm@preetz.us> -pkgname=('python2-pygments') -pkgver=1.6 -pkgrel=3 +pkgname=('python-pygments' 'python2-pygments' 'pygmentize') +pkgver=2.2.0 +pkgrel=1 pkgdesc="Python syntax highlighter" arch=('any') url="http://pygments.org/" license=('BSD') -makedepends=('python2-setuptools') +makedepends=('python-setuptools' 'python2-setuptools') options=('!emptydirs') -source=(http://pypi.python.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz) -sha256sums=('799ed4caf77516e54440806d8d9cd82a7607dfdf4e4fb643815171a4b5c921c0') - -build() { - cd "$srcdir" - - rm -rf python{2,3}-build - for builddir in python2-build; do - cp -r Pygments-$pkgver $builddir - pushd $builddir - ${builddir%-build} setup.py build - popd - done -} +source=(https://pypi.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz) +sha256sums=('dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc') -#package_python-pygments() { -# depends=('python-setuptools') -# install=python-pygments.install +package_python-pygments() { + depends=('python-setuptools') -# cd "$srcdir/python3-build" + cd "$srcdir/Pygments-$pkgver" -# python3 setup.py install --root="$pkgdir" -O1 + python3 setup.py install --root="$pkgdir" -O1 - # pygmentize has been moved to the python2-pygments package -# rm "$pkgdir/usr/bin/pygmentize" + # pygmentize is shipped in its own package + rm "$pkgdir/usr/bin/pygmentize" -# install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -#} + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} package_python2-pygments() { depends=('python2-setuptools') + install=python2-pygments.install - cd "$srcdir/python2-build" + cd "$srcdir/Pygments-$pkgver" python2 setup.py install --root="$pkgdir" -O1 + # pygmentize is shipped in its own package + rm "$pkgdir/usr/bin/pygmentize" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_pygmentize() { + depends=('python-pygments') + + cd "$srcdir/Pygments-$pkgver" + + python3 setup.py install --root="$pkgdir" -O1 + + # Remove all files except for usr/bin/pygmentize + find "$pkgdir" -type f -not -name pygmentize -delete + + # Drop version dependency from console script + sed -i "s/Pygments==$pkgver/Pygments/g" "$pkgdir/usr/bin/pygmentize" + install -Dm644 external/pygments.bashcomp \ "$pkgdir/usr/share/bash-completion/completions/pygmentize" |