desktop/python2-singledispatch/PKGBUILD
2016-03-18 13:42:09 +01:00

35 lines
934 B
Bash

pkgname=python2-singledispatch
pkgver=3.4.0.3
pkgrel=2
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)
sha1sums=('f93241b06754a612af8bb7aa208c4d1805637022'
'be310c56486206cc0a7595cdd0f993cfa033dbef')
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"
}