# -*- 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-typeguard
version             4.4.2
revision            1

platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         Run time type checker for Python
long_description    {*}${description}

homepage            https://github.com/agronholm/typeguard

checksums           rmd160  403b1ce4d6f47ab50dba55a0a730746785d43836 \
                    sha256  a6f1065813e32ef365bc3b3f503af8a96f9dd4e0033a02c28c4a4983de8c6c49 \
                    size    75746

python.versions     39 310 311 312 313

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

    depends_lib-append \
                    port:py${python.version}-typing_extensions

    if {${python.version} < 310} {
        depends_lib-append \
                    port:py${python.version}-importlib-metadata
    }

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