X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id B6894DCB71B for ; Sun, 24 Apr 2016 23:23:22 +0000 (UTC) Received: from baboon.maple.relay.mailchannels.net (baboon.maple.relay.mailchannels.net [23.83.214.8]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 608E1DC24D3 for ; Sun, 24 Apr 2016 23:23:22 +0000 (UTC) X-Sender-Id: mxroute|x-authuser|developer@it-offshore.co.uk Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2D26140EA for ; Sun, 24 Apr 2016 23:23:21 +0000 (UTC) Received: from ocean.mxroute.com (ip-10-21-3-36.us-west-2.compute.internal [10.21.3.36]) by relay.mailchannels.net (Postfix) with ESMTPA id C1F47AD629 for ; Sun, 24 Apr 2016 23:23:20 +0000 (UTC) X-Sender-Id: mxroute|x-authuser|developer@it-offshore.co.uk Received: from ocean.mxroute.com ([TEMPUNAVAIL]. [10.213.1.241]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.6.11); Sun, 24 Apr 2016 23:23:21 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: mxroute|x-authuser|developer@it-offshore.co.uk X-MailChannels-Auth-Id: mxroute X-MC-Loop-Signature: 1461540201016:1059943043 X-MC-Ingress-Time: 1461540201015 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=it-offshore.co.uk; s=default; h=References:In-Reply-To:Message-Id:Date: Subject:To:From; bh=ylkPyNDsG2RdgWLFoh4UznGz6c6dUXPBdWQvrJTi8Ko=; b=n5gEdXFvG MCJEQ6FUUgN5DDyz0ybVZi2zJ+GbC2sNt+dA70v20KOBnObd2FZHW3Ss5FgqtNc4qxN5ZiALkXaqs ZSzNsHe+Ss/2dyryfrpFEK5dcsTq4ziGLgSqRlvKys6A9sfxYztXUAdv2B8kauEjfZoztclQBzlLd nulH9nyMV1gyA9M4HxDCuqvLZ3/LkVXctllIlr2SNzW/rVbHQ58V4TzzPFeyCNs5hXfhTvvv9L9+m qgi9owj2CPTDyVIeUsAqkeK7HwtpNuigIGxE2Vps+r7accA6XJqztrF04zm0hWQGNgNAm1IMjC5v+ O+GR4d1WPg84otAZyEow5xOBQ==; Received: from [81.4.121.188] (port=35329 helo=localhost.localdomain) by ocean.mxroute.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.86_1) (envelope-from ) id 1auTN1-0007yB-H4 for alpine-aports@lists.alpinelinux.org; Sun, 24 Apr 2016 19:23:19 -0400 From: Stuart Cardall To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH 4/9] testing/py-lz4: new aport Date: Sun, 24 Apr 2016 23:23:04 +0000 Message-Id: <1461540189-22596-5-git-send-email-developer@it-offshore.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461540189-22596-1-git-send-email-developer@it-offshore.co.uk> References: <1461540189-22596-1-git-send-email-developer@it-offshore.co.uk> X-AuthUser: developer@it-offshore.co.uk X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: closes https://bugs.alpinelinux.org/issues/5480 --- testing/py-lz4/01-system_lz4.patch | 36 ++++++++++++++++++++++++++++++++++ testing/py-lz4/02-tests.patch | 24 +++++++++++++++++++++++ testing/py-lz4/APKBUILD | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 testing/py-lz4/01-system_lz4.patch create mode 100644 testing/py-lz4/02-tests.patch create mode 100644 testing/py-lz4/APKBUILD diff --git a/testing/py-lz4/01-system_lz4.patch b/testing/py-lz4/01-system_lz4.patch new file mode 100644 index 0000000..62a9c9d --- /dev/null +++ b/testing/py-lz4/01-system_lz4.patch @@ -0,0 +1,36 @@ +Last-Update: 2014-08-10 +Forwarded: not-needed +Author: Dmitry Smirnov +Description: un-bundle liblz4 and link to the system one + +--- a/setup.py ++++ b/setup.py +@@ -16,11 +16,11 @@ + packages=find_packages('src'), + package_dir={'': 'src'}, + ext_modules=[ + Extension('lz4', [ +- 'src/lz4.c', +- 'src/lz4hc.c', + 'src/python-lz4.c' ++ ], libraries=[ ++ "lz4", + ], extra_compile_args=[ + "-std=c99", + "-O3", + "-Wall", +--- a/src/python-lz4.c ++++ b/src/python-lz4.c +@@ -32,10 +32,10 @@ + #include + #include + #include + #include +-#include "lz4.h" +-#include "lz4hc.h" ++#include ++#include + #include "python-lz4.h" + + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + diff --git a/testing/py-lz4/02-tests.patch b/testing/py-lz4/02-tests.patch new file mode 100644 index 0000000..dc1cb06 --- /dev/null +++ b/testing/py-lz4/02-tests.patch @@ -0,0 +1,24 @@ +Last-Update: 2014-08-10 +Origin: https://github.com/steeve/python-lz4/blob/master/tests/test.py +Forwarded: not-needed +Author: Dmitry Smirnov +Description: add basic test + +--- /dev/null ++++ b/tests/test.py +@@ -0,0 +1,15 @@ ++import lz4 ++import sys ++ ++ ++import unittest ++import os ++ ++class TestLZ4(unittest.TestCase): ++ ++ def test_random(self): ++ DATA = os.urandom(128 * 1024) # Read 128kb ++ self.assertEqual(DATA, lz4.loads(lz4.dumps(DATA))) ++ ++if __name__ == '__main__': ++ unittest.main() diff --git a/testing/py-lz4/APKBUILD b/testing/py-lz4/APKBUILD new file mode 100644 index 0000000..725a5c6 --- /dev/null +++ b/testing/py-lz4/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Stuart Cardall +# Maintainer: Stuart Cardall +pkgname=py-lz4 +pkgver=0.7.0 +_pkgreal=${pkgname#py-} +pkgrel=0 +pkgdesc="LZ4 Bindings for Python" +url="https://pypi.python.org/pypi/lz4" +arch="all" +license="BSD" +depends="python" +depends_dev="" +makedepends="python-dev py-setuptools lz4-dev" +install="" +subpackages="" +source="http://pypi.python.org/packages/source/l/lz4/lz4-$pkgver.tar.gz + 01-system_lz4.patch + 02-tests.patch + " + +builddir="$srcdir"/$_pkgreal-$pkgver +build() { + cd "$builddir" + python setup.py build || return 1 +} + +package() { + cd "$builddir" + python setup.py install --prefix=/usr --root="$pkgdir" || return 1 +} + +md5sums="e32842a49d5254f6918567197a704492 lz4-0.7.0.tar.gz +fda5c197a766d61d0b1ffcaaf54552e3 01-system_lz4.patch +cba5b0e90428e8451ddbc6f3ba480fbe 02-tests.patch" +sha256sums="cd225744298568fd217577fc14a326a24835412374dadb5060db48f1af43eb48 lz4-0.7.0.tar.gz +b6efbab93b4bbf69c5de40a61993a8ca332a4115e87448ad51907efd74bd5bbb 01-system_lz4.patch +f0573be2656fcad5afdb7ecb25d7ce939505cfcfc2c9ad9d9bde21c9af3151fe 02-tests.patch" +sha512sums="fd7adc4919e70259e5b23b15919c4932354a4518360315a8d6c15c58cdccf21257fb6069bdf20e86a2461f254b50f4abd7296330fd77647ecc2ca49500eedd11 lz4-0.7.0.tar.gz +8e30ebe4b0074195f66c9f174006b7730a2a172f76d863ad4dbf0c282f8dc342ecc6e33bf0e1f691bbdace9ef6a13969a3271f39fe8bdbe2f4234397ca1fc0b8 01-system_lz4.patch +68e84522478af8bdf741b45cdc4b4b4367fd7831452c8f0e5b127f58cc26e698e83931dc43d3016e2714d7497de7f6c112c720e379ce5c411b2f67e89b298ed8 02-tests.patch" -- 2.8.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---