# -*- 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 87114 2011-11-10 20:54:58Z snc@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-igraph
version             0.5.4
python.versions     25 26 27
python.default_version   27
categories-append   math
maintainers         snc openmaintainer
license             GPL-2+
description         Python interface to the igraph library

long_description    Python interface to the igraph high performance \
                    graph library

homepage            http://pypi.python.org/pypi/python-igraph/
master_sites        http://pypi.python.org/packages/source/p/python-igraph/

distname            python-igraph-${version}
dist_subdir         python/${distname}/1/

checksums           rmd160  bae4195e4780e74e777beafd98898a2893fd2ac7 \
                    sha256  761ebf028f6dc03aa42a23306bc20af4cbff4ad7e850a314840cb3f9cb021484

platforms           darwin

if {$subport != $name} {
    depends_lib         port:igraph \
                        port:py${python.version}-distribute

    patchfiles          patch-setup.cfg.diff \
                        patch-setup.py.diff

    post-patch {
        reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/setup.cfg
        reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/setup.py
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "python-igraph-(\\d+\\.\\d+(\\.\\d+)?)"
}
