py-scipy: print error message if no Fortran compiler is available (#34439)

This commit is contained in:
Michael Kuhn 2022-12-10 20:19:50 +01:00 committed by GitHub
parent 9517dab409
commit 57383a2294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,11 @@ def set_blas_lapack(self):
@run_before("install")
def set_fortran_compiler(self):
if self.compiler.f77 is None or self.compiler.fc is None:
raise InstallError(
"py-scipy requires Fortran compilers. Configure Fortran compiler to proceed."
)
if self.spec.satisfies("%fj"):
with open("setup.cfg", "w") as f:
f.write("[config_fc]\n")