# -*- 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 107279 2013-06-25 02:15:04Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-numexpr
version             2.1
revision            0
categories-append   math
platforms           darwin
license             MIT

python.versions     25 26 27 32 33

maintainers         stromnov openmaintainer

description         Multiple-operator array expression evaluator
long_description    The numexpr package evaluates multiple-operator array \
                    expressions many times faster than NumPy can. It accepts \
                    the expression as a string, analyzes it, rewrites it \
                    more efficiently, and compiles it on the fly into code \
                    for its internal virtual machine (VM). Due to its \
                    integrated just-in-time (JIT) compiler, it does not \
                    require a compiler at runtime.

homepage            http://code.google.com/p/numexpr/
master_sites        googlecode:numexpr
distname            numexpr-${version}

checksums           rmd160  ceb9643edcc0606c0153bdfe47decd602ec64885 \
                    sha256  39f2fed7f1b8125c0f2df3af454c97e5dfa636ce487ad7921025815e24c17df8

# Last version (2.0.1) with py25 support
subport py25-numexpr {
    version             2.0.1
    revision            0
    distname            numexpr-${version}
    checksums           rmd160  afc9e460954ebf9040830e70c6ff3167a2fec259 \
                        sha256  29492a08d5137c9a3a369527a899680ef7c1908cd4851ad2827b6c1d3767b092
}

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

    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} ANNOUNCE.txt LICENSE.txt README.txt \
            RELEASE_NOTES.txt ${destroot}${prefix}/share/doc/${subport}
    }
}
