# -*- 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
PortGroup           github 1.0

name                py-cfn-lint
github.setup        aws-cloudformation cfn-python-lint 1.43.0 v
github.tarball_from archive
revision            0

platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         Checks cloudformation for practices and behaviour that \
                    could potentially be improved
long_description    {*}${description}

checksums           sha256  e0eb760ac998c4fd2b004eedf1e83331d858a6a8b7cfdb1817046bed40c82449 \
                    rmd160  150bd7d04ca19ec3ad4247ae7b5ee0b0ae9b9558 \
                    size    3757766

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    post-patch {
        reinplace "s|\'cfn-lint\'|\'cfn-lint-${python.branch}\'|g" \
            ${worksrcpath}/test/integration/__init__.py
    }

    depends_run-append \
                    port:py${python.version}-yaml \
                    port:py${python.version}-aws-sam-translator \
                    port:py${python.version}-jsonpatch \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-networkx \
                    port:py${python.version}-junit-xml \
                    port:py${python.version}-jschema_to_python \
                    port:py${python.version}-sarif-om \
                    port:py${python.version}-sympy \
                    port:py${python.version}-regex

    depends_test-append \
                    port:py${python.version}-mock

    test.run        yes
}

github.livecheck.regex  {([0-9.]+)}
