# -*- 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 107135 2013-06-18 23:42:21Z aronnax@macports.org $

PortSystem 1.0
PortGroup python 1.0

set realname        twilio
name                py-${realname}
version             3.5.1
revision            1
python.versions     25 26 27 32
license             MIT
platforms           darwin
supported_archs     noarch
maintainers         aronnax openmaintainer
description         Twilio API client and TwiML generator
long_description    ${description}
homepage            http://pypi.python.org/pypi/${realname}/
master_sites        http://pypi.python.org/packages/source/[string index ${realname} 0]/${realname}/
distname            ${realname}-${version}

checksums           md5     a33890f8b1527af9cd0d2018949934ea \
                    rmd160  06c0a70e16ab626ca92c6130958b082ee50d213c \
                    sha256  737e88255fdbfb2f6a5377b6492d7bfe826a9d33bad10fb3a5c9a5c6538144e8

if {${subport} == ${name}} {
    livecheck.type  regex
    livecheck.regex [format "%s-%s" ${realname} {(\d+(?:\.\d+)*)}]
    
} else {
    depends_lib-append \
                    port:py${python.version}-six \
                    port:py${python.version}-httplib2

    depends_build-append \
                    port:py${python.version}-setuptools

    if {${python.version} == 25} {
        depends_lib-append \
                    port:py${python.version}-simplejson
    }

    livecheck.type  none
}
