# -*- 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-ftfy
version             6.3.1
revision            0

categories-append   textproc
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         fixes text for you
long_description    Fixes mojibake and other glitches in Unicode text, \
                    after the fact.

homepage            https://ftfy.readthedocs.org/

checksums           rmd160  c09b80f270c12af1ff9c8bd66141ac59854e2f3c \
                    sha256  9b3c3d90f84fb267fe64d375a07b7f8912d817cf86009ae134aa03e1819506ec \
                    size    308927

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

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

    test.run        yes
    # console script is not available yet
    test.args       --ignore tests/test_cli.py
    test.env        PYTHONPATH=${worksrcpath}

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE.txt \
            CHANGELOG.md ${destroot}${docdir}
    }
}
