diff options
author | Mario Melara <maamelara@gmail.com> | 2016-01-09 09:42:36 -0800 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2016-01-09 09:42:36 -0800 |
commit | aab1a67d056bf9f0979f2cebfff607d05ac8b7e9 (patch) | |
tree | 11913ba61ba0ae55caeb9c2d39e4fb70ebd655fe /lib | |
parent | 9615efd940c425b049a142f8c22545c9a04124df (diff) | |
download | spack-aab1a67d056bf9f0979f2cebfff607d05ac8b7e9.tar.gz spack-aab1a67d056bf9f0979f2cebfff607d05ac8b7e9.tar.bz2 spack-aab1a67d056bf9f0979f2cebfff607d05ac8b7e9.tar.xz spack-aab1a67d056bf9f0979f2cebfff607d05ac8b7e9.zip |
Adding needed import modules. Changed platform_name to platform to prevent syntax errors
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/spec.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8f90cc0d7f..264e0c0506 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -91,6 +91,7 @@ specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. """ import sys +import imp import itertools import hashlib import base64 @@ -100,6 +101,7 @@ from external import yaml from external.yaml.error import MarkedYAMLError import llnl.util.tty as tty +from llnl.util.filesystem import join_path from llnl.util.lang import * from llnl.util.tty.color import * @@ -109,6 +111,7 @@ import spack.error import spack.compilers as compilers from spack.version import * +from spack.util.naming import mod_to_class from spack.util.string import * from spack.util.prefix import Prefix from spack.virtual import ProviderIndex @@ -1246,9 +1249,9 @@ class Spec(object): if platform != '': # Find the class for the platform name given - file_path = join_path(spack.platform_path, platform_name) + file_path = join_path(spack.platform_path, platform) platform_mod = imp.load_source('spack.platforms', file_path + '.py') - cls = getattr(platform_mod, mod_to_class(platform_name)) + cls = getattr(platform_mod, mod_to_class(platform)) platform = cls() else: platform = spack.architecture.sys_type() |