diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index 77a074e809dfd82ce22c8dbed91f39819dd73994..050feab24d2cbe2c1d5c495f0ffb3114bddb2737 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -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) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index cfd03ec35584646b8319fe6d9558f900a0c18664..2d797a37345dba9eaa54e1339f924069cfe7c6bf 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -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.