summaryrefslogtreecommitdiff
path: root/community/python-levenshtein/PKGBUILD
blob: f38df5c3f5b5678bfba3cc30c5a129b368e5ce63 (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
# $Id: PKGBUILD 104954 2014-01-28 15:04:34Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>
# Contributor: shamrok <szamrok@gmail.com>
# Contributor: scj <scj archlinux us>

pkgbase=python-levenshtein
pkgname=(python-levenshtein python2-levenshtein)
pkgver=0.11.1
pkgrel=2
pkgdesc="Python extension for computing string edit distances and similarities"
url="http://pypi.python.org/pypi/python-Levenshtein/"
license=("GPL")
arch=('i686' 'x86_64')
makedepends=('python-setuptools' 'python2-setuptools')
source=("http://pypi.python.org/packages/source/p/python-Levenshtein/python-Levenshtein-$pkgver.tar.gz")

prepare() {
  cp -r python-Levenshtein-$pkgver python2-Levenshtein-$pkgver

  cd python-Levenshtein-$pkgver
  sed -i "s|[)].read|, encoding='utf8').read|" setup.py
}

package_python-levenshtein() {
  depends=('python')

  cd python-Levenshtein-$pkgver
  python setup.py build install -O1 --prefix=/usr --root="$pkgdir"
}

package_python2-levenshtein() {
  depends=('python2')

  cd python2-Levenshtein-$pkgver
  python2 setup.py build install -O1 --prefix=/usr --root="$pkgdir"
}

sha512sums=('335f29253ec7bba8d54881dfe093ac194626cdaad0cc6ed08327917d6187cdfe1fbb3d003744f991587f8dc800aa1d361e3aa0b276b31ecfe7a43d83ea0d660b')