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

name                py-isort
version             5.8.0
revision            0

categories-append   devel
platforms           darwin
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  fdba93400bc6df13087fa3209937f6b6d3372fb8 \
                    sha256  0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6 \
                    size    167927

python.versions     27 35 36 37 38 39

if {${name} ne ${subport}} {
    if {${python.version} eq 27} {
        version     4.3.15
        revision    1
        distname    isort-${version}
        checksums   rmd160  746484d1524c2a318f18170175e48e72d018d90d \
                    sha256  96151fca2c6e736503981896495d344781b60d18bfda78dc11b290c6125ebdb6 \
                    size    67949

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

    if {${python.version} eq 35} {
        version     4.3.21
        revision    1
        distname    isort-${version}
        checksums   rmd160  f3905a2005ed7df9127161d1561f786addcde7fc \
                    sha256  54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1 \
                    size    69546
    }

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

    depends_test-append \
                    port:py${python.version}-pytest
    test.run        no
    # three tests fail, but only when run under MacPorts; skip them for now
    test.cmd        py.test-${python.branch}
    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
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
