# -*- 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-tensorboard1
version             1.15.0
revision            0
platforms           darwin
supported_archs     noarch
license             Apache-2
maintainers         {emcrisostomo @emcrisostomo} {jonesc @cjones051073} openmaintainer

description         TensorFlow's Visualization Toolkit
long_description    TensorBoard is a suite of web applications for inspecting \
                    and understanding your TensorFlow runs and graphs.

homepage            https://github.com/tensorflow/tensorboard

if {${python.version} < 30} {
    master_sites        https://files.pythonhosted.org/packages/d0/93/32ed4e1421885d3ca6bad68ff53d5310580e0ba30b1bd7d36c174a744207/
    distname            tensorboard-${version}-py2-none-any
    checksums           rmd160  d43427028ac81dc111eb5cd5bcfb51b98e053e8e \
                        sha256  612b789386aa1b2c4804e1961273b37f8e4dd97613f98bc90ff0402d24627f50 \
                        size    3765194
} else {
    master_sites        https://files.pythonhosted.org/packages/1e/e9/d3d747a97f7188f48aa5eda486907f3b345cd409f0a0850468ba867db246/
    distname            tensorboard-${version}-py3-none-any
    checksums           rmd160  a0cecc886c01faced1b2f4d7dddfb2ca5ad94d28 \
                        sha256  4cad2c65f6011e51609b463014c014fd7c6ddd9c1263af1d4f18dd97ed88c2bc \
                        size    3765194
}

livecheck.url   https://pypi.org/project/tensorboard/
livecheck.type  regex
livecheck.regex /project/tensorboard/(1(\\.\\d+)+)/

extract.suffix      .whl
extract.only

python.versions        27 35 36 37
python.default_version 37

if {${name} ne ${subport}} {
    conflicts   py${python.version}-tensorboard

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

    depends_lib-append \
        port:py${python.version}-absl \
        port:py${python.version}-grpcio \
        port:py${python.version}-markdown \
        port:py${python.version}-numpy \
        port:py${python.version}-protobuf3 \
        port:py${python.version}-six \
        port:py${python.version}-werkzeug \
        port:py${python.version}-wheel

    if {${python.version} eq 27} {
        depends_lib-append \
            port:py${python.version}-futures
    }

    build {
    }

    destroot.cmd        pip-${python.branch}
    destroot.args       \
        --ignore-installed \
        --no-cache-dir \
        --no-dependencies \
        --root ${destroot} \
        ${distpath}/${distfiles}
    destroot.post_args

    livecheck.type      none
}
