diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-19 12:03:55 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-19 13:00:04 +0000 |
commit | ea7457dd98aa0799b009a1104dfad4a26324f2a2 (patch) | |
tree | a91dbdb226d85baf0dba670ae9602d70ea0823fe /community/py-zipstream | |
parent | 7dc539c1201bca31d9094f4f79ee6b9bec6e996d (diff) | |
download | aports-ea7457dd98aa0799b009a1104dfad4a26324f2a2.tar.bz2 aports-ea7457dd98aa0799b009a1104dfad4a26324f2a2.tar.xz |
community/py-zipstream: moved from testing, improved APKBUILD
Diffstat (limited to 'community/py-zipstream')
-rw-r--r-- | community/py-zipstream/APKBUILD | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/community/py-zipstream/APKBUILD b/community/py-zipstream/APKBUILD new file mode 100644 index 0000000000..0cb7368028 --- /dev/null +++ b/community/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" |