summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad33dbc3d3def472a633c7ef1b7a547d62c93daa (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
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>

pkgname=python2-singledispatch
pkgver=3.4.0.3
pkgrel=4
pkgdesc="Implementation of functools.singledispatch from Python 3.4"
arch=('any')
url="https://bitbucket.org/ambv/singledispatch"
license=('MIT')
depends=('python2' 'python2-six')
makedepends=('python2-setuptools')
source=("https://pypi.python.org/packages/source/s/singledispatch/singledispatch-$pkgver.tar.gz" license)
md5sums=('af2fc6a3d6cc5a02d0bf54d909785fcb'
         '360faaffcf297a20e20e2289af00ce07')

prepare() {
  cd "${srcdir}"/singledispatch-$pkgver

  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find "${srcdir}" -name '*.py')
}

build() {
  cd "${srcdir}"/singledispatch-$pkgver

  python2 setup.py build
}

package() {
  cd "${srcdir}"/singledispatch-$pkgver

  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1

  install -D "${srcdir}"/license "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}