# -*- 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-ligo-segments
version             1.2.0
revision            1

categories-append   science
maintainers         nomaintainer

platforms           darwin
license             GPL-3

description         Representations of semi-open intervals
long_description    Defines the `segment`, `segmentlist`, and \
                    `segmentlistdict` objects for manipulating semi-open \
                    intervals.
homepage            https://git.ligo.org/lscsoft/ligo-segments

master_sites        pypi:l/ligo-segments
distname            ligo-segments-${version}
checksums           rmd160  d559c6f445dff24103dea6a0f0d5466e60f2ae9f \
                    sha256  5edbcb88cae007c4e154a61cb2c9d0a6d6d4016c1ecaf0a59a667a267bd20e7a \
                    size    48871

python.versions     27 36 37 38
python.default_version 27

if {${name} ne ${subport}} {
    patch {
        # FIXME: the upstream tarball has the wrong permissions.
        # See https://git.ligo.org/lscsoft/ligo-segments/-/issues/11
        system "find '${worksrcpath}' -type d -exec chmod go+rx {} \\;"
        system "find '${worksrcpath}' -type f -exec chmod go+r {} \\;"
    }

    depends_lib-append  port:py${python.version}-six \
                        port:py${python.version}-ligo-common

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

    livecheck.type      none
}
