# -*- 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 86534 2011-10-27 17:32:06Z eborisch@macports.org $

PortSystem          1.0
PortGroup           python27 1.0

name                py27-lint
version             0.24.0
categories-append   devel

maintainers         stromnov openmaintainer

description         Error (and style) checking for python
long_description \
    Pylint is a tool that checks for errors in python code, and tries to \
    check that a given coding standard is respected by the coders. This is \
    similar but nevertheless different from what pychecker_ provides, \
    especially since pychecker explicitely does not bother with coding \
    style. The default coding style used by pylint is close to `Guido's \
    style guide`_.

license             GPL-2+

platforms           darwin

homepage            http://www.logilab.org/projects/pylint/
master_sites        http://ftp.logilab.org/pub/pylint/
distname            pylint-${version}

checksums           md5     71df67d15f3aa1895c543b40a6955ed3 \
                    sha1    269d84825a334a558328f36eabeb7a9748555302 \
                    rmd160  c54d23f9d9c592c1baf98b4dfe1619c226ce978f

depends_lib         port:py27-logilab-common port:py27-logilab-astng

patchfiles          patch-epylint.py.diff

post-patch {
    reinplace "s|@@MPORTS_PYTHON_BRANCH@@|${python.branch}|" ${worksrcpath}/epylint.py
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    eval xinstall -m 644 [glob ${worksrcpath}/doc/*] \
        ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} ChangeLog README \
        ${destroot}${prefix}/share/doc/${name}
    file delete ${destroot}${python.pkgd}/logilab/__init__.py
}

livecheck.url       http://ftp.logilab.org/pub/pylint/
livecheck.type      regex
livecheck.regex     {pylint-(\d+(?:\.\d+)*)\.tar\.gz}
