# -*- 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.12.1
revision            1

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  7a65913c0b8603c49f93830751f11bdb710f901d \
                    sha256  6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521 \
                    size    39232

python.versions     39 310 311 312 313

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
}