# -*- 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-gracedb
version             2.13.0
revision            0

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

description         Gravitational-wave Candidate Event Database
long_description \
    A prototype system to organize candidate events from \
    gravitational-wave searches and to provide an environment to record \
    information about follow-ups. This package provides a simple client \
    tool to submit candidate events to the database.

homepage            https://www.lsc-group.phys.uwm.edu/daswg/projects/gracedb.html
master_sites        https://software.igwn.org/lscsoft/source/
distname            ligo-gracedb-${version}

checksums           rmd160  07f488baba19e08d260352e3e08b037236249e48 \
                    sha256  4036b7c16967239ed054d2cf4d8e0405ddf260d6a4734127d5b7a750625b5d22 \
                    size    2735834

python.versions     312

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-cryptography \
                    port:py${python.version}-requests \
                    port:py${python.version}-igwn-auth-utils

    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
        }
    }
}

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