@@ -28,6 +28,8 @@ class PyNumba(PythonPackage):
2828 version ("0.50.1" , sha256 = "89e81b51b880f9b18c82b7095beaccc6856fcf84ba29c4f0ced42e4e5748a3a7" )
2929 version ("0.48.0" , sha256 = "9d21bc77e67006b5723052840c88cc59248e079a907cc68f1a1a264e1eaba017" )
3030
31+ variant ("tbb" , default = False , description = "Build with Intel Threading Building Blocks" )
32+
3133 depends_on ("python@3.8:3.11" , when = "@0.57:" , type = ("build" , "run" ))
3234 depends_on ("python@3.7:3.10" , when = "@0.55:0.56" , type = ("build" , "run" ))
3335 depends_on ("python@3.7:3.9" , when = "@0.54" , type = ("build" , "run" ))
@@ -53,6 +55,12 @@ class PyNumba(PythonPackage):
5355 depends_on ("py-llvmlite@0.31" , when = "@0.48" , type = ("build" , "run" ))
5456 depends_on ("py-importlib-metadata" , when = "@0.56:^python@:3.8" , type = ("build" , "run" ))
5557
58+ depends_on ("tbb" , when = "+tbb" )
59+ conflicts ("~tbb" , when = "@:0.50" ) # No way to disable TBB
5660 # Version 6.0.0 of llvm had a hidden symbol which breaks numba at runtime.
5761 # See https://reviews.llvm.org/D44140
5862 conflicts ("^llvm@6.0.0" )
63+
64+ def setup_build_environment (self , env ):
65+ if self .spec .satisfies ("~tbb" ):
66+ env .set ("NUMBA_DISABLE_TBB" , "yes" )
0 commit comments