# -*- 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        mina86 pygtrie 2.4.2 v
revision            0
name                py-${github.project}
fetch.type          git

platforms           darwin
license             Apache-2
maintainers         nomaintainer

description         Trie data structure implementation.
long_description    pygtrie is a pure Python implementation of a trie\
                    data structure. Trie data structure, also known as\
                    radix or prefix tree, is a tree associating keys\
                    to values where all the descendants of a node have\
                    a common prefix (associated with that node).  The\
                    trie module contains Trie, CharTrie and StringTrie\
                    classes each implementing a mutable mapping\
                    interface, i.e. dict interface. As such, in most\
                    circumstances, Trie could be used as a drop-in\
                    replacement for a dict, but the prefix nature of\
                    the data structure is trie’s real strength.  The\
                    module also contains PrefixSet class which uses a\
                    trie to store a set of prefixes such that a key is\
                    contained in the set if it or its prefix is stored\
                    in the set.

checksums           rmd160  0d0a837d075f372a868f7bcc4ec08391df7b6dea \
                    sha256  0ce4dd9641dbfb9d0de05a335058097e5e18c792a038a62f4c799abeb40f52d9 \
                    size    39398

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

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target     test.py
    test.env-append \
                    PYTHONPATH=${worksrcpath}/build/lib

    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
}
