# -*- 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.7.0
revision            0

categories-append   devel
platforms           darwin
supported_archs     noarch
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  febad3204558d07f9e90e3f93796bd8b5df06ce9 \
                    sha256  c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef \
                    size    103640

python.versions     27 35 36 37 38 39

if {${name} ne ${subport}} {
    depends_lib-append      port:py${python.version}-setuptools

    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
    test.cmd        ${python.bin}
    test.args       -m unittest discover testsuite
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib


    livecheck.type  none
}
