# -*- 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 107394 2013-06-27 02:27:17Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-scikits-statsmodels
version             0.4.3
revision            0
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  dbc48424d42f6f6215e78f0ffed0f48cf21bd758 \
                    sha256  504a4f6ccb657c1fab21c6cea5bc53a698bebf72f226dbf0f13374f7f371a7d4

python.versions     26 27 32

if {$subport != $name} {
    depends_build   port:py${python.version}-setuptools
    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}-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      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "statsmodels-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
