diff options
author | Paul <pbryant@newmexicoconsortium.org> | 2020-08-24 18:05:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-24 19:05:48 -0500 |
commit | 9e7029d80621cf7a6cf9c167343e77172b4e97f8 (patch) | |
tree | 3af35769660a3a9f0b1ac3ec34d2c38340a92f86 /var/spack/repos/builtin/packages/go | |
parent | 6f2f02366a7b759e0718747177e4a8667c330cee (diff) | |
download | spack-9e7029d80621cf7a6cf9c167343e77172b4e97f8.tar.gz spack-9e7029d80621cf7a6cf9c167343e77172b4e97f8.tar.bz2 spack-9e7029d80621cf7a6cf9c167343e77172b4e97f8.tar.xz spack-9e7029d80621cf7a6cf9c167343e77172b4e97f8.zip |
Added Go 1.15 and find external package. (#18235)
Diffstat (limited to 'var/spack/repos/builtin/packages/go')
-rw-r--r-- | var/spack/repos/builtin/packages/go/package.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 1d7982f866..9baeb6c44b 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -5,6 +5,7 @@ import os import platform +import re import llnl.util.tty as tty from spack import * @@ -35,7 +36,9 @@ class Go(Package): url = 'https://dl.google.com/go/go1.12.6.src.tar.gz' extendable = True + executables = ['^go$'] + version('1.15', sha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a') version('1.14.6', sha256='73fc9d781815d411928eccb92bf20d5b4264797be69410eac854babe44c94c09') version('1.14.5', sha256='ca4c080c90735e56152ac52cd77ae57fe573d1debb1a58e03da9cc362440315c') version('1.14.4', sha256='7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584') @@ -108,6 +111,12 @@ class Go(Package): # The fix for this issue has been merged into the 1.8 tree. patch('misc-cgo-testcshared.patch', level=0, when='@1.6.4:1.7.5') + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('version', output=str, error=str) + match = re.search(r'go version go(\S+)', output) + return match.group(1) if match else None + # NOTE: Older versions of Go attempt to download external files that have # since been moved while running the test suite. This patch modifies the # test files so that these tests don't cause false failures. |