aboutsummaryrefslogtreecommitdiff
path: root/mesonlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonlib.py')
-rw-r--r--mesonlib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonlib.py b/mesonlib.py
index f547379..313ffd6 100644
--- a/mesonlib.py
+++ b/mesonlib.py
@@ -48,6 +48,12 @@ class File:
def split(self, s):
return self.fname.split(s)
+ def __eq__(self, other):
+ return (self.fname, self.subdir, self.is_built) == (other.fname, other.subdir, other.is_built)
+
+ def __hash__(self):
+ return hash((self.fname, self.subdir, self.is_built))
+
def is_osx():
return platform.system().lower() == 'darwin'