# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 92384 2012-04-27 08:49:51Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-zmq
version             2.2.0
revision            0
categories          python devel net
license             LGPL
platforms           darwin

maintainers         gmail.com:jrjsmrtn openmaintainer

description         Python bindings for ØMQ

long_description    PyZMQ is a lightweight and super-fast messaging library \
                    built on top of the ZeroMQ library.

homepage            http://github.com/zeromq/pyzmq
master_sites        http://pypi.python.org/packages/source/p/pyzmq/

distname            pyzmq-${version}

checksums           rmd160  84a079510f77142a69aa730d80d9a3d423dd8708 \
                    sha256  31800049cd313f0f5468c2003f5a5c401f87cb84e0f9bbfe5e2e539b201bc46b

python.default_version  27
python.versions     26 27

if {$subport != $name} {
    depends_lib-append     port:zmq

    post-patch {
        set setup_cfg ${worksrcpath}/setup.cfg
        file copy ${worksrcpath}/setup.cfg.template ${setup_cfg}
        reinplace "s|/usr/local|${prefix}|g" ${setup_cfg}
    }
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "pyzmq-(\\d+(?:\\.\\d+)*)${extract.suffix}"
