# -*- 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

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

set realname        astroML

name                py-${realname}
version             0.3
categories-append   science
license             BSD
platforms           darwin
supported_archs     noarch
maintainers         {aronnax @lpsinger} openmaintainer

python.versions     27 34 35 36

description         tools for machine learning and data mining in astronomy

long_description    AstroML is a Python module for machine learning and data \
                    mining built on numpy, scipy, scikit-learn, and \
                    matplotlib, and distributed under the 3-Clause BSD \
                    license. It contains a growing library of statistical and \
                    machine learning routines for analyzing astronomical data \
                    in python, loaders for several open astronomical datasets, \
                    and a large suite of examples of analyzing and visualizing \
                    astronomical datasets.

homepage            http://www.astroml.org
master_sites        pypi:[string index ${realname} 0]/${realname}
distname            ${realname}-${version}

checksums           md5     56d5c281ca079eb569ef1898be1604db \
                    sha1    dbf1a775f2dff6e3f3721d1b69a65a5d757bde95 \
                    rmd160  2a029523b0fcc768acb4e2a3efe1050e24a32cc8

if {${name} eq ${subport}} {
    livecheck.type      regex
    livecheck.url       https://pypi.python.org/pypi?:action=doap&name=${realname}
    livecheck.regex     {<release><Version><revision>([^<]+)</revision></Version></release>}
} else {
    depends_lib-append \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-scikit-learn \
                    port:py${python.version}-astropy

    variant addons description "Install optional package ${name}_addons for faster C implementations of some algorithms" {
        depends_run-append \
                    port:${name}_addons
    }

    default_variants +addons

    livecheck.type  none
}