# -*- 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 85352 2011-10-13 00:35:41Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-modulegraph
version             0.9.1
categories-append   devel
license             MIT
maintainers         jmr openmaintainer
description         Python module dependency analysis tool
long_description \
    modulegraph determines a dependency graph between Python modules \
    primarily by bytecode analysis for import statements. \
    modulegraph uses similar methods to modulefinder from the standard \
    library, but uses a more flexible internal representation, has more \
    extensive knowledge of special cases, and is extensible.

platforms           darwin
supported_archs     noarch

homepage            http://undefined.org/python/#modulegraph
master_sites        http://pypi.python.org/packages/source/m/modulegraph/
distname            modulegraph-${version}

checksums           md5 4d5e8dbfc35d7a3d1123c4cc2d958125 \
                    sha1 92f4307ac1d8b4fef7acd12f72a71c63109ff246 \
                    rmd160 b8912f3e618a735f75e5f4d6ca60f78ffb557537

python.versions     24 25 26 27

if {$subport != $name} {
    depends_lib         port:py${python.version}-altgraph
    if {${python.version} == 24 || ${python.version} == 25} {
        post-destroot {
            move ${destroot}${prefix}/bin/modulegraph \
                 ${destroot}${prefix}/bin/modulegraph-${python.branch}
        }
    }
    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   http://pypi.python.org/pypi/modulegraph
    livecheck.regex {modulegraph ([0-9.]+)}
}
