# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 102198 2013-01-29 13:27:03Z aronnax@macports.org $

PortSystem              1.0
PortGroup               python 1.0

set basedistname        scitools
name                    py-${basedistname}
version                 0.9.0
categories              python science
platforms               darwin
maintainers             aronnax
description             Scientific computing tools for Python
long_description \
    Scientific computing tools for Python, built on other widely used packages \
    such as Numpy and Scipy.

homepage                http://code.google.com/p/${basedistname}/
master_sites            googlecode:${basedistname}
distname                ${basedistname}-${version}
checksums               sha1    68f774a5580689dbecc95cd4a4dc28f56dfeca01 \
                        rmd160  c0c57bc2f248ca1721e66210c00df4241a7dd4ac

python.versions         26 27

if {${subport} != ${name}} {

    # The SciTools setup.py script attempts to import matplotlib
    # and matplotlib always attempts to create $MPLCONFIGDIR/.matplotlib,
    # where $MPLCONFIGDIR defaults to $HOME. Set $MPLCONFIGDIR to ${worksrcpath}
    # so that write access is guaranteed.
    build.env-append    MPLCONFIGDIR=${worksrcpath}
    destroot.env-append MPLCONFIGDIR=${worksrcpath}

    depends_lib-append  port:py${python.version}-matplotlib
    depends_run-append  port:py${python.version}-numpy \
                        port:py${python.version}-scipy

    livecheck.type      none

} else {

    set livecheck.distname ${basedistname}-(\[^"\]+)[quotemeta ${extract.suffix}]

}
