acfl: truncate version version number (#41354)
When using `spack external find acfl`, we get the full version string with 4 components in `packages.yaml`. This PR truncates the version nubmer when finding the `armpl` component to be able to run without intervention.
This commit is contained in:
parent
6ff07c7753
commit
40209506b7
@ -184,12 +184,13 @@ def get_os(ver):
|
||||
|
||||
def get_armpl_version_to_3(spec):
|
||||
"""Return version string with 3 numbers"""
|
||||
version_len = len(spec.version)
|
||||
version = spec.version.up_to(3)
|
||||
version_len = len(version)
|
||||
assert version_len == 2 or version_len == 3
|
||||
if version_len == 2:
|
||||
return spec.version.string + ".0"
|
||||
return version.string + ".0"
|
||||
elif version_len == 3:
|
||||
return spec.version.string
|
||||
return version.string
|
||||
|
||||
|
||||
def get_armpl_prefix(spec):
|
||||
|
Loading…
Reference in New Issue
Block a user