go: fixed GOROOT_BOOTSTRAP without workarounds (#2671)
This commit is contained in:
parent
c3cd948537
commit
8fe5fb7988
@ -87,5 +87,8 @@ def install(self, spec, prefix):
|
||||
else:
|
||||
shutil.copy2(f, os.path.join(prefix, f))
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dep_spec):
|
||||
spack_env.set('GOROOT_BOOTSTRAP', self.spec.prefix)
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
spack_env.set('GOROOT_FINAL', self.spec.prefix)
|
||||
|
@ -47,7 +47,7 @@
|
||||
class Go(Package):
|
||||
"""The golang compiler and build environment"""
|
||||
homepage = "https://golang.org"
|
||||
url='https://storage.googleapis.com/golang/go1.7.4.src.tar.gz'
|
||||
url = 'https://storage.googleapis.com/golang/go1.7.4.src.tar.gz'
|
||||
|
||||
extendable = True
|
||||
|
||||
@ -104,14 +104,7 @@ def install(self, spec, prefix):
|
||||
shutil.copy2(f, os.path.join(prefix, f))
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
try:
|
||||
spack_env.set('GOROOT_FINAL', self.spec.prefix)
|
||||
spack_env.set('GOROOT_BOOTSTRAP', self.spec['go-bootstrap'].prefix)
|
||||
except KeyError:
|
||||
# Needed because we try to get a build-only
|
||||
# dependency, and this may fail during module
|
||||
# file creation
|
||||
pass
|
||||
spack_env.set('GOROOT_FINAL', self.spec.prefix)
|
||||
|
||||
def setup_dependent_package(self, module, ext_spec):
|
||||
"""Called before go modules' install() methods.
|
||||
|
Loading…
Reference in New Issue
Block a user