Removed subprocess.call calls and replaced with spack symlink calls

This commit is contained in:
Benjamin Walters
2015-03-19 04:37:21 -05:00
parent 3d2df174d1
commit 1b75b34eb6
2 changed files with 3 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
from spack import *
from subprocess import call
import sys
import glob
@@ -22,7 +21,7 @@ class Lapack(Package):
def install(self, spec, prefix):
# CMake could be used if the build becomes more complex
call(['cp', 'make.inc.example', 'make.inc'])
symlink('make.inc.example', 'make.inc')
# Retrieves name of package that satisifies 'blas' virtual dependency
blas_name = next(m for m in ('netlib_blas', 'atlas') if m in spec)

View File

@@ -1,5 +1,4 @@
from spack import *
from subprocess import call
class NetlibBlas(Package):
"""Netlib reference BLAS"""
@@ -15,7 +14,7 @@ class NetlibBlas(Package):
parallel = False
def install(self, spec, prefix):
call(['cp', 'make.inc.example', 'make.inc'])
symlink('make.inc.example', 'make.inc')
make('blaslib')
# Tests that blas builds correctly
@@ -26,4 +25,4 @@ def install(self, spec, prefix):
install('librefblas.a', prefix.lib)
# Blas virtual package should provide blas.a
call(['ln', '-s', prefix.lib + '/librefblas.a', prefix.lib + '/blas.a'])
symlink(prefix.lib + '/librefblas.a', prefix.lib + '/blas.a')