# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        seatgeek fuzzywuzzy 0.18.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-fuzzywuzzy

categories-append   textproc
platforms           {darwin any} freebsd
supported_archs     noarch
license             GPL-2+
maintainers         nomaintainer

description         Fuzzy String Matching in Python
long_description    Fuzzy string matching like a boss. It uses Levenshtein \
                    Distance to calculate the differences between sequences \
                    in a simple-to-use package.

checksums           rmd160  dd1a3de27f5af602e8c6d4307d147c8b55dfd3f5 \
                    sha256  1e06fc963c91f05664f29e9dad920163a5160fdad2446da938cc476b11657273 \
                    size    77128

python.versions     39 310 311

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

    depends_test-append \
                    port:py${python.version}-hypothesis \
                    port:py${python.version}-codestyle

    # the test in test_fuzzywuzzy_pytest.py fails for all Python versions
    test.run        yes
    test.args       --deselect=test_fuzzywuzzy_pytest.py

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