diff options
Diffstat (limited to 'community/python-pyzmq/PKGBUILD')
-rw-r--r-- | community/python-pyzmq/PKGBUILD | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/community/python-pyzmq/PKGBUILD b/community/python-pyzmq/PKGBUILD index f3d299334..87512ebb3 100644 --- a/community/python-pyzmq/PKGBUILD +++ b/community/python-pyzmq/PKGBUILD @@ -1,20 +1,47 @@ -# $Id: PKGBUILD 78250 2012-10-17 10:27:01Z allan $ +# $Id: PKGBUILD 80562 2012-11-25 15:29:31Z kkeen $ # Maintainer: Kyle Keen <keenerd at gmail dot com> -pkgname=python-pyzmq +pkgbase=python-pyzmq +pkgname=(python2-pyzmq python-pyzmq) pkgver=2.2.0.1 -pkgrel=2 +pkgrel=3 pkgdesc="Python3 bindings for zeromq, written in Cython" arch=(i686 x86_64) url="http://www.zeromq.org/bindings:python" license=('LGPL') depends=(zeromq python) +makedepends=(python python2 zeromq) source=(https://github.com/zeromq/pyzmq/downloads/pyzmq-$pkgver.tar.gz) md5sums=('f2f80709e84c8ac72d6671eee645d804') build() { + cd "$srcdir" + cp -a pyzmq-${pkgver} py2zmq-${pkgver} cd "$srcdir/pyzmq-$pkgver" # py3 errors added in 2.2.0.1 sed -i 's|except socket.error, e:|except socket.error as e:|' zmq/eventloop/ioloop.py sed -i 's|except gevent.Timeout, t:|except gevent.Timeout as t:|' zmq/green/core.py + cd "$srcdir/py2zmq-$pkgver" + sed -i 's|^#!/usr/bin/env python$|&2|' $(find ./ -name '*.py') +} + +package_python2-pyzmq() { + depends=(zeromq python2) + cd "$srcdir/py2zmq-$pkgver" + python2 setup.py install --root="$pkgdir" --optimize=0 +} + +package_python-pyzmq() { + depends=(zeromq python) + cd "$srcdir/pyzmq-$pkgver" python3 setup.py install --root="$pkgdir" --optimize=0 -} +} + +check() +{ + cd "$srcdir/pyzmq-$pkgver" + python3 setup.py build_ext --inplace + python3 setup.py test + cd "$srcdir/py2zmq-$pkgver" + python2 setup.py build_ext --inplace + python2 setup.py test +} |