# -*- 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
# $Id: Portfile 116682 2014-02-02 20:51:03Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-levenshtein
version             0.11.2
revision            0
categories-append   textproc
platforms           darwin freebsd
license             GPL-2+

python.versions     24 25 26 27 33

maintainers         stromnov openmaintainer

description         Python module for fast computation of Levensthein distances.

long_description    The Levenshtein Python C extension module contains \
                    functions for fast computation of Levenshtein (edit) \
                    distance, and edit operations, string similarity, \
                    approximate median strings, and generally string \
                    averaging, string sequence and set similarity. It \
                    supports both normal and Unicode strings.

homepage            http://github.com/ztane/python-Levenshtein
master_sites        http://pypi.python.org/packages/source/p/python-Levenshtein/

distname            python-Levenshtein-${version}

checksums           rmd160  8722d6f3b32cefe7d7a895325c5997a051c490ab \
                    sha256  c1311c71beb5b6eecea4bba200a626331ef67110357448be47ba1bfe3c4aa305

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

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {python-Levenshtein-(\d+(?:\.\d+)*)\.[tz]}
}
