From ca62819261ad527d46a26ad705ddf7c0cfbd961b Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Fri, 23 Sep 2022 07:41:44 -0600 Subject: [PATCH] Packages/py scipy (#32767) --- .../repos/builtin/packages/py-scipy/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index b8ca9e61c9..f2ac3ae4b0 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -118,6 +118,15 @@ def set_fortran_compiler(self): with open("setup.cfg", "w") as f: f.write("[config_fc]\n") f.write("fcompiler = fujitsu\n") + elif self.spec.satisfies("%intel") or self.spec.satisfies("%oneapi"): + if self.spec.satisfies("target=x86:"): + with open("setup.cfg", "w") as f: + f.write("[config_fc]\n") + f.write("fcompiler = intel\n") + elif self.spec.satisfies("target=x86_64:"): + with open("setup.cfg", "w") as f: + f.write("[config_fc]\n") + f.write("fcompiler = intelem\n") def setup_build_environment(self, env): # https://github.com/scipy/scipy/issues/9080 @@ -129,6 +138,11 @@ def setup_build_environment(self, env): if self.spec.satisfies("^py-numpy@1.16:1.17"): env.set("NPY_DISTUTILS_APPEND_FLAGS", "1") + # https://github.com/scipy/scipy/issues/14935 + if self.spec.satisfies("%intel ^py-pythran") or self.spec.satisfies("%oneapi ^py-pythran"): + if self.spec["py-pythran"].version < Version("0.12"): + env.set("SCIPY_USE_PYTHRAN", "0") + # Pick up Blas/Lapack from numpy self.spec["py-numpy"].package.setup_build_environment(env)