# -*- 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
PortGroup           github 1.0
PortGroup           compiler_wrapper 1.0

github.setup        numba numba 0.58.0
name                py-numba
revision            0
categories-append   devel
license             BSD

python.versions     38 39 310 311
python.pep517       yes

maintainers         {stromnov @stromnov} openmaintainer

description         Numba is a NumPy aware dynamic compiler for Python.

long_description    Numba is an Open Source NumPy-aware optimizing compiler \
                    for Python. It uses the remarkable LLVM compiler \
                    infrastructure to compile Python syntax to machine code.

homepage            https://numba.pydata.org/

checksums           rmd160  02d12eb84ad4a4ef29ba0ef540db18c09bdad880 \
                    sha256  092c21b4f832ad18a34b1408f7f411ce29bc7b7b3be18a824ad41c3553466a66 \
                    size    2691724

variant tbb description "Add support for TBB" {
    depends_lib-append  port:onetbb
    build.env-append    TBBROOT=${prefix}/libexec/onetbb
}

if {${name} ne ${subport}} {
    compiler.openmp_version 2.5

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

    if {${python.version} < 39} {
        depends_lib-append  port:py${python.version}-importlib-metadata
    }
} else {
    github.livecheck.regex  {([0-9.]+)}
}
