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

name                py-config
version             1.2
revision            1
license             MIT
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         alternative ConfigParser module for python
long_description    powerful alternative to the ConfigParser module \
                    already available in the standard Python.

homepage            http://config-py.sourceforge.net/
master_sites        sourceforge:config-py
distname            config-py-[string map {. -} ${version}]
checksums           md5     0deb5f48cb3c3f1067f347b8093a1f78 \
                    rmd160  7e024e13a39c71382730bc835e69d98a7b060a66 \
                    sha256  9854d7fa3670dad9f0d638736252eb0aa16d3fec15196dfa6a328a3e9a9296f9 \
                    size    17821

python.versions     27

if {${name} ne ${subport}} {
    use_zip         yes
    extract.mkdir   yes

    post-extract {
        file copy ${filespath}/setup.py ${worksrcpath}
        reinplace "s|VERSION|${version}|" ${worksrcpath}/setup.py
    }

    post-destroot {
        xinstall -m 0644 -W ${worksrcpath} readme.txt \
            ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type  none
} else {
    livecheck.regex config-py/(\\d+(?:\\.\\d+)*)
}
