# -*- 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
python.rootname     MarkupSafe
version             2.1.5
revision            0

categories-append   textproc
license             BSD
maintainers         nomaintainer

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

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

checksums           rmd160  beae744fd05db57fec8b5db05ad9fca70ae6705c \
                    sha256  d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b \
                    size    19384

python.versions     27 36 37 38 39 310 311 312

if {$subport ne $name} {
    if {${python.version} <= 35} {
        version     1.1.1
        revision    0
        checksums   rmd160 9f974f85c9d7b4c1d52fffce1c73406d57f55a0a \
                    sha256 29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b \
                    size   19151
    } elseif {${python.version} == 36} {
        version     2.0.1
        revision    0
        checksums   rmd160  2f83aeb0d66af8efe1ea3f02bfd8dca586cbb161 \
                    sha256  594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \
                    size    18596
    }

    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} LICENSE.rst README.rst \
            CHANGES.rst ${destroot}${docdir}
    }

    livecheck.type  none
}
