# -*- 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           app 1.0
PortGroup           python 1.0

name                napari
version             0.6.3
revision            0
categories-prepend  science
license             BSD
maintainers         {mps @Schamschula} openmaintainer
description         napari is a fast, interactive, multi-dimensional image viewer for \
                    Python.
long_description    {*}${description} It's designed for browsing, annotating, and \
                    analyzing large multi-dimensional images. It's built on top of Qt \
                    (for the GUI), vispy (for performant GPU-based rendering), and the \
                    scientific Python stack (numpy, scipy).
supported_archs     noarch
platforms           {darwin any}
homepage            https://github.com/napari/napari

checksums           rmd160  57097214b0e426d864aaf914f0f75fc768718d51 \
                    sha256  9228359e84fd7d9c5e9bf5c511dd5a77ecb3e56a967d9cb8213188d151847180 \
                    size    3217286

variant python310 conflicts python311 python312 python313 description {Use Python 3.10} {}
variant python311 conflicts python310 python312 python313 description {Use Python 3.11} {}
variant python312 conflicts python310 python311 python313 description {Use Python 3.12} {}
variant python313 conflicts python310 python311 python312 description {Use Python 3.13} {}

if {![variant_isset python310] && ![variant_isset python311] && ![variant_isset python312]} {
    default_variants +python313
}

foreach pv {313 312 311 310} {
    if {[variant_isset python${pv}]} {
        python.default_version ${pv}
        break
    }
}

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

depends_lib-append  \
                    port:py${python.version}-app-model \
                    port:py${python.version}-appdirs \
                    port:py${python.version}-cachey \
                    port:py${python.version}-certifi \
                    port:py${python.version}-click \
                    port:py${python.version}-dask \
                    port:py${python.version}-imageio \
                    port:py${python.version}-importlib-metadata \
                    port:py${python.version}-in-n-out \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-lxml_html_clean \
                    port:py${python.version}-magicgui \
                    port:py${python.version}-napari-console \
                    port:py${python.version}-napari-plugin-engine \
                    port:py${python.version}-napari-svg \
                    port:py${python.version}-npe2 \
                    port:py${python.version}-numpy \
                    port:py${python.version}-numpydoc \
                    port:py${python.version}-opengl \
                    port:py${python.version}-pandas \
                    port:py${python.version}-Pillow \
                    port:py${python.version}-pint \
                    port:py${python.version}-psutil \
                    port:py${python.version}-pydantic \
                    port:py${python.version}-pydantic-compat \
                    port:py${python.version}-qtpy \
                    port:py${python.version}-scikit-image \
                    port:py${python.version}-scipy \
                    port:py${python.version}-sphinx \
                    port:py${python.version}-superqt \
                    port:py${python.version}-tifffile \
                    port:py${python.version}-toolz \
                    port:py${python.version}-tqdm \
                    port:py${python.version}-typing_extensions \
                    port:py${python.version}-vispy \
                    port:py${python.version}-wrapt \
                    port:py${python.version}-yaml

post-extract {
    copy ${filespath}/icon.icns ${worksrcpath}/icon.icns
}

app.executable      ${python.prefix}/bin/napari
app.icon            ${worksrcpath}/icon.icns
