aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-07-18 12:20:03 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-07-18 12:20:03 +0000
commit2232dd10f4e3135f8c49fe073f92a9d0d07ae540 (patch)
treeabd57e7335c1c7e13bbac579dee916c9ec63acb9 /testing
parent852dfe5257ab376efdda1836768ea51f160bb59c (diff)
downloadaports-2232dd10f4e3135f8c49fe073f92a9d0d07ae540.tar.bz2
aports-2232dd10f4e3135f8c49fe073f92a9d0d07ae540.tar.xz
testing/py-zipstream: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/py-zipstream/APKBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/py-zipstream/APKBUILD b/testing/py-zipstream/APKBUILD
new file mode 100644
index 0000000000..0cb7368028
--- /dev/null
+++ b/testing/py-zipstream/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-zipstream
+_pkgname=python-zipstream
+pkgver="1.1.4"
+pkgrel=0
+pkgdesc="Like Python's ZipFile module, except it works as a generator that provides the file in many small chunks."
+url="https://github.com/allanlei/python-zipstream"
+arch="noarch"
+license="GPL3"
+depends=""
+makedepends="python-dev python3-dev py-setuptools"
+install=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="$pkgname-$pkgver.tar.gz::https://github.com/allanlei/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+build() {
+ cd "$builddir"
+ python setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ cd "$builddir"
+ python setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
+
+ mkdir -p "$subpkgdir"${dir}
+ mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
+}
+
+_py2() {
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+md5sums="18e2344412f3c46426e5df6cece33d6b py-zipstream-1.1.4.tar.gz"
+sha256sums="32a7a4bdb786914445589595273beffbbf9b6a0a3a3dc2cf19ea96114bd2abd7 py-zipstream-1.1.4.tar.gz"
+sha512sums="722c1d7db91dc47064fc51f1182417f46923b8f42a56e854f1fa125eaccfc7f86d3deab71709226a798a1caf5a84a8a7fa7d3564065ab91afbad434ed787ce32 py-zipstream-1.1.4.tar.gz"