# -*- 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-lw
python.rootname     python_ligo_lw
version             1.8.4
revision            0

categories-append   science
maintainers         nomaintainer

license             GPL-2

description         Python LIGO Light-Weight XML I/O Library
long_description    The LIGO Light-Weight XML format is used extensively by \
                    compact object detection pipeline and associated tool \
                    sets. This package provides a Python I/O library for \
                    reading, writing, and interacting with documents in this \
                    format.
homepage            https://git.ligo.org/kipp.cannon/python-ligo-lw

checksums           rmd160  1b33ce12202a7a46ec59cbd38b39f21c01b596c4 \
                    sha256  1ccaefeeda2a1cddca22b021ec88f550e24f87293a6f9753b3912e41cf0c95d1 \
                    size    2428804

python.versions     313 314

patchfiles          patch-setup.py.diff \
                    fix-pytype-head-init.patch

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-dateutil \
                        port:py${python.version}-ligo-common \
                        port:py${python.version}-ligo-segments \
                        port:py${python.version}-lscsoft-glue \
                        port:py${python.version}-numpy \
                        port:py${python.version}-six \
                        port:py${python.version}-tqdm \
                        port:py${python.version}-yaml

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