Move temp directory configuration to config.yaml

- Moved temp finding logic to spack.stage
- Updated stage tests
- Added tests for new path substaitution of $user, $spack, $tempdir
This commit is contained in:
Todd Gamblin
2016-10-27 22:36:59 -07:00
parent 9347f86939
commit 0da639298c
9 changed files with 330 additions and 176 deletions

View File

@@ -25,7 +25,6 @@
import collections
import errno
import fileinput
import getpass
import glob
import numbers
import os
@@ -46,7 +45,6 @@
'can_access',
'change_sed_delimiter',
'copy_mode',
'expand_user',
'filter_file',
'find_libraries',
'fix_darwin_install_name',
@@ -229,16 +227,6 @@ def is_exe(path):
return os.path.isfile(path) and os.access(path, os.X_OK)
def expand_user(path):
"""Find instances of '%u' in a path and replace with the current user's
username."""
username = getpass.getuser()
if not username and '%u' in path:
tty.die("Couldn't get username to complete path '%s'" % path)
return path.replace('%u', username)
def mkdirp(*paths):
"""Creates a directory, as well as parent directories if needed."""
for path in paths: