# -*- 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

github.setup        ansible-community ansible-lint 25.9.2 v
github.tarball_from archive
revision            0

categories          sysutils
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         artisancomputer.com:zdw \
                    {judaew @judaew} \
                    openmaintainer

description         Best practices checker for Ansible playbooks
long_description \
    ansible-lint checks playbooks for practices and behaviour that could potentially be improved

checksums           rmd160  9e0d3fb89d738ee96d04719df2002e5468a6e763 \
                    sha256  54556ac26a3cf7c5df3202da32ff94d36c7f71b51871539ec4492f11c59bdc9d \
                    size    650880

# Keep Python version compatible with yamllint
python.default_version      313
python.link_binaries_suffix

depends_build-append \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-setuptools_scm \
                    port:py${python.version}-toml \
                    port:py${python.version}-wheel

depends_run-append  port:py${python.version}-ansible \
                    port:py${python.version}-ansible-compat \
                    port:py${python.version}-black \
                    port:py${python.version}-importlib-metadata\
                    port:yamllint

depends_lib-append  port:py${python.version}-enrich \
                    port:py${python.version}-filelock \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-packaging \
                    port:py${python.version}-ruamel-yaml \
                    port:py${python.version}-ruamel-yaml-clib \
                    port:py${python.version}-tenacity \
                    port:py${python.version}-wcmatch \
                    port:py${python.version}-yaml

# patch-disable_use_scm_version.diff: Stop setuptools from using the scm version which doesn't exist in this context
# patch-disable_path_warning.diff: Correct wanring logic where an empty PYENV_VIRTUAL_ENV triggers a warning
patchfiles          patch-disable_use_scm_version.diff \
                    patch-disable_path_warning.diff

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

notes "
Before using ansible-lint need to select the Python version of Ansible:

port select --set ansible py${python.version}-ansible
"
