# -*- 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                ansible-lint
version             26.4.0
revision            0

categories          sysutils
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {artisancomputer.com:zdw @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

homepage            https://github.com/ansible/ansible-lint

python.rootname     ansible_lint

checksums           rmd160  dafc7fd81b19349c590331e626a072ebf129c618 \
                    sha256  29e0438f8af685a4fec96f9ea3404a3beb50d2911bc8df43f283256954ceea5b \
                    size    736853

# Keep Python version compatible with yamllint
python.default_version      314
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

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

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