# -*- 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 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pymongo
version             2.5.2
revision            0
categories-append   databases
platforms           darwin
license             Apache

python.versions     25 26 27 32 33

maintainers         stromnov openmaintainer

description         Python access to mongodb
long_description \
        The PyMongo distribution contains tools for interacting with \
        the Mongo database from Python.

homepage            http://www.mongodb.org/
master_sites        http://pypi.python.org/packages/source/p/pymongo/

distname            pymongo-${version}

checksums           rmd160  6edf45c60691ea45a2099838ed4e11192c995f7f \
                    sha256  84ac1da67d0dabc711fa8259324d4e94b26a85411bcf0c12dc80a427d9f93ecc

if {$subport != $name} {
    depends_build-append    port:py${python.version}-setuptools
    post-destroot {
        xinstall -m 755 -d ${destroot}${python.prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} README.rst \
            ${destroot}${python.prefix}/share/doc/${subport}
    }

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