# -*- 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.0.2
name                py-intervaltree
revision            0

platforms           darwin
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  c63f82057d59d6b0bb0d1ba173e55c9e20807e35 \
                    sha256  d3d5bcad305b7bbbb136261e8a90ccbb2a5d2b1e1c71f573eafa78a95dc530d6 \
                    size    1237131

python.versions     27 35 36 37

if {${name} ne ${subport}} {
    conflicts       py${python.version}-intervaltree2

    depends_build-append \
                    port:py${python.version}-setuptools

    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
    test.cmd        py.test-${python.branch}
    test.args       -o addopts=''
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}