diff options
author | Matthias Wolf <matthias.wolf@epfl.ch> | 2023-11-30 21:32:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 12:32:10 -0800 |
commit | 40209506b759aece61be03f671048cfa42c423ba (patch) | |
tree | afff6f1472d6f280c24a262f824c814994620bb4 /var | |
parent | 6ff07c7753781b80bfa4a94151506176b7350364 (diff) | |
download | spack-40209506b759aece61be03f671048cfa42c423ba.tar.gz spack-40209506b759aece61be03f671048cfa42c423ba.tar.bz2 spack-40209506b759aece61be03f671048cfa42c423ba.tar.xz spack-40209506b759aece61be03f671048cfa42c423ba.zip |
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.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/acfl/package.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index bbe476a019..d243a0257a 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -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): |