rework for gopath and bootstrapping

This commit is contained in:
Tom Scogland
2016-05-17 05:21:11 -07:00
parent 62dd040a8f
commit af4af94203
4 changed files with 78 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
from spack import *
import os
class Hub(Package):
@@ -16,7 +17,8 @@ class Hub(Package):
extends("go")
def install(self, spec, prefix):
os.environ['GOPATH'] = os.getcwd()
env = os.environ
env['GOPATH'] = self.stage.source_path + ':' + env['GOPATH']
bash = which('bash')
bash(os.path.join('script', 'build'), '-o', os.path.join(prefix, 'bin',
'hub'))