# -*- 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-cyclopts
# pyinfra requires cyclopts < 5
version             4.25.3
revision            0

license             Apache-2
platforms           {darwin any}
supported_archs     noarch
maintainers         {gmail.com:herby.gillot @herbygillot} openmaintainer

description         Intuitive, easy CLIs based on type hints.
long_description    Cyclopts builds command-line interfaces from Python \
                    functions, using their type hints and docstrings for \
                    argument parsing, conversion, validation and help text.

homepage            https://github.com/BrianPugh/cyclopts

checksums           rmd160  a63d7bd9943fe4a8edd2f7162a6081f84e65692a \
                    sha256  7d3a067bc7699a1a65fe2ea0b092a925855bb711a05adc1e65c5b9ba307acea4 \
                    size    202814

python.versions     310 311 312 313 314
python.pep517_backend   hatch

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

    depends_run-append  port:py${python.version}-attrs \
                        port:py${python.version}-docstring_parser \
                        port:py${python.version}-rich \
                        port:py${python.version}-rich_rst

    if {${python.version} < 311} {
        depends_run-append \
                        port:py${python.version}-tomli \
                        port:py${python.version}-typing_extensions
    }

    # newer cyclopts (5.x) is not compatible with pyinfra
    livecheck.type      none
}
