summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index 10d439187d..bcbc6cf689 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -97,7 +97,7 @@ class Cuda(Package):
def setup_build_environment(self, env):
if self.spec.satisfies('@10.1.243:'):
- libxml2_home = self.spec['libxml2'].prefix
+ libxml2_home = self.spec['libxml2'].prefix
env.set('LIBXML2HOME', libxml2_home)
env.append_path('LD_LIBRARY_PATH', libxml2_home.lib)
@@ -117,9 +117,6 @@ class Cuda(Package):
"presence of /tmp/cuda-installer.log "
"please remove the file and try again ")
runfile = glob(join_path(self.stage.source_path, 'cuda*_linux*'))[0]
- chmod = which('chmod')
- chmod('+x', runfile)
- runfile = which(runfile)
# Note: NVIDIA does not officially support many newer versions of
# compilers. For example, on CentOS 6, you must use GCC 4.4.7 or
@@ -130,6 +127,7 @@ class Cuda(Package):
# CUDA 10.1+ has different cmdline options for the installer
arguments = [
+ runfile, # the install script
'--silent', # disable interactive prompts
'--override', # override compiler version checks
'--toolkit', # install CUDA Toolkit
@@ -139,8 +137,8 @@ class Cuda(Package):
else:
arguments.append('--verbose') # Verbose log file
arguments.append('--toolkitpath=%s' % prefix) # Where to install
-
- runfile(*arguments)
+ install_shell = which('sh')
+ install_shell(*arguments)
try:
os.remove('/tmp/cuda-installer.log')
except OSError: