summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2023-10-29 19:45:23 +0100
committerGitHub <noreply@github.com>2023-10-29 13:45:23 -0500
commit2e097b4cbd7faea06114405ce28077dd8a2a5ad2 (patch)
treea2a7999dc91caf9681f586e7b8f3675397aeca95
parenta1282337c0a7d833197f3b1b75d9b00cb02dc76a (diff)
downloadspack-2e097b4cbd7faea06114405ce28077dd8a2a5ad2.tar.gz
spack-2e097b4cbd7faea06114405ce28077dd8a2a5ad2.tar.bz2
spack-2e097b4cbd7faea06114405ce28077dd8a2a5ad2.tar.xz
spack-2e097b4cbd7faea06114405ce28077dd8a2a5ad2.zip
py-numcodecs: fix broken sse / avx2 variables (#40754)
-rw-r--r--var/spack/repos/builtin/packages/py-numcodecs/package.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/py-numcodecs/package.py b/var/spack/repos/builtin/packages/py-numcodecs/package.py
index badf48b465..6d466c1917 100644
--- a/var/spack/repos/builtin/packages/py-numcodecs/package.py
+++ b/var/spack/repos/builtin/packages/py-numcodecs/package.py
@@ -49,10 +49,11 @@ class PyNumcodecs(PythonPackage):
# This package likes to compile natively by checking cpu features and then setting flags
# -msse2 and -mavx2, which we want to avoid in Spack. This could go away if the package
# supports external libraries.
- if "avx2" not in self.spec.target.features:
- env.set("DISABLE_NUMCODECS_AVX2", "1")
- if "sse2" not in self.spec.target.features:
- env.set("DISABLE_NUMCODECS_SSE2", "1")
+ if self.spec.satisfies("target=x86_64:"):
+ if "avx2" not in self.spec.target.features:
+ env.set("DISABLE_NUMCODECS_AVX2", "1")
+ if "sse2" not in self.spec.target.features:
+ env.set("DISABLE_NUMCODECS_SSE2", "1")
def flag_handler(self, name, flags):
if name == "cflags":