# -*- 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 88428 2012-01-02 02:39:45Z dports@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pympler
set real_name       Pympler
version             0.2.1
revision            1
python.versions     24 25 26 27 31 32
categories-append   devel
maintainers         openmaintainer singingwolfboy
supported_archs     noarch

description         measure, monitor and analyze the memory behavior of Python objects
long_description    \
    Pympler is a development tool to measure, monitor and analyze the memory \
    behavior of Python objects in a running Python application. \
    By pympling a Python application, detailed insight in the size and the \
    lifetime of Python objects can be obtained. Undesirable or unexpected runtime \
    behavior like memory bloat and other "pymples" can easily be identified.

platforms           darwin

homepage            http://packages.python.org/${real_name}/
master_sites        http://pypi.python.org/packages/source/P/${real_name}/
distname            ${real_name}-${version}

if {${subport} != ${name}} {
    patch {
        reinplace "s|data_path = cobj.install_data|data_path = '${python.prefix}/share/pympler'|" \
            ${worksrcpath}/setup.py
    }
}

checksums           rmd160  47b2285eb5fe9ff01f50d71e57da896110865af2 \
                    sha256  292ee62bd50633af4d460d722c77e8c31647e936ae68e3c000e229312163becd

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${real_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
