# -*- 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 107167 2013-06-20 20:22:51Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-cffi
version             0.6
revision            0
categories-append   devel
platforms           darwin
license             MIT

python.versions     26 27 32 33

maintainers         stromnov openmaintainer

description         Foreign Function Interface for Python calling C code.

long_description    Foreign Function Interface for Python calling C code. \
                    The aim of this project is to provide a convenient and \
                    reliable way of calling C code from Python.

homepage            http://cffi.readthedocs.org/
master_sites        http://pypi.python.org/packages/source/c/cffi/

distname            cffi-${version}

checksums           rmd160  5d6078b88c697bca8f4e44fd674e7d562f8e21ce \
                    sha256  22d49bdb13e962b425fad0a001f8d331c51224235e5850fb2c193180c9757d14

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

    depends_run-append  port:py${python.version}-pycparser

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "cffi-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
