# -*- 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 119068 2014-04-16 13:49:53Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-amqp
version             1.4.5
revision            0
categories-append   devel
platforms           darwin
license             LGPL-2.1+
supported_archs     noarch

python.versions     26 27 31 32 33 34

maintainers         stromnov openmaintainer

description         Low-level AMQP client for Python (fork of amqplib).
long_description    ${description}

homepage            http://github.com/celery/py-amqp
master_sites        http://pypi.python.org/packages/source/a/amqp/

distname            amqp-${version}

checksums           rmd160  f13edac4322e26cd76a33fa3871d614b118ba04a \
                    sha256  534c807c0081ce9c2d517615e724cb6e9df17f79cd6cd4929653ea1ea60edb60

if {${name} ne ${subport} && [lsearch {26 31 32} ${python.version}] != -1} {
    version             1.3.2
    revision            0
    checksums           rmd160  ffc18f4efa123f225364ced45473856ccd7853c7 \
                        sha256  9d321609f98f6742eeb2f7d22334749936a26047af5563818e175444ad1e2ba4
    distname            amqp-${version}
}

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {amqp-(\d+(?:\.\d+)*)\.[tz]}
}
