summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e94541ca3d6452a51bea03900ad803ce4fe84a36 (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
# Maintainer: Vladimir Gorbunov <truedaemon@gmail.com>
pkgname=python-tkvdb
_name=${pkgname//-/_}
pkgver=0.2.3
pkgrel=1
pkgdesc="Cython wrapper for tkvdb radix trie key-value database"
arch=('x86_64')
url="https://github.com/vladimir-g/python-tkvdb/"
license=('ISC')
depends=('python')
makedepends=('python-setuptools')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/p/${_name}/${_name}-$pkgver.tar.gz")
sha256sums=('0338c3b84a1faac09c4fe0edae484aeb609798d29d639215b28e70c733f7de79')

build() {
    cd "$srcdir/${_name}-$pkgver"
    python setup.py build
}

package() {
    cd "$srcdir/${_name}-$pkgver"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

check() {
    cd "$srcdir/${_name}-$pkgver"
    local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
    PYTHONDONTWRITEBYTECODE=1 PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" python -B -m unittest
}