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

name                py-numba
version             0.61.2
revision            0
categories-append   devel
license             BSD

python.versions     39 310 311 312 313

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  58888f40f88483dbc8510dddf7fe5d7b6faddb91 \
                    sha256  8750ee147940a6637b80ecf7f95062185ad8726c8c28a2295b8ec1160a196f7d \
                    size    2820615

variant tbb description "Add support for TBB" {
    if {$subport ne $name} {
        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} eq 39} {
        version         0.59.1
        checksums       rmd160  808ec94a7bde37a3d68da2b47f925e2710001f79 \
                        sha256  76f69132b96028d2774ed20415e8c528a34e3299a40581bae178f0994a2f370b \
                        size    2652730
    } else {
        # Requires numpy 2.0
        build.args-append   --skip-dependency-check
    }

    livecheck.type      none
}
