# -*- 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-qtconsole
version             5.7.2
revision            0

categories-append   devel
license             BSD
supported_archs     noarch
platforms           {darwin any}

python.versions     310 311 312 313 314

maintainers         {stromnov @stromnov} openmaintainer

description         Jupyter QtConsole
long_description    {*}${description}

homepage            https://jupyter.org

checksums           rmd160  41efe77946bab311f42aacdc813f4fa6edee88f0 \
                    sha256  27b485b9161925924c1d8e78e66bb342e6e3bc49bf675d0a67b49bad9c291521 \
                    size    436661

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-traitlets \
                        port:py${python.version}-jupyter_core \
                        port:py${python.version}-jupyter_client \
                        port:py${python.version}-pygments \
                        port:py${python.version}-ipykernel \
                        port:py${python.version}-ipython-pygments-lexers \
                        port:py${python.version}-qtpy \
                        port:py${python.version}-packaging

    # Note: depends on one of py-pyqt4, py-pyqt5 or py-pyside (first available at runtime)
    notes-append        "Please do not forget to install one of Qt backends: py${python.version}-pyside, py${python.version}-pyqt5 or py${python.version}-pyqt4."

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