From c7fcb7779d97727bd83006097c20392bc4b1c660 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Fri, 5 Nov 2021 08:54:06 +0000
Subject: [PATCH] changed quit() to quit(1) with a more complete error message
 to handle the (common) case when the BINARY_C environment variable is not
 set. With quit(), the return code is 0 so pip just gives a confusing
 "oserror". With quit(1), an error is raised and the output sent to the
 terminal.

---
 setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 593b49d51..624e08e87 100644
--- a/setup.py
+++ b/setup.py
@@ -87,8 +87,8 @@ if not GSL_DIR:
     )
 BINARY_C_DIR = os.getenv("BINARY_C", None)
 if not BINARY_C_DIR:
-    print("Error: the BINARY_C environment variable is not set. Aborting setup")
-    quit()
+    print("\n\n****\n**** Error: the BINARY_C environment variable is not set.\n**** This environment variable should point to the root of your binary_c\n**** installation (i.e. the directory you acquired from the repository).\n**** Aborting setup.\n****\n\n")
+    quit(1)
 
 # TODO: write code to know exact parent directory of this file.
 CWD = os.getcwd()
-- 
GitLab