# -*- 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-jellyfish
version             0.8.2
revision            0

platforms           darwin
license             BSD
maintainers         nomaintainer

description         A library for doing approximate and phonetic matching\
                    of strings.
long_description    {*}${description}

homepage            http://github.com/jamesturk/jellyfish

checksums           rmd160  7d368c6ca64f9542599b977e8f44495228b3a985 \
                    sha256  a499741401512d05bbd3556e448e960bc908eba3879fb73d450e8e91566a030b \
                    size    134200

python.versions     37 38 39

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

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

    pre-test {
        test.env-append \
                    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target     jellyfish/test.py

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

    livecheck.type      none
}
