# -*- 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 107765 2013-07-05 10:50:09Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

name                py-pyflakes
version             0.7.3
revision            0
categories-append   devel
platforms           darwin
license             MIT
supported_archs     noarch

python.versions     26 27 32 33

maintainers         stromnov openmaintainer

description         Passive checker of Python programs.
long_description    Pyflakes is program to analyze Python programs and \
                    detect various errors. It works by parsing the source \
                    file, not importing it, so it is safe to use on modules \
                    with side effects. It's also much faster.

homepage            https://launchpad.net/pyflakes
master_sites        http://pypi.python.org/packages/source/p/pyflakes/

distname            pyflakes-${version}

checksums           rmd160  9d87627496875fdf1d05ea5a80181a89843969f7 \
                    sha256  dbd2c940a1030a4f811afc1a04017a44011c0cb54f8f384b66aa624097d9b5e3

if {$subport != $name} {
    depends_run         port:pyflakes_select

    select.group        pyflakes
    select.file         ${filespath}/py${python.version}-pyflakes

    notes "
To make the Python ${python.branch} version of py-pyflakes the one that is run\
when you execute the commands without a version suffix, e.g. 'pyflakes', run:

port select --set ${select.group} [file tail ${select.file}]
"

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       http://pypi.python.org/pypi/pyflakes/
    livecheck.regex     "pyflakes-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
