# -*- 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.1.1
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  e0132762da5982a6e87b2cc5506e46b6c0add666 \
                    sha256  7415b1b96ad7d7a453eb7e2afc74644e291dbcd8326f230f0216145fdee29a67 \
                    size    728559

# 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

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

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