# -*- 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 0.29.0 v
revision            0

platforms           darwin
supported_archs     noarch
license             MIT
maintainers         nomaintainer

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

checksums           sha256  30597e0191ec3893f507e70e2d8d179f4c114321280298e6b145c5a3d3e15e06 \
                    rmd160  ea75c05578d7c4bbfdb7fcd1db38b9a5a920c1b1 \
                    size    3860511

python.versions     37 38

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

    depends_lib-append \
                    port:py${python.version}-setuptools

    depends_run-append \
                    port:py${python.version}-aws-sam-translator \
                    port:py${python.version}-jsonpatch \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-yaml \
                    port:py${python.version}-requests \
                    port:py${python.version}-six

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

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target
    test.env-append PYTHONPATH=build/lib

    livecheck.type  none
}
