# -*- 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-lonboard
version             0.16.0
revision            0

license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         A Python library for fast, interactive geospatial vector data \
                    visualization in Jupyter.
long_description    {*}${description}
homepage            https://github.com/developmentseed/lonboard

checksums           rmd160  f4ea98d98f5552bbf5e0b6f852d2a1abfb28abb4 \
                    sha256  112f1a17648c82d58fb1dc3f0b58ce977a3e810de23094849432652858948460 \
                    size    1107879

python.versions     310 311 312 313 314

python.pep517_backend \
                    hatch

if {${name} ne ${subport}} {
    depends_lib-append  \
                    port:py${python.version}-anywidget \
                    port:py${python.version}-arro3-compute \
                    port:py${python.version}-arro3-core \
                    port:py${python.version}-arro3-io \
                    port:py${python.version}-ipywidgets \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pyproj \
                    port:py${python.version}-traitlets \
                    port:py${python.version}-typing_extensions

    variant cli description "Add cli support" {
        depends_lib-append  \
                    port:py${python.version}-click \
                    port:py${python.version}-pyogrio \
                    port:py${python.version}-shapely
    }

    variant geopandas description "Add geopandas support" {
        depends_lib-append  \
                    port:py${python.version}-geopandas \
                    port:py${python.version}-pyarrow
    }

    if {${python.version} > 310} {
        variant geotiff description "Add geotiff support" {
            depends_lib-append  \
                    port:py${python.version}-async-geotiff
        }
    }

    variant movingpandas description "Add movingpandas support" {
        depends_lib-append  \
                    port:py${python.version}-movingpandas
    }

    default_variants +cli +geopandas +movingpandas
}
