# -*- 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-pywavelets
version             1.9.0
revision            1

categories-append   science math
license             MIT

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

maintainers         {stromnov @stromnov} openmaintainer

description         PyWavelets is a Python wavelet transforms module
long_description    {*}${description}.

homepage            https://github.com/PyWavelets/pywt

checksums           md5 a725b29ce4be34661acce4fc634817e5 \
                    rmd160 1091e4aca7596145f2720de00330ce5b642e1f30 \
                    sha256 148d12203377772bea452a59211d98649c8ee4a05eff019a9021853a36babdc8 \
                    size   3938340

if {${name} ne ${subport}} {
    if {${python.version} == 39} {
        version             1.5.0
        revision            1
        checksums           md5 6af08b6f004d04d9ee3464a1ee7b7f39 \
                            rmd160 c45feb627bf1ffec3118f77f7ca3a7232b23b1ed \
                            sha256 d9e25c7cabef7ccd53f5fead26ab22152fe4cb937bad7411b5d506e2b5de38f6 \
                            size   3937269
        patchfiles  patch-PY39-allow-NumPy_v2-pyproject.toml.diff
    } elseif {${python.version} == 310} {
        version             1.8.0
        revision            1
        checksums           md5     41d8521600edebc0f934218f9d63df3c \
                            rmd160  d68d045d7ce04de6657565256cb7d25186b32c39 \
                            sha256  f3800245754840adc143cbc29534a1b8fc4b8cff6e9d403326bd52b7bb5c35aa \
                            size    3935274
    } else {

        compiler.blacklist-append \
                            {clang < 1000}
    }

    depends_build-append \
                    port:py${python.version}-cython
    # Wants to run just 'cython'
    build.env-append    PATH=${python.prefix}/bin:$::env(PATH)

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

    livecheck.type      none
}
