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.
This commit is contained in:
Toyohisa Kameyama 2022-08-24 02:06:49 +09:00 committed by GitHub
parent 00feccde34
commit a08d6e790d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,6 +112,13 @@ def set_blas_lapack(self):
# 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 @@ def setup_build_environment(self, env):
# 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):