aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-06-02 01:14:35 -0300
committerKevin Daudt <kdaudt@alpinelinux.org>2019-06-02 20:41:55 +0000
commitd8ad38c42754e52a43e6b2e339517d6381a2a9ef (patch)
tree756b3338bef243c932574642c81b00093c25b7dc
parentcadfcf621acf96576d9b11518d6df10696fcd52b (diff)
community/py-lz4: upgrade to 2.1.9
Closes GH-8379
-rw-r--r--community/py-lz4/APKBUILD24
-rw-r--r--community/py-lz4/system-libs.patch26
-rw-r--r--community/py-lz4/system-lz4.patch27
3 files changed, 39 insertions, 38 deletions
diff --git a/community/py-lz4/APKBUILD b/community/py-lz4/APKBUILD
index 1aeb8cc76c3..85e8bd7f758 100644
--- a/community/py-lz4/APKBUILD
+++ b/community/py-lz4/APKBUILD
@@ -1,37 +1,38 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-lz4
-pkgver=2.1.2
+pkgver=2.1.9
_pkgname=${pkgname#py-}
-pkgrel=1
+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 linux-headers"
-checkdepends="py-nose"
+license="BSD-3-Clause"
+makedepends="python2-dev python3-dev py-setuptools py3-setuptools lz4-dev linux-headers"
+checkdepends="py3-pytest py3-psutil py3-pytest-cov py3-coverage"
# 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
- system-lz4.patch"
+ system-libs.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver"
prepare() {
default_prepare
rm lz4libs/lz4*.[ch]
}
+
build() {
- cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
- cd "$builddir"
python3 setup.py test
}
@@ -42,7 +43,7 @@ package() {
_py() {
local python=$1
pkgdesc="$pkgdesc ${python#python}"
- depends="$python"
+ depends="$python $depends"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
@@ -51,6 +52,7 @@ _py() {
_py2() {
replaces="$pkgname"
+ depends="py-future"
_py python2
}
@@ -65,5 +67,5 @@ _tests() {
mv "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
}
-sha512sums="f29d70f2237782c0f88d2851d2e2b07dd493aba56ff823ac7afce82c2b2ec48af2a139e341ee36b3cd76cf9a5b6ff2d02cc2246b68079823c018c2dcfb658379 lz4-2.1.2.tar.gz
-bfd746ae77169f4b963a386816f8480f817587535415144f3a716a00ad22f18db3dfde5b2bbe69892d2298e19453a88531eec90b72fca13961f404555de41b8b system-lz4.patch"
+sha512sums="e700e46ee873743f1e195ed8b5c6405a2535abf9f3d378e7d082e92e95ab9e00f5b93bfbe1634d504d1f293dd449ed280d6b6dc5c595d8fab87eefd6781ee99f lz4-2.1.9.tar.gz
+32928c49a6231106fbd7c73a1931c158a9d943132a22217e5f80ea0c20cc4a7259d9aca7dc5f7961b65e7e1e64f5740fd963f67d5078ebd9dec022fcbafa6181 system-libs.patch"
diff --git a/community/py-lz4/system-libs.patch b/community/py-lz4/system-libs.patch
new file mode 100644
index 00000000000..e746ac02412
--- /dev/null
+++ b/community/py-lz4/system-libs.patch
@@ -0,0 +1,26 @@
+diff --git a/setup.py b/setup.py
+index 9fa3131..ad2f6a3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,8 +10,8 @@ PY3C_REQUIRED_VERSION = '>= 1.0'
+
+ # Check to see if we have a lz4 and py3c libraries installed on the system, and
+ # of suitable versions, and use if so. If not, we'll use the bundled libraries.
+-liblz4_found = False
++liblz4_found = True
+ py3c_found = False
+ try:
+ from pkgconfig import installed as pkgconfig_installed
+ from pkgconfig import cflags as pkgconfig_cflags
+@@ -95,9 +95,7 @@ if compiler == 'msvc':
+ extra_compile_args = ['/Ot', '/Wall', '/wd4711', '/wd4820']
+ 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')
+ else:
+ extra_compile_args = [
+ '-O3',
+
diff --git a/community/py-lz4/system-lz4.patch b/community/py-lz4/system-lz4.patch
deleted file mode 100644
index 7a7ef828c78..00000000000
--- a/community/py-lz4/system-lz4.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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',