diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-04-22 15:53:46 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-04-22 15:53:46 +0300 |
commit | 6237695e96eb57123ab7f02b37b031dd516dbe93 (patch) | |
tree | 67522ebfa8faf083dbe8424f436d29fcddcfcc4e /mesonlib.py | |
parent | bf9b5d7b726c9388e5204fb44969fd11730944c6 (diff) | |
download | meson-6237695e96eb57123ab7f02b37b031dd516dbe93.zip meson-6237695e96eb57123ab7f02b37b031dd516dbe93.tar.gz meson-6237695e96eb57123ab7f02b37b031dd516dbe93.tar.bz2 |
Use File objects for all sources. Fix all basic tests.
Diffstat (limited to 'mesonlib.py')
-rw-r--r-- | mesonlib.py | 6 |
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' |