# -*- 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 108303 2013-07-18 13:06:48Z eborisch@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-h5py
version             2.1.3

# h5py needs to be re-built after hdf5-18 upgrades
revision            0

checksums \
    rmd160  53c04ea1d7b2b9c4e5b6c447d443c49b027e3177 \
    sha256  bf5ea7c8758bb64cd9db8d2736cb84ccc93e5bfbf4133650d7adf4b05726ca83 \
    sha1    7419cadd9892ab3a232e8ce779f3587ccff9ebff

# Support for -devel
set DEV_VERSION     0

subport             py26-h5py-devel {set DEV_VERSION 26}
subport             py27-h5py-devel {set DEV_VERSION 27}
subport             py31-h5py-devel {set DEV_VERSION 31}
subport             py32-h5py-devel {set DEV_VERSION 32}
subport             py33-h5py-devel {set DEV_VERSION 33}
python.versions     26 27 31 32

if {${DEV_VERSION}} {
    python.version-append   33
    python.version      ${DEV_VERSION}
    epoch               20121002
    version             2.2.0b1
    conflicts           py${python.version}-h5py
    checksums \
      rmd160  c9b67d088d8046665557addbe44c2e7f3cf3e59d \
      sha256  deba36bdbcb144dd17c488e8eda187963328a2fc0d733aa6b0f76a9bf7964aa4 \
      sha1    cae9ef7a737c16167b02c6eb56d29ff1511fc096
} elseif {$subport != $name} {
    conflicts           py${python.version}-h5py-devel
}

python.default_version 27
platforms           darwin
license             BSD
maintainers         macports.org:eborisch \
                    openmaintainer
description         Read and write HDF5 files from Python

long_description  \
    The h5py package provides both a high- and low-level interface to the \
    HDF5 library from Python. The low-level interface is intended to be a \
    complete wrapping of the HDF5 API, while the high-level component \
    supports  access to HDF5 files, datasets and groups using established \
    Python and NumPy concepts. \
    \n\nA strong emphasis on automatic conversion between Python (Numpy) \
    datatypes and data structures and their HDF5 equivalents vastly \
    simplifies the process of reading and writing data from Python.

homepage            http://www.h5py.org
master_sites        http://h5py.googlecode.com/files/
distname            h5py-${version}  

if {$subport != $name} {
    depends_lib-append  port:py${python.version}-numpy \
                        port:hdf5-18

    post-destroot {
        system -W ${destroot}${prefix} "mkdir -p share/doc/${subport}"
        copy ${worksrcpath}/lzf/LICENSE.txt \
            ${destroot}${prefix}/share/doc/${subport}
    }
}

livecheck.type      googlecode
livecheck.name      h5py
livecheck.regex     {h5py-(\d+(?:\.\d+)*).tar.gz}

