# -*- 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-hf-gradio
version             0.4.1
revision            0

categories-append   devel
license             MIT
supported_archs     noarch
platforms           {darwin any}

python.versions     313 314

python.pep517_backend   hatch

maintainers         {pguyot @pguyot} openmaintainer

description         Extension of the Hugging Face CLI for interacting with Gradio Spaces
long_description    {*}${description}

homepage            https://github.com/gradio-app/hf-gradio

distname            hf_gradio-${version}

checksums           rmd160  6f72a9672df0e14b5e3963e3f8b97e3db2b365bb \
                    sha256  a017d942618f0d495a58ee4563047fa04bef614c00e0cb789a9a6d0633cffa7b \
                    size    6560

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-gradio-client \
                    port:py${python.version}-typer

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