# -*- 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-autoflake
version             2.4.0
revision            0

license             MIT
platforms           {darwin any}
supported_archs     noarch
maintainers         nomaintainer

description         Removes unused imports and unused variables
long_description    {*}${description}

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

checksums           rmd160  79132ab17d658669e9f72d51a9fe35fed411133e \
                    sha256  ef7c496d9bce9d2cef049f24e482d1d3090c37fbd44e5e85dfb00db3c78ee16c \
                    size    16994

python.versions     311 312 313 314 315

python.pep517_backend   hatch

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

    post-destroot {
        set docdir ${destroot}${prefix}/share/doc/${subport}
        set doc_list [list LICENSE README.md]
        xinstall -d ${docdir}
        foreach f ${doc_list} {
            xinstall -m 644 -W ${worksrcpath} ${f} ${docdir}
            file delete -force ${destroot}/${python.pkgd}/${f}
        }
    }
}
