blob: 5e413f0928903561015ead63efab8baa30cea8f8 (
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
64
65
66
67
68
69
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-lz4
pkgver=0.10.1
_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"
# FIXME: check fails on s390x
if [ "$CARCH" = "s390x" ]; then
options="!check"
fi
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="538880742257e08b027c45c33aa29e12d7303826f63817d1f6d316ea9b69dfb20710a4f573499ce141cffd12fbac701305405521cb815e2329333934e7e1f2c9 lz4-0.10.1.tar.gz
6fb99988e604a3a2f72d6297d2c0596586bdf7cc66c740061c362502de04a2fe9f814708c5722874b45df6cddd14303a3920de1249ca3b98a5a8eb19bb981a04 disable-failing-test.patch"
|