# -*- 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-argh
version             0.31.3
revision            0

platforms           {darwin any}
supported_archs     noarch
license             LGPL-3+
maintainers         {petr @petrrr} openmaintainer

description         A simple argparse wrapper
long_description    {*}${description}

homepage            https://github.com/neithere/${python.rootname}

checksums           rmd160  0d286e51621829e26b8336811ac69fc28671a260 \
                    sha256  f30023d8be14ca5ee6b1b3eeab829151d7bbda464ae07dc4dd5347919c5892f9 \
                    size    57570

python.versions     27 39 310 311 312 313
python.pep517_backend   flit

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version             0.27.2
        revision            0
        checksums           rmd160  7cf930c37fd08d7d842af0a53d8135371db7a41c \
                            sha256  00c9027f6f461bcf24afe599a281bbda5cbd5dee4b6705befbea293a4ca7d221 \
                            size    49200

        depends_build-append \
                            port:py${python.version}-setuptools
    } else {
        depends_test-append \
                        port:py${python.version}-mock \
                        port:py${python.version}-iocapture

        test.run        yes
        test.env-append PYTHONPATH=${worksrcpath}/src

        # https://github.com/neithere/argh/issues/148#issuecomment-981508602
        test.args       --deselect test/test_integration.py::test_invalid_choice \
                        --deselect test/test_integration.py::test_explicit_cmd_name
    }

    livecheck.type  none
}
