aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-01-29 23:23:32 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-01-31 20:36:49 +0000
commit310b5189217e3f307fd35be76413697004948186 (patch)
tree3bbc06cf34aafd00d1c8883a02daac592f38b751 /mesonbuild/environment.py
parentb5f6be6733e9a9e4e8d9c1309be84f6f87840034 (diff)
downloadmeson-310b5189217e3f307fd35be76413697004948186.zip
meson-310b5189217e3f307fd35be76413697004948186.tar.gz
meson-310b5189217e3f307fd35be76413697004948186.tar.bz2
env: Add a repr() for MachineInfo
Makes it easier to debug with print()
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index a8889b5..3fb93ca 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -1322,6 +1322,9 @@ class MachineInfo:
return NotImplemented
return not self.__eq__(other)
+ def __repr__(self):
+ return '<MachineInfo: {} {} ({})>'.format(self.system, self.cpu_family, self.cpu)
+
@staticmethod
def detect(compilers = None):
"""Detect the machine we're running on