# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-statsmodels
version             0.5.0
revision            0
categories-append   science math
platforms           darwin
license             BSD

python.versions     26 27 32 33

maintainers         stromnov openmaintainer

description         Statistical computations and models for use with SciPy

long_description    Statsmodels is  a  Python  package  that  provides \
                    a complement to scipy for statistical computations \
                    including descriptive  statistics  and  estimation \
                    of statistical models.

homepage            http://statsmodels.sourceforge.net/
master_sites        http://pypi.python.org/packages/source/s/statsmodels/

distname            statsmodels-${version}

checksums           rmd160  b9f7322c671e75798187fa693f21d20f51050318 \
                    sha256  65398518bdd414c712362738e61d34ee5ec07b4c084bba17c65af5f20ae109d0

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools \
                        port:py${python.version}-cython
    depends_lib-append  port:py${python.version}-numpy \
                        port:py${python.version}-scipy \
                        port:py${python.version}-pandas \
                        port:py${python.version}-patsy

    post-patch {
        reinplace "s|\'cython\'|\'cython-${python.branch}\'|g" ${worksrcpath}/setup.py
    }

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