Removed subprocess.call calls and replaced with spack symlink calls
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
from subprocess import call
|
|
||||||
import sys
|
import sys
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ class Lapack(Package):
|
|||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# CMake could be used if the build becomes more complex
|
# 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
|
# Retrieves name of package that satisifies 'blas' virtual dependency
|
||||||
blas_name = next(m for m in ('netlib_blas', 'atlas') if m in spec)
|
blas_name = next(m for m in ('netlib_blas', 'atlas') if m in spec)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
from subprocess import call
|
|
||||||
|
|
||||||
class NetlibBlas(Package):
|
class NetlibBlas(Package):
|
||||||
"""Netlib reference BLAS"""
|
"""Netlib reference BLAS"""
|
||||||
@@ -15,7 +14,7 @@ class NetlibBlas(Package):
|
|||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
call(['cp', 'make.inc.example', 'make.inc'])
|
symlink('make.inc.example', 'make.inc')
|
||||||
make('blaslib')
|
make('blaslib')
|
||||||
|
|
||||||
# Tests that blas builds correctly
|
# Tests that blas builds correctly
|
||||||
@@ -26,4 +25,4 @@ def install(self, spec, prefix):
|
|||||||
install('librefblas.a', prefix.lib)
|
install('librefblas.a', prefix.lib)
|
||||||
|
|
||||||
# Blas virtual package should provide blas.a
|
# 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')
|
||||||
Reference in New Issue
Block a user