# -*- 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 79964 2011-07-01 00:13:03Z snc@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                py26-coverage
version             3.5
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           sha1    aa0f40e7e79bc81ea4a33ee7fc5ba66db7633321 \
                    rmd160  ad20294cd53f829c4869b012b1a1a58306c0bbf1

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+)*)"}
