# -*- 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-click-extra
version             8.8.1
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             GPL-2+
maintainers         {deldycke.com:kevin @kdeldycke} openmaintainer

description         Drop-in replacement for Click to build user-friendly \
                    and colorful CLIs
long_description    Click Extra is a collection of helpers and utilities \
                    for Click, the Python CLI framework. It provides \
                    colorful help screens, configuration file loading, \
                    logging management, table rendering and platform \
                    detection to Click-based tools.

homepage            https://github.com/kdeldycke/click-extra

python.rootname     click_extra

checksums           rmd160  e7013539e104262ee78146043c60e250e95b66b2 \
                    sha256  fc67535bbc186ac608b04f1da3dd1c442903567f08a12f484af89a894653f796 \
                    size    1263359

python.versions     311 312 313 314
python.pep517_backend uv

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-boltons \
                    port:py${python.version}-click \
                    port:py${python.version}-cloup \
                    port:py${python.version}-deepmerge \
                    port:py${python.version}-extra-platforms \
                    port:py${python.version}-tabulate \
                    port:py${python.version}-wcmatch \
                    port:py${python.version}-wcwidth

    depends_test-append \
                    path:bin/git:git \
                    port:py${python.version}-hjson \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-myst-parser \
                    port:py${python.version}-pygments \
                    port:py${python.version}-pytest-httpserver \
                    port:py${python.version}-requests \
                    port:py${python.version}-sphinx \
                    port:py${python.version}-tomlkit \
                    port:py${python.version}-xmltodict \
                    port:py${python.version}-yaml

    # Exclude the network tests (marked "network") that reach external services.
    test.run            yes
    test.args-append    -o addopts="-m 'not network'"
}
