summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-whoosh/PKGBUILD
blob: 643da0d6eb27093e888755fcc29adeb669aad359 (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
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Samuel Littley <aur@toastwaffle.com>
# Contributor: rnons <remotenonsense at gmail dot com>

pkgbase=python-whoosh
pkgname=(python-whoosh python2-whoosh)
pkgver=2.7.4
pkgrel=2
pkgdesc="Fast, pure-Python full text indexing, search, and spell checking library"
arch=('any')
url="http://bitbucket.org/mchaput/whoosh/wiki/Home"
license=("BSD")
makedepends=('python-setuptools' 'python2-setuptools' 'mercurial')
checkdepends=('python-pytest-runner' 'python2-pytest-runner')
source=("hg+https://bitbucket.org/mchaput/whoosh#tag=$pkgver")
md5sums=('SKIP')

prepare() {
  cp -a whoosh{,-py2}
}

build() {
  cd "$srcdir"/whoosh
  python setup.py build

  cd "$srcdir"/whoosh-py2
  python2 setup.py build
}

check() {
  cd "$srcdir"/whoosh
  python setup.py pytest

  cd "$srcdir"/whoosh-py2
  python2 setup.py pytest || warning "Tests failed"
}

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

  cd whoosh
  python setup.py install -O1 --root="$pkgdir"
  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}

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

  cd whoosh-py2
  python2 setup.py install -O1 --root="$pkgdir"
  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}