summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/spec.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index b95f43e901..86eaa3bb91 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -449,6 +449,9 @@ class ArchSpec(object):
def __repr__(self):
return str(self)
+ def __contains__(self, string):
+ return string in str(self)
+
@key_ordering
class CompilerSpec(object):