# -*- 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 118335 2014-03-31 09:35:13Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

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

python.versions     26 27 32 33 34

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  d32f6115392fdcce3666e6771399e0b001a8f505 \
                    sha256  3fa80a10b36d51686bf7744f5dc99622cd5c98ce8ed64022e629868aafc17769

if {${name} ne ${subport}} {
    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+)*)\.[tz]}
}
