diff options
author | Mario Melara <maamelara@gmail.com> | 2015-11-04 13:08:48 -0800 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2015-11-04 13:08:48 -0800 |
commit | 9bf8e8573cff42581074ed9e492ab0e0bc6c7253 (patch) | |
tree | a06184e45e89984e3fe9349d699c0c81faec2b2c /lib | |
parent | e3a02ea5c70a91731c042ee6b7c00e8c3395a254 (diff) | |
download | spack-9bf8e8573cff42581074ed9e492ab0e0bc6c7253.tar.gz spack-9bf8e8573cff42581074ed9e492ab0e0bc6c7253.tar.bz2 spack-9bf8e8573cff42581074ed9e492ab0e0bc6c7253.tar.xz spack-9bf8e8573cff42581074ed9e492ab0e0bc6c7253.zip |
generic linux architecture subclass
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/architectures/linux.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py new file mode 100644 index 0000000000..7238575660 --- /dev/null +++ b/lib/spack/spack/architectures/linux.py @@ -0,0 +1,17 @@ +import subprocess +from spack.architecture import Architecture + +class Linux(Architecture): + priority = 60 + front_end = "x86_64" + back_end = "x86_64" + default = "x86_64" + + def __init__(self): + super(Linux, self).__init__('linux') + + @classmethod + def detect(self): + arch = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + arch, _ = arch.communicate() + return 'x86_64' in arch.strip() |