summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-pygments/PKGBUILD
blob: fa1e57270f257fe3a5e4c520d4142186132c02b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $Id$
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Timm Preetz <timm@preetz.us>

pkgname=('python2-pygments')
pkgver=1.6
pkgrel=3
pkgdesc="Python syntax highlighter"
arch=('any')
url="http://pygments.org/"
license=('BSD')
makedepends=('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
}

#package_python-pygments() {
#  depends=('python-setuptools')
#  install=python-pygments.install

#  cd "$srcdir/python3-build"

#  python3 setup.py install --root="$pkgdir" -O1

  # pygmentize has been moved to the python2-pygments package
#  rm "$pkgdir/usr/bin/pygmentize"

#  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
#}

package_python2-pygments() {
  depends=('python2-setuptools')

  cd "$srcdir/python2-build"

  python2 setup.py install --root="$pkgdir" -O1

  install -Dm644 external/pygments.bashcomp \
    "$pkgdir/usr/share/bash-completion/completions/pygmentize"

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: