diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-01-14 21:59:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-01-14 22:04:02 +0000 |
commit | c35b486b7f92a694ac2bae92d97c0e09e6a521a7 (patch) | |
tree | 6f7cb0059f24028fac0a6267a9a6d9014a7e39df /community/py-lz4 | |
parent | 008b78c9d43bb82d09cd369f04866d6bfa886af0 (diff) | |
download | aports-c35b486b7f92a694ac2bae92d97c0e09e6a521a7.tar.bz2 aports-c35b486b7f92a694ac2bae92d97c0e09e6a521a7.tar.xz |
community/py-lz4: force use of system lz4
also run tests for python3 instead of python2
Diffstat (limited to 'community/py-lz4')
-rw-r--r-- | community/py-lz4/APKBUILD | 14 | ||||
-rw-r--r-- | community/py-lz4/system-lz4.patch | 27 |
2 files changed, 37 insertions, 4 deletions
diff --git a/community/py-lz4/APKBUILD b/community/py-lz4/APKBUILD index 89550106fb..c319784505 100644 --- a/community/py-lz4/APKBUILD +++ b/community/py-lz4/APKBUILD @@ -3,7 +3,7 @@ pkgname=py-lz4 pkgver=0.17.0 _pkgname=${pkgname#py-} -pkgrel=0 +pkgrel=1 pkgdesc="LZ4 Bindings for Python" url="https://pypi.python.org/pypi/lz4" arch="all" @@ -16,9 +16,14 @@ 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" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + system-lz4.patch" builddir="$srcdir/$_pkgname-$pkgver" +prepare() { + default_prepare + rm lz4libs/lz4*.[ch] +} build() { cd "$builddir" python2 setup.py build @@ -27,7 +32,7 @@ build() { check() { cd "$builddir" - python2 setup.py test + python3 setup.py test } package() { @@ -60,4 +65,5 @@ _tests() { 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" diff --git a/community/py-lz4/system-lz4.patch b/community/py-lz4/system-lz4.patch new file mode 100644 index 0000000000..7a7ef828c7 --- /dev/null +++ b/community/py-lz4/system-lz4.patch @@ -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', |