mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 22:07:19 +02:00
community/py-lz4: force use of system lz4
also run tests for python3 instead of python2
This commit is contained in:
parent
008b78c9d4
commit
c35b486b7f
@ -3,7 +3,7 @@
|
|||||||
pkgname=py-lz4
|
pkgname=py-lz4
|
||||||
pkgver=0.17.0
|
pkgver=0.17.0
|
||||||
_pkgname=${pkgname#py-}
|
_pkgname=${pkgname#py-}
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="LZ4 Bindings for Python"
|
pkgdesc="LZ4 Bindings for Python"
|
||||||
url="https://pypi.python.org/pypi/lz4"
|
url="https://pypi.python.org/pypi/lz4"
|
||||||
arch="all"
|
arch="all"
|
||||||
@ -16,9 +16,14 @@ if [ "$CARCH" = "s390x" ]; then
|
|||||||
options="!check"
|
options="!check"
|
||||||
fi
|
fi
|
||||||
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2 $pkgname-tests:_tests:noarch"
|
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"
|
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
|
||||||
|
system-lz4.patch"
|
||||||
builddir="$srcdir/$_pkgname-$pkgver"
|
builddir="$srcdir/$_pkgname-$pkgver"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
rm lz4libs/lz4*.[ch]
|
||||||
|
}
|
||||||
build() {
|
build() {
|
||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
python2 setup.py build
|
python2 setup.py build
|
||||||
@ -27,7 +32,7 @@ build() {
|
|||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
python2 setup.py test
|
python3 setup.py test
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
@ -60,4 +65,5 @@ _tests() {
|
|||||||
mv "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
|
mv "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="29af6839733cd57ee607e7e608a1aa2ab8c99aeb494b415af35ecad4efe26b1809a56a35dce045f1425043ebc9313fd99dcc81a1ac6d572b52d6debd14451207 lz4-0.17.0.tar.gz"
|
sha512sums="29af6839733cd57ee607e7e608a1aa2ab8c99aeb494b415af35ecad4efe26b1809a56a35dce045f1425043ebc9313fd99dcc81a1ac6d572b52d6debd14451207 lz4-0.17.0.tar.gz
|
||||||
|
bfd746ae77169f4b963a386816f8480f817587535415144f3a716a00ad22f18db3dfde5b2bbe69892d2298e19453a88531eec90b72fca13961f404555de41b8b system-lz4.patch"
|
||||||
|
27
community/py-lz4/system-lz4.patch
Normal file
27
community/py-lz4/system-lz4.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 19b50f0..9302e4d 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -50,6 +50,8 @@ lz4frame_sources = [
|
||||||
|
'lz4/frame/_frame.c'
|
||||||
|
]
|
||||||
|
|
||||||
|
+liblz4_found = True
|
||||||
|
+
|
||||||
|
if liblz4_found is True:
|
||||||
|
libraries.append('lz4')
|
||||||
|
else:
|
||||||
|
@@ -86,9 +88,10 @@ if compiler == 'msvc':
|
||||||
|
extra_compile_args = ['/Ot', '/Wall']
|
||||||
|
elif compiler in ('unix', 'mingw32'):
|
||||||
|
if liblz4_found:
|
||||||
|
- extra_link_args.append(pkgconfig.libs('liblz4'))
|
||||||
|
- if pkgconfig.cflags('liblz4'):
|
||||||
|
- extra_compile_args.append(pkgconfig.cflags('liblz4'))
|
||||||
|
+ extra_link_args.append('-llz4')
|
||||||
|
+# extra_link_args.append(pkgconfig.libs('liblz4'))
|
||||||
|
+# if pkgconfig.cflags('liblz4'):
|
||||||
|
+# extra_compile_args.append(pkgconfig.cflags('liblz4'))
|
||||||
|
else:
|
||||||
|
extra_compile_args = [
|
||||||
|
'-O3',
|
Loading…
Reference in New Issue
Block a user