Blob Blame Raw
commit 875a96c21a459915ff32f8098dbb5bb8f85f758f
Author: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date:   Thu Mar 21 04:16:17 2019 -0400

    Don't print anything in setup if quiet.

diff --git a/paperwork-gtk/setup.py b/paperwork-gtk/setup.py
index d8a833ed..8ece54c1 100755
--- a/paperwork-gtk/setup.py
+++ b/paperwork-gtk/setup.py
@@ -7,12 +7,15 @@ import sys
 from setuptools import setup, find_packages
 
 
+quiet = '--quiet' in sys.argv or '-q' in sys.argv
+
 try:
     with codecs.open("src/paperwork/_version.py", "r", encoding="utf-8") \
             as file_descriptor:
         version = file_descriptor.readlines()[1].strip()
         version = version.split(" ")[2][1:-1]
-    print("Paperwork version: {}".format(version))
+    if not quiet:
+        print("Paperwork version: {}".format(version))
     if "-" in version:
         version = version.split("-")[0]
 except FileNotFoundError:
@@ -172,6 +175,9 @@ Main features are:
     ] + extra_deps
 )
 
+if quiet:
+    sys.exit(0)
+
 print("============================================================")
 print("============================================================")
 print("||                       IMPORTANT                        ||")