# -*- 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-contourpy
version             1.3.3
revision            0

categories-append   math
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Python library for calculating contours of 2D quadrilateral grids
long_description    {*}${description}

homepage            https://github.com/contourpy/contourpy

checksums           rmd160  8143a27dff483f9f7d625b40147244ec31051abe \
                    sha256  083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880 \
                    size    13466174

python.versions     39 310 311 312 313
python.pep517_backend   meson

if {${name} ne ${subport}} {
    if {${python.version} == 39} {
        version     1.3.0
        revision    0
        checksums   rmd160  d59e1a10e81930959c3b7692e94fb5d98692fddc \
                    sha256  7ffa0db17717a8ffb127efd0c95a4362d996b892c2904db72428d5b52e1938a4 \
                    size    13464370
    } elseif {${python.version} == 310} {
        version     1.3.2
        revision    0
        checksums   rmd160  601accd9adb86a11ff055957da0262fb2c9517a2 \
                    sha256  b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54 \
                    size    13466130
    }

    patchfiles-append   patch-no-Werror-meson.build.diff

    compiler.cxx_standard   2017

    build.env-append    PATH=$env(PATH):${python.prefix}/bin

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

    depends_lib-append \
                    port:py${python.version}-numpy

    test.run        yes

    livecheck.type  none
}
