# -*- 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        lanpa tensorboardX 2.1 v
revision            0
name                py-${github.project}
categories-append   devel

license             MIT
maintainers         nomaintainer
platforms           darwin

description         tensorboard for pytorch (and chainer, mxnet, numpy, ...)

long_description    {*}${description}. Write TensorBoard events with \
                    simple function call. Support scalar, image, \
                    figure, histogram, audio, text, graph, onnx_graph, \
                    embedding, pr_curve, mesh, hyper-parameters and \
                    video summaries.

checksums           rmd160  d8572c60194c13d92ed3c0a593e40ce60cf4901a \
                    sha256  55f06dfc4cd99f6ba4bd054ae46e68b740e30d09f4fc53812d73e7459da4516b \
                    size    3071604

python.versions     37 38 39

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    depends_run-append \
                    port:py${python.version}-numpy \
                    port:py${python.version}-protobuf3 \
                    port:py${python.version}-six

    depends_test-append \
                    port:py${python.version}-crc32c \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-pytest

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE \
            ${destroot}${docdir}
    }

    test.run        yes
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
