blob: 7917b55af745c3c32a75bbc1019d773db52c66db (
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
54
55
56
57
58
59
60
61
62
63
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-lz4
pkgver=0.9.4
_pkgname=${pkgname#py-}
pkgrel=0
pkgdesc="LZ4 Bindings for Python"
url="https://pypi.python.org/pypi/lz4"
arch="all"
license="BSD"
makedepends="python2-dev python3-dev py-setuptools lz4-dev"
checkdepends="py-nose"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2 $pkgname-tests:_tests:noarch"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
disable-failing-test.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build || return 1
python3 setup.py build || return 1
}
package() {
mkdir -p "$pkgdir"
}
_py() {
local python=$1
pkgdesc="$pkgdesc ${python#python}"
depends="$python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_tests() {
pkgdesc="$pkgdesc (tests)"
mkdir -p "$subpkgdir"/usr/share/$pkgname
mv "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
}
check() {
cd "$builddir"
# issue opened for failing test:
# https://github.com/python-lz4/python-lz4/issues/19
python setup.py test
}
sha512sums="7a4afedb137919408ab7d2ac8a8f976f265120f89e1d1f141cbd6193e50703d3b1026916ace845b61e0738c840327f71a05b938ca5ac7fd0978ec82195f14dfb lz4-0.9.4.tar.gz
6fb99988e604a3a2f72d6297d2c0596586bdf7cc66c740061c362502de04a2fe9f814708c5722874b45df6cddd14303a3920de1249ca3b98a5a8eb19bb981a04 disable-failing-test.patch"
|