# -*- 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-tempita
python.rootname     Tempita
version             0.5.2
maintainers         nomaintainer
supported_archs     noarch
platforms           {darwin any}

description         Tempita is a small templating language for text substitution.
long_description    {*}${description}
license             MIT
homepage            https://pypi.python.org/pypi/Tempita/

python.versions     27 310

checksums           rmd160  381576f8de8b7b48533bb35cbede5f09ff527382 \
                    sha256  cacecf0baa674d356641f1d406b8bff1d756d739c46b869a54de515d08e6fc9c \
                    size    12648

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

    if {${python.version} >= 36} {
        python.pep517   yes
        patchfiles-append   no_2to3.diff
        post-patch {
            system -W ${worksrcpath} "${prefix}/bin/2to3-${python.branch} --write --nobackups tempita"
        }
    }
}
