summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2015-11-04 13:08:48 -0800
committerMario Melara <maamelara@gmail.com>2015-11-04 13:08:48 -0800
commit9bf8e8573cff42581074ed9e492ab0e0bc6c7253 (patch)
treea06184e45e89984e3fe9349d699c0c81faec2b2c /lib
parente3a02ea5c70a91731c042ee6b7c00e8c3395a254 (diff)
downloadspack-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.py17
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()