# -*- 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
revision            0
name                py-fuzzywuzzy

categories-append   textproc
platforms           darwin 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     27 35 36 37 38

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

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

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

    # the test in test_fuzzywuzzy_pytest.py fails for all Python versions
    test.run        yes
    test.cmd        py.test-${python.branch} test_fuzzywuzzy.py test_fuzzywuzzy_hypothesis.py
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    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}
    }

    livecheck.type  none
}
