[pygobject] setup.py: force GCC to use colors in case of stdout.isatty()
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] setup.py: force GCC to use colors in case of stdout.isatty()
- Date: Thu, 12 Apr 2018 14:32:18 +0000 (UTC)
commit 773bb9de8cfc6dbcce88854e9cc35fc37ed1072e
Author: Christoph Reiter <reiter christoph gmail com>
Date: Thu Apr 12 09:28:20 2018 +0200
setup.py: force GCC to use colors in case of stdout.isatty()
setup.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/setup.py b/setup.py
index 74b5d5f3..90fea1ba 100755
--- a/setup.py
+++ b/setup.py
@@ -929,6 +929,10 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-fvisibility=hidden",
]
+ # force GCC to use colors
+ if hasattr(sys.stdout, "isatty") and sys.stdout.isatty():
+ args.append("-fdiagnostics-color")
+
_cache[cache_key] = filter_compiler_arguments(compiler, args)
ext.extra_compile_args += _cache[cache_key]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]