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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user