# -*- 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.6
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).
homepage            https://github.com/napari/napari

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  da2131374e3fb7fe9f75effa77a92d227cb16966 \
                    sha256  8e1adfc737c55c2a619689fad8d9e4d115582e56f09096cf771816b0ec75c3a7 \
                    size    3251386

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
