# -*- 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 107174 2013-06-20 21:16:57Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-igraph
version             0.6.5
revision            0
categories-append   math
platforms           darwin
license             GPL-2+

python.versions     25 26 27 32 33

maintainers         snc openmaintainer

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  31d615f8ad6da520cefa2105d91d8d2fbfa719f4 \
                    sha256  a2478c3a3f2107961cb78b39a09056a92ac4fcd9b43db6ea75a0400bd4edc077

if {$subport != $name} {
    depends_build       port:py${python.version}-setuptools
    depends_lib-append  port:igraph

    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+)?)"
}
