openblas: .libs() uses self.libraries attribute (#48942)

Currently this is hardcoded to the same value as listed in the class
definition. If one ever overrides this attribute, such as:

```
packages:
  openblas:
    package_attributes:
      libraries = [ 'libopenblaso64', ]
```

this patch will make sure that override also in the
`spec['openblas'].libs()` call. (Which happens in `hypre`, likely
others).

( see
https://spack.readthedocs.io/en/latest/packages_yaml.html#assigning-package-attributes
)

Thanks to becker33 for debugging help in Slack
This commit is contained in:
Matthew Lesko 2025-02-14 00:44:12 -05:00 committed by GitHub
parent 87cc3280b6
commit 1a42bf043f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -322,7 +322,7 @@ def libs(self):
spec = self.spec
# Look for openblas{symbol_suffix}
name = ["libopenblas", "openblas"]
name = self.libraries
search_shared = bool(spec.variants["shared"].value)
suffix = spec.variants["symbol_suffix"].value
if suffix != "none":