# -*- 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 66761 2010-04-22 13:34:12Z snc@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                py26-coverage
version             3.3.1
categories-append   devel
maintainers         nodamage.com:nodamage snc openmaintainer
description         Code coverage measurement for Python
long_description    Coverage measures code coverage, typically during test \
                    execution. It uses the code analysis tools and tracing \
                    hooks provided in the Python standard library to \
                    determine which lines are executable, and which have \
                    been executed.

platforms           darwin

homepage            http://nedbatchelder.com/code/coverage/
master_sites        http://pypi.python.org/packages/source/c/coverage/
distname            coverage-${version}

depends_lib         port:py26-distribute

checksums           md5     6f5a25ce06baad03ab293990f3a98bb7 \
                    sha1    56b30e982c618c34c1ba7d97a19ae48716b1c51d \
                    rmd160  25b43c2e9286576a41c8cd0d86fa0b0bf4d0c26d

post-patch {
    # Permissions in the archive are 700
    # Set directories to 755, *.py to 755, other files to 644
    system "find ${worksrcpath} -type d -exec chmod 755 {} \\;"
    system "find ${worksrcpath} -type f -name '*.py' -exec chmod 775 {} \\;"
    system "find ${worksrcpath} -type f -not -name '*.py' -exec chmod 644 {} \\;"
}

livecheck.type      regex
livecheck.url       http://pypi.python.org/pypi/coverage
livecheck.regex     {/pypi/coverage/(\d+(?:\.\d+)*)"}
