# $Id: Portfile 58220 2009-09-24 13:35:44Z mmoll@macports.org $

PortSystem         1.0
PortGroup          python25 1.0

name               py25-tables
version            2.1.2
categories-append  python science
platforms          darwin
maintainers        mmoll openmaintainer

description		     Python package for HDF5 file access.
long_description   PyTables is a python package used to access \
  HDF5 files, and can efficiently manage extremely large hierarchical \
  data sets.

homepage           http://www.pytables.org/
master_sites       ${homepage}download/stable/
distname           tables-${version}

checksums           md5     0033be22577d76fd1689a77afb9975da \
                    sha1    545cc16491d37e2f6b8ce10bc8bdfa559b174e2e \
                    rmd160  09bfb73e9252baa34aa40274a0b07f6c6cc60d70
depends_lib-append port:hdf5-18 \
                   port:py25-numpy \
                   port:zlib \
                   port:bzip2 \
                   port:py25-scientific

build.target       build_ext
build.args         --inplace \
                   --hdf5=${prefix} \
                   --bzip2=${prefix}

destroot.args      --hdf5=${prefix} \
                   --bzip2=${prefix}

post-destroot {
  xinstall -m 644 -W ${worksrcpath} ANNOUNCE.txt LICENSE.txt README.txt \
    MIGRATING_TO_2.x.txt README.txt RELEASE_NOTES.txt THANKS VERSION \
    ${destroot}${prefix}/share/doc/${name}

  foreach f {ptdump ptrepack nctoh5} {
    move ${destroot}${prefix}/bin/${f} ${destroot}${prefix}/bin/${f}-py25
  }
}

variant lzo description "Use lzo compression library" {
  depends_lib-append    port:lzo
  build.args-append     --lzo=${prefix}
  destroot.args-append  --lzo=${prefix}
}

livecheck.type     regex
livecheck.url      ${homepage}
livecheck.regex    {PyTables ([0-9]+\.[0-9]+\.[0-9]+) released}
