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

name                py-codestyle
python.rootname     pycodestyle

# CAUTION: Updates tend to break port `py-flake8` due to strict version caps.
# Please DO NOT update without cross-checking version compatibility and
# perform updates in a coordinated way.
version             2.14.0
revision            0

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

description         Python style guide checker (formally called pep8)
long_description    \
    ${python.rootname} is a tool to check your Python code against some of the style \
    conventions in PEP 8 (https://www.python.org/dev/peps/pep-0008/). \
    This package used to be called pep8, but was renamed.

homepage            https://pycodestyle.readthedocs.io

checksums           rmd160  0475454fccf5ac7547822db7a41b7f2727b94680 \
                    sha256  c4b5b517d278089ff9d0abdec919cd97262a3367449ea1c8b49b91529167b783 \
                    size    39472

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_run-append      port:${python.rootname}_select

    select.group            ${python.rootname}
    select.file             ${filespath}/pycodestyle-py${python.version}
    notes "
To make the Python ${python.branch} version of ${python.rootname} the one that is run\
when you execute the commands without a version suffix, e.g. '${python.rootname}', run:

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

    test.run        yes
    python.test_framework unittest
}
