# -*- 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-ipympl
version             0.9.3
revision            0
license             BSD
supported_archs     noarch
platforms           {darwin any}

python.versions     310 311

maintainers         nomaintainer

description         Matplotlib Jupyter Extension
long_description    Leveraging the Jupyter interactive widgets framework, \
                    jupyter-matplotlib enables the interactive features of \
                    matplotlib in the Jupyter notebook and in Jupyterlab.

homepage            https://github.com/matplotlib/jupyter-matplotlib

checksums           rmd160  7524cb752caa0423a00cc15b6ec6881a0961c774 \
                    sha256  49bab75c05673a6881d1aaec5d8ac81d4624f73d292d154c5fb7096f10236a2b \
                    size    267567

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

    depends_lib-append  port:py${python.version}-ipython \
                        port:py${python.version}-ipywidgets \
                        port:py${python.version}-jupyterlab \
                        port:py${python.version}-matplotlib

    patchfiles          patch-package.json.diff \
                        patch-pyproject.toml.diff

    post-patch {
        reinplace "s|%PYVER%|${python.branch}|g" ${worksrcpath}/package.json
    }
}
