# -*- 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-dash
version             4.4.0
revision            0

categories-append   graphics www
license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         Data Apps & Dashboards for Python.
long_description    Built on top of Plotly.js, React and Flask, Dash \
                    ties modern UI elements like dropdowns, sliders, \
                    and graphs directly to your analytical Python code.
homepage            https://plotly.com/dash

checksums           rmd160  4398fc9d51ed86a27cc9827050b6c8f5cde71e18 \
                    sha256  9155e4b1136b5a6bdae1fbd108f55a2ce9e9b4ac376dace4457c877cc7da279d \
                    size    8517423

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_build-append  \
                    port:py${python.version}-hatch-jupyter-builder \
                    port:py${python.version}-jupyter_packaging

    depends_lib-append \
        port:py${python.version}-flask \
        port:py${python.version}-importlib-metadata \
        port:py${python.version}-janus \
        port:py${python.version}-nest_asyncio \
        port:py${python.version}-plotly \
        port:py${python.version}-pydantic \
        port:py${python.version}-requests \
        port:py${python.version}-retrying \
        port:py${python.version}-typing_extensions \
        port:py${python.version}-werkzeug

    platform darwin {
        if {${os.major} > 21} {
            depends_lib-append \
                    port:nodejs24
        }
        if {${os.major} > 18 && ${os.major} < 22} {
            depends_lib-append \
                    port:nodejs22
        }
        if {${os.major} > 15 && ${os.major} < 19} {
            depends_lib-append \
                    port:nodejs20
        }
        if {${os.major} > 10 && ${os.major} < 16} {
            depends_lib-append \
                    port:nodejs16
        }

        if {${os.major} > 15} {
            depends_build-append \
                    port:npm11
        }
        if {${os.major} > 12 && ${os.major} < 16} {
            depends_build-append \
                    port:npm9
        }
        if {${os.major} < 13} {
            depends_build-append \
                    port:npm8
        }
    }
}
