summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToyohisa Kameyama <fj5358cc@fujitsu.com>2022-08-24 02:06:49 +0900
committerGitHub <noreply@github.com>2022-08-23 10:06:49 -0700
commita08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5 (patch)
tree97f9728067bb91442bd36f8a9ee99d437fed79b5
parent00feccde3450e61339796e40c796d380ff6a14a3 (diff)
downloadspack-a08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5.tar.gz
spack-a08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5.tar.bz2
spack-a08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5.tar.xz
spack-a08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5.zip
py-scipy: Fortran compiler specify code is change to setup.cfg for Fujitsu compiler (#32142)
* py-numpy: Change Fortran detect order for Fujitsu Compiler. * create setup.cfg instead of command line.
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index f7c3425958..b8ca9e61c9 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -112,6 +112,13 @@ class PyScipy(PythonPackage):
# Pick up Blas/Lapack from numpy
self.spec["py-numpy"].package.set_blas_lapack()
+ @run_before("install")
+ def set_fortran_compiler(self):
+ if self.spec.satisfies("%fj"):
+ with open("setup.cfg", "w") as f:
+ f.write("[config_fc]\n")
+ f.write("fcompiler = fujitsu\n")
+
def setup_build_environment(self, env):
# https://github.com/scipy/scipy/issues/9080
env.set("F90", spack_fc)
@@ -125,12 +132,6 @@ class PyScipy(PythonPackage):
# Pick up Blas/Lapack from numpy
self.spec["py-numpy"].package.setup_build_environment(env)
- def install_options(self, spec, prefix):
- args = []
- if spec.satisfies("%fj"):
- args.extend(["config_fc", "--fcompiler=fujitsu"])
- return args
-
@run_after("install")
@on_package_attributes(run_tests=True)
def install_test(self):