# -*- 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-markupsafe
version             1.1.1
categories-append   textproc
platforms           darwin
license             BSD

python.versions     27 34 35 36 37

maintainers         nomaintainer

description         Implements a XML/HTML/XHTML Markup safe string for Python
long_description    ${description}

homepage            https://palletsprojects.com/p/markupsafe/
master_sites        pypi:M/MarkupSafe
distname            MarkupSafe-${version}

checksums           rmd160  9f974f85c9d7b4c1d52fffce1c73406d57f55a0a \
                    sha256  29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b \
                    size    19151

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

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }
    depends_test-append \
                    port:py${python.version}-pytest
    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} LICENSE.rst README.rst \
            CHANGES.rst ${destroot}${docdir}
    }

    livecheck.type  none
} else {
    livecheck.name  Markupsafe
}