# -*- 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-isort
version             7.0.0
revision            0

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

description         A Python utility / library to sort Python imports.
long_description    isort is a Python utility / library to sort imports \
                    alphabetically, and automatically separated into sections. \
                    It provides a command line utility, Python library and \
                    plugins for various editors to quickly sort all your \
                    imports.

homepage            https://github.com/PyCQA/isort

checksums           rmd160  bbfcc7998f79ce785045a9bc86e3ce144320204a \
                    sha256  5513527951aadb3ac4292a41a16cbc50dd1642432f5e8c20057d414bdafb4187 \
                    size    805049

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

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-hatch-vcs

    depends_run-append \
                    port:isort_select

    select.group    isort
    select.file     ${filespath}/${python.rootname}${python.version}

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

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

    test.run        no
    # three tests fail, but only when run under MacPorts; skip them for now
    test.args       -k \"not test_other_file_encodings and not test_new_lines_are_preserved and not test_settings_path_skip_issue_909\"
    test.target     test_isort.py
}
