Skip to content

Commit

Permalink
py-numba: add tbb variant (spack#42930)
Browse files Browse the repository at this point in the history
Co-authored-by: Harmen Stoppels <[email protected]>
  • Loading branch information
giordano and haampie authored Mar 1, 2024
1 parent 6614c43 commit 763f444
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions var/spack/repos/builtin/packages/py-numba/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("[email protected]:3.11", when="@0.57:", type=("build", "run"))
depends_on("[email protected]:3.10", when="@0.55:0.56", type=("build", "run"))
depends_on("[email protected]:3.9", when="@0.54", type=("build", "run"))
Expand All @@ -53,6 +55,12 @@ class PyNumba(PythonPackage):
depends_on("[email protected]", 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("^[email protected]")

def setup_build_environment(self, env):
if self.spec.satisfies("~tbb"):
env.set("NUMBA_DISABLE_TBB", "yes")

0 comments on commit 763f444

Please sign in to comment.