# -*- 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        tensorflow tensor2tensor 1.15.7 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-${github.project}

platforms           {darwin any}
supported_archs     noarch
license             Apache-2
maintainers         nomaintainer

description         T2T is a library of deep learning models

long_description    Tensor2Tensor, or T2T for short, is a library \
                    of deep learning models and datasets designed to \
                    make deep learning more accessible and accelerate \
                    ML research.  T2T is now deprecated. Users are \
                    encouraged to use the successor library Trax.

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

checksums           rmd160  56b4b430deef0d8736ce25701db85c8e0bf97707 \
                    sha256  fea72911b20049874e645b46689d6e00f6f4e000ac8ad1c1d563377ace9d8f69 \
                    size    4272683

python.versions     39

if {${name} ne ${subport}} {
    depends_run-append \
                    port:py${python.version}-absl \
                    port:py${python.version}-bz2file \
                    port:py${python.version}-dopamine-rl \
                    port:py${python.version}-flask \
                    port:py${python.version}-future \
                    port:py${python.version}-gevent \
                    port:py${python.version}-gin-config \
                    port:py${python.version}-google-api \
                    port:py${python.version}-gunicorn \
                    port:py${python.version}-gym \
                    port:py${python.version}-h5py \
                    port:py${python.version}-kfac \
                    port:py${python.version}-mesh-tensorflow \
                    port:py${python.version}-numpy \
                    port:py${python.version}-oauth2client \
                    path:${python.pkgd}/cv2:py${python.version}-opencv4 \
                    port:py${python.version}-Pillow \
                    port:py${python.version}-pypng \
                    port:py${python.version}-requests \
                    port:py${python.version}-scipy \
                    port:py${python.version}-six \
                    port:py${python.version}-sympy \
                    port:py${python.version}-tensorflow-datasets \
                    port:py${python.version}-tensorflow-gan \
                    port:py${python.version}-tensorflow-probability \
                    port:py${python.version}-tf-slim \
                    port:py${python.version}-tqdm

    # tensorflow and tensorflow addons either provided by a number of ports,
    # either py-tensorflow + py-tensorflow-addons, or py-tensorflow-macos
    # So use a path style dependency for these that checks for a site-packages dir.
    depends_run-append \
                    path:${python.pkgd}/tensorflow:py${python.version}-tensorflow \
                    path:${python.pkgd}/tensorflow_addons:py${python.version}-tensorflow-addons \


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