# -*- 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             3.0.3
revision            0

categories-append   textproc
license             BSD
maintainers         {jmr @jmroot} openmaintainer

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

homepage            https://palletsprojects.com/p/markupsafe/

checksums           md5 13a73126d25afa72a1ff0daed072f5fe \
                    rmd160 cc7c18d1dd5a09f550ea05fa260a027640ef0a55 \
                    sha256 722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698

python.versions     27 310 311 312 313 314

if {$subport ne $name} {
    set docfiles [list CHANGES.rst]
    if {${python.version} <= 38} {
        python.rootname MarkupSafe
        lappend docfiles    LICENSE.rst README.rst
    } else {
        lappend docfiles    LICENSE.txt README.md
    }
    if {${python.version} == 27} {
        version     1.1.1
        revision    0
        checksums   md5 43fd756864fe42063068e092e220c57b \
                    rmd160 9f974f85c9d7b4c1d52fffce1c73406d57f55a0a \
                    sha256 29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b
    }

    depends_build-append \
                    port:py${python.version}-setuptools

    test.run        yes

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} {*}${docfiles} \
            ${destroot}${docdir}
    }

    livecheck.type  none
}
