# -*- 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        chaimleib intervaltree 3.1.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                py-intervaltree
revision            0

platforms           {darwin any}
supported_archs     noarch
license             Apache-2
maintainers         {reneeotten @reneeotten} openmaintainer

description         A mutable, self-balancing interval tree for Python 2 and 3
long_description    {*}${description}. Queries may be by point, by range overlap, \
                    or by range envelopment.

checksums           rmd160  d8096b68d0de49d840cdb68263124f2c09d24e72 \
                    sha256  66472a62812a7f7c0aa6ed0dc7932e368c001348ec353867425e658879167941 \
                    size    1237810

python.versions     39 310 311 312 313 314

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

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

    test.run        yes
}
