# -*- 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 84550 2011-09-27 21:05:11Z snc@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-anyjson
version             0.3.1
categories          python www
license             BSD
platforms           darwin

maintainers         blair

description         Wrap the best available JSON implementation in a common API

long_description    Anyjson wraps the best available JSON implementation \
                    in a common interface.  Anyjson loads whichever is the \
                    fastest JSON module installed and provides a uniform API \
                    regardless of which JSON implementation is used.

homepage            http://bitbucket.org/runeh/anyjson/
master_sites        http://pypi.python.org/packages/source/a/anyjson

distname            anyjson-${version}

checksums           md5     2b53b5d53fc40af4da7268d3c3e35a50 \
                    sha1    f459fbdbd5b7ee81b236ef5eed023970db38572a \
                    rmd160  ed958d1c30c28975f9bfe5d6c4da05f9bde9e58d

python.versions     25 26 27
python.default_version 27

if {$subport != $name} {
    depends_build-append    port:py${python.version}-distribute

    # Depend upon cjson so that the best JSON module can be used.
    depends_lib-append      port:py${python.version}-cjson
}

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