# -*- 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 119969 2014-05-12 10:26:24Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-psutil
version             2.1.1
revision            0
categories-append   devel sysutils
platforms           darwin
license             MIT

python.versions     24 25 26 27 31 32 33 34

maintainers         stromnov openmaintainer

description         A process utilities module for Python.

long_description    psutil is a module providing an interface for retrieving \
                    information on all running processes and system \
                    utilization (CPU, disk, memory) in a portable way \
                    by using Python, implementing many functionalities \
                    offered by command line tools such as: ps, top, df, \
                    kill, free, lsof, free, netstat, ifconfig, nice, ionice, \
                    iostato, iotop, uptime, tty.

homepage            http://code.google.com/p/psutil/
master_sites        http://pypi.python.org/packages/source/p/psutil/

distname            psutil-${version}

checksums           rmd160  ea18be7a29190b9753c3e7833a0f7c9c775c9acd \
                    sha256  bf812a4aa6a41147d0e96e63d826eb7582fda6b54ad8f22534354b7f8ac45593

if {${name} ne ${subport} && [lsearch {24 25 26 31 32} ${python.version}] != -1} {
    version             1.1.2
    revision            0
    checksums           rmd160  f59b044334d5dab75d3096ebe05d58a6ed1a5e6d \
                        sha256  adeb1afcb46327bed6603aa8981dce863f052043a52f003e2742ec7c3739677a
    distname            psutil-${version}
}

if {${name} ne ${subport}} {
    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {psutil-(\d+(?:\.\d+)*)\.[tz]}
}
