# -*- 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-common
version             1.0.4
revision            0

categories-append   science
platforms           {darwin any}
supported_archs     noarch
maintainers         nomaintainer
license             GPL-3+

description         Common package for LIGO Python libraries
long_description    {*}${description}
homepage            https://git.ligo.org/lscsoft/ligo-common

master_sites        https://software.igwn.org/lscsoft/source/
distname            ligo-common-${version}

checksums           rmd160  fbe5f2b78d735aad5aa0085ca8ef467ba986d1fe \
                    sha256  17baa0794a0ef411d58b587968eeed22e00b7cbdebd9d310b5801ec8ccc9f9f9 \
                    size    16315

python.versions     27 312

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex {ligo-common-(\d+(?:\.\d+)*).tar.gz}

if {${subport} ne ${name}} {
    post-destroot {
        file delete -force ${destroot}/${python.pkgd}/ligo/__pycache__

        if {[file exists ${python.pkgd}/ligo/__init__.py]} {
            file delete -force ${destroot}/${python.pkgd}/ligo/__init__.py
        }
    }
}
