Skip to content
Snippets Groups Projects
Commit 8fe5fb79 authored by Massimiliano Culpo's avatar Massimiliano Culpo Committed by Todd Gamblin
Browse files

go: fixed GOROOT_BOOTSTRAP without workarounds (#2671)

parent c3cd9485
No related branches found
No related tags found
No related merge requests found
...@@ -87,5 +87,8 @@ def install(self, spec, prefix): ...@@ -87,5 +87,8 @@ def install(self, spec, prefix):
else: else:
shutil.copy2(f, os.path.join(prefix, f)) 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): def setup_environment(self, spack_env, run_env):
spack_env.set('GOROOT_FINAL', self.spec.prefix) spack_env.set('GOROOT_FINAL', self.spec.prefix)
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
class Go(Package): class Go(Package):
"""The golang compiler and build environment""" """The golang compiler and build environment"""
homepage = "https://golang.org" 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 extendable = True
...@@ -104,14 +104,7 @@ def install(self, spec, prefix): ...@@ -104,14 +104,7 @@ def install(self, spec, prefix):
shutil.copy2(f, os.path.join(prefix, f)) shutil.copy2(f, os.path.join(prefix, f))
def setup_environment(self, spack_env, run_env): def setup_environment(self, spack_env, run_env):
try: spack_env.set('GOROOT_FINAL', self.spec.prefix)
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
def setup_dependent_package(self, module, ext_spec): def setup_dependent_package(self, module, ext_spec):
"""Called before go modules' install() methods. """Called before go modules' install() methods.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment