# -*- 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.7.0
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  96ced993a27073eba2c94d7f456c579f6178a67d \
                    sha256  9b36ee73bb3d56f34dd4c6486cc331ac5411d5f13f8bd2bc073ce177c48899b7 \
                    size    3103623

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

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

foreach pv {314 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}-in-n-out \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-lazy_loader \
                    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}-psygnal \
                    port:py${python.version}-pydantic \
                    port:py${python.version}-pydantic-compat \
                    port:py${python.version}-pydantic-extra-types \
                    port:py${python.version}-pydantic_settings \
                    port:py${python.version}-pygments \
                    port:py${python.version}-qtpy \
                    port:py${python.version}-scikit-image \
                    port:py${python.version}-scipy \
                    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
