# -*- 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-configargparse
python.rootname     ConfigArgParse
version             1.7
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {petr @petrrr} openmaintainer

description         ${python.rootname} extends argparse with config files and environment variables support
long_description    \
    ${python.rootname} is a drop-in replacement for argparse that adds support for \
    config files and environment variables. It allows options to also be set \
    via config files and/or environment variables.

homepage            https://github.com/zorro3/ConfigArgParse

checksums           rmd160  54ea3410ccf39cc633b675fb6ad2a761d985083c \
                    sha256  e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1 \
                    size    43817

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    depends_test-append \
                    port:py${python.version}-mock \
                    port:py${python.version}-yaml

    test.run        yes

    post-destroot {
        set dest_doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${dest_doc}

        xinstall -m 0644 -W ${worksrcpath} LICENSE \
            README.rst ${dest_doc}
    }
}