# -*- 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
# $Id: Portfile 136711 2015-05-24 22:22:19Z petr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

set _name           radical.utils
set _n              [string index ${_name} 0]

name                py-radical-utils
version             0.28
categories-append   net parallel devel
platforms           darwin
supported_archs     noarch
license             MIT

maintainers         petr openmaintainer

description         Shared code and tools for various Radical Group projects

long_description    This Python package contains shared code and tools for \
                    various Radical Group projects. Sometimes we call it the \
                    Radical Kitchen Sink.

homepage            https://github.com/saga-project/${_name}/

distname            ${_name}-${version}
master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/

checksums           md5     6dff14928acd9f9bacf443cc4870aca0 \
                    rmd160  398a0fd10f6ad05e455c4f3396338375ce19b16f \
                    sha256  33172274a9e60a1558fce32f3c57d83260ced055321ae7a9a529174035607ff7

python.versions     27

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-colorama \
                            port:py${python.version}-pymongo \
                            port:py${python.version}-nose

    test.run        yes

    # Adding documentation
    post-destroot {
        set dest_doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -d  ${dest_doc}
        xinstall -m 755 -W ${worksrcpath} \
            LICENSE.md \
            README.md \
                ${dest_doc}
    }

    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   https://pypi.python.org/pypi/${_name}/json
    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
}
