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

github.setup        PyCQA pydocstyle 6.3.0
github.tarball_from archive
revision            0
name                py-docstyle

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {reneeotten @reneeotten} openmaintainer

description         Python docstring style checker
long_description    pydocstyle is a static analysis tool for checking compliance \
                    with Python docstring conventions.

checksums           rmd160  db84d41bc0dc31d47ee1112da01733f33c715492 \
                    sha256  29ed0e8b1abe5f4590132f456b6f9cbf0866b89fabf836bc9474fde706e2e13e \
                    size    78058

python.versions     310 311 312 313 314
python.pep517_backend poetry

if {${subport} ne ${name}} {
    # fix version number (can hopefully removed upon next update)
    post-patch {
        reinplace "s|0\.0\.0-dev|${version}|g" ${worksrcpath}/pyproject.toml
    }

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

    depends_run     port:pydocstyle_select

    select.group    pydocstyle
    select.file     ${filespath}/py${python.version}-pydocstyle

    notes "
To make the Python ${python.branch} version of pydocstyle the one that is run \
when you execute the commands without a version suffix, e.g. 'pydocstyle', run:

port select --set ${select.group} [file tail ${select.file}]
"
}
