summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMosè Giordano <giordano@users.noreply.github.com>2024-03-01 09:03:39 +0000
committerGitHub <noreply@github.com>2024-03-01 02:03:39 -0700
commit763f444d632516cc14db800f3306bba441faec31 (patch)
treed6ba42c96dd9779915703cb04ac5ae6b14d73217
parent6614c4322d01930516fac21d075e4aaf8c422e42 (diff)
downloadspack-763f444d632516cc14db800f3306bba441faec31.tar.gz
spack-763f444d632516cc14db800f3306bba441faec31.tar.bz2
spack-763f444d632516cc14db800f3306bba441faec31.tar.xz
spack-763f444d632516cc14db800f3306bba441faec31.zip
py-numba: add `tbb` variant (#42930)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/py-numba/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-numba/package.py b/var/spack/repos/builtin/packages/py-numba/package.py
index add71b169e..2b5b29bba3 100644
--- a/var/spack/repos/builtin/packages/py-numba/package.py
+++ b/var/spack/repos/builtin/packages/py-numba/package.py
@@ -28,6 +28,8 @@ class PyNumba(PythonPackage):
version("0.50.1", sha256="89e81b51b880f9b18c82b7095beaccc6856fcf84ba29c4f0ced42e4e5748a3a7")
version("0.48.0", sha256="9d21bc77e67006b5723052840c88cc59248e079a907cc68f1a1a264e1eaba017")
+ variant("tbb", default=False, description="Build with Intel Threading Building Blocks")
+
depends_on("python@3.8:3.11", when="@0.57:", type=("build", "run"))
depends_on("python@3.7:3.10", when="@0.55:0.56", type=("build", "run"))
depends_on("python@3.7:3.9", when="@0.54", type=("build", "run"))
@@ -53,6 +55,12 @@ class PyNumba(PythonPackage):
depends_on("py-llvmlite@0.31", when="@0.48", type=("build", "run"))
depends_on("py-importlib-metadata", when="@0.56:^python@:3.8", type=("build", "run"))
+ depends_on("tbb", when="+tbb")
+ conflicts("~tbb", when="@:0.50") # No way to disable TBB
# Version 6.0.0 of llvm had a hidden symbol which breaks numba at runtime.
# See https://reviews.llvm.org/D44140
conflicts("^llvm@6.0.0")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("~tbb"):
+ env.set("NUMBA_DISABLE_TBB", "yes")