diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-18 14:46:25 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-18 16:01:18 +0000 |
commit | d856390af772ff492eb80dc26dfbd2876563e122 (patch) | |
tree | 3cfc73224f27fe7bfa8755df37cfe9ff95820b45 /testing | |
parent | 2ca6099b98c497478b4fffdeda0ca7455ea9d7df (diff) | |
download | aports-d856390af772ff492eb80dc26dfbd2876563e122.tar.bz2 aports-d856390af772ff492eb80dc26dfbd2876563e122.tar.xz |
testing/py-zmq: added python3 support, added py2 and py3 subpackages
Diffstat (limited to 'testing')
-rw-r--r-- | testing/py-zmq/APKBUILD | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/testing/py-zmq/APKBUILD b/testing/py-zmq/APKBUILD index ae9ac2c248..aa77cb349d 100644 --- a/testing/py-zmq/APKBUILD +++ b/testing/py-zmq/APKBUILD @@ -3,38 +3,52 @@ pkgname=py-zmq _pkgname=pyzmq pkgver=15.0.0 -pkgrel=0 +pkgrel=1 pkgdesc="Python bindings for ZeroMQ" url="http://pypi.python.org/pypi/pyzmq" -arch="all" +arch="noarch" license="LGPL3+ BSD" depends="" -depends_dev="" -makedepends="python-dev py-setuptools zeromq-dev" +makedepends="python-dev python3-dev py-setuptools zeromq-dev" install="" -subpackages="" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz" -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" + cd "$builddir" python setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + 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" + arch="all" + 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 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + + md5sums="a4e357fe3574fc64a959e7a8e5373b9f pyzmq-15.0.0.tar.gz" sha256sums="376ca24cf365092d03bd1de00ed4319910aef84394cb4805a866bdf0b6d317bb pyzmq-15.0.0.tar.gz" sha512sums="7d42e6e2218ff9668db92cc68ea511a90bac4a4f950ca42d199b82cf17dee587c824be16ea0e315da7b482e7ced0d97769cc500bf9d0fa2eb8a5b7c764c8305f pyzmq-15.0.0.tar.gz" |