# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 63211 2010-01-29 17:39:03Z adfernandes@macports.org $

PortSystem      1.0
PortGroup       python26 1.0

name            py26-mpi4py
version         1.2
categories      python
description     MPI for Python - Python bindings for MPI
long_description \
    MPI for Python (mpi4py) provides bindings of the Message Passing Interface \
    (MPI) standard for the Python programming language, allowing any Python \
    program to exploit multiple processors. This package is constructed on top of \
    the MPI-1/MPI-2 specification and provides an object oriented interface which \
    closely follows MPI-2 C++ bindings. It supports point-to-point (sends, \
    receives) and collective (broadcasts, scatters, gathers) communications of \
    any picklable Python object as well as optimized communications of Python \
    object exposing the single-segment buffer interface (NumPy arrays, builtin \
    bytes/string/array objects).


maintainers     adfernandes openmaintainer

homepage        http://code.google.com/p/mpi4py/
master_sites    googlecode:mpi4py
distname        mpi4py-${version}
checksums       sha1    6dcef2758abce46c8e0b55a531d7164b8fed8931

platforms       darwin

if { ${os.major} < 9 } {
    default_variants +openmpi 
}

if {  ${os.major} < 9 &&  ![variant_isset openmpi] } {
    error "Mac OS 10.4 and earlier require the openmpi variant"
}

variant openmpi description {builds with the openmpi port} {
    depends_lib-append  port:openmpi
    build.target        build "--mpicc=${prefix}/bin/openmpicc"
}
