add GOPATH support

Also fixes flex to depend on bison for its yacc implementation.
This commit is contained in:
Tom Scogland
2016-05-16 09:30:37 -07:00
parent dacedfcc0e
commit 62dd040a8f
2 changed files with 15 additions and 2 deletions

View File

@@ -67,4 +67,14 @@ def setup_dependent_environment(self, spack_env, run_env, ext_spec):
if os.environ.get('GOROOT', False):
tty.warn('GOROOT is set, this is not recommended')
spack_env.set('GOPATH', ext_spec.package.stage.source_path)
# Set GOPATH to include paths of dependencies
for d in extension_spec.traverse():
if d.package.extends(self.spec):
spack_env.prepend_path('GOPATH', d.prefix)
# This *MUST* be first, this is where new code is installed
spack_env.prepend_path('GOPATH', ext_spec.package.stage.source_path)
# Allow packages to find this when using module or dotkit
run_env.prepend_path('GOPATH', ext_spec.prefix)