# -*- 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-tifffile
version             2026.6.1
revision            0

license             BSD
maintainers         {mps @Schamschula} openmaintainer

categories-append   science
description         Store numpy data arrays in TIFF files.
long_description    {*}${description} Read image and metadata from TIFF-like files used in \
                    bioimaging.
homepage            https://github.com/cgohlke/tifffile/

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  b78ca7553f6c08d13a2bf15cf7fd24137a7d8a22 \
                    sha256  626c892c0e899d959b9438e7c0e1491dc154a7fead1f1f37a991724a50eceba9 \
                    size    429694

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    if {${python.version} <= 311} {
        version     2026.3.3
        revision    0

        checksums   rmd160  1023c6142ff25b4977068d60e6505be11a65653e \
                    sha256  d9a1266bed6f2ee1dd0abde2018a38b4f8b2935cb843df381d70ac4eac5458b7 \
                    size    388745
    }

    depends_lib     path:bin/cython-${python.branch}:py${python.version}-cython \
                    port:py${python.version}-numpy

    variant imagecodecs description {Use imagecodecs for encoding or decoding LZW, JPEG, etc.} {
        depends_lib-append \
                    port:py${python.version}-imagecodecs
    }

    variant lxml description {Use lxml for validating and printing XML} {
        depends_lib-append \
                    port:py${python.version}-lxml
    }

    variant matplotlib description {Use matplotlib for plotting} {
        depends_lib-append \
                    port:py${python.version}-matplotlib
    }
}
