# -*- 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 92562 2012-05-01 11:59:38Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-scikits-statsmodels
version             0.4.0
revision            1
categories-append   science
license             BSD
platforms           darwin

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  011196d2d47b6e9caac4de85b9ec1db775221571 \
                    sha256  eb8c4b025538f197bd05bfe9de860c6e1759fddf6e212603e9014c4c9c9e4f54

python.default_version  27
python.versions     26 27 32

if {$subport != $name} {
    depends_lib-append  \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy \
                    port:py${python.version}-pandas \
                    port:py${python.version}-cython \
                    port:py${python.version}-distribute \
                    port:py${python.version}-scikits-module

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

    post-destroot {
        # scikits/__init__.py is provided by scikits-module
        file delete ${destroot}${python.pkgd}/scikits/__init__.py
    }
}

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