diff --git a/setup.py b/setup.py index f85fea01490923de78de6506740c62c8c67f9c93..690499df23674089be59ad6f3a3f1a7ab07227d5 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,12 @@ import subprocess import re import sys +# TODO: make this clean +GSL_DIR = os.getenv('GSL_DIR', None) +if not GSL_DIR: + print("Warning: GSL_DIR is not set, this might lead to errors along the installation if there is no other version of GSL in the include dirs") + + # TODO: write code to know exact parent directory of this file. CWD = os.getcwd() @@ -58,15 +64,17 @@ API_h = os.environ["BINARY_C"] + "/src/API/binary_c_API.h" binary_c_define_macros.extend([("BINARY_C_API_H", API_h)]) -print('\n') -print("binary_c_config", binary_c_config) -print("incdirs:",binary_c_incdirs) -print("binary_c_libdirs: ", binary_c_libdirs) -print("binary_c_cflags: ",binary_c_cflags) -print("binary_c_libs: ",binary_c_libs) -print("API_h:",API_h) -print("macros:",binary_c_define_macros) -print('\n') + +# TODO: move the creeation of all the include stuff to here so its easier to print everything +# print('\n') +# print("binary_c_config", binary_c_config) +# print("incdirs:",binary_c_incdirs) +# print("binary_c_libdirs: ", binary_c_libdirs) +# print("binary_c_cflags: ",binary_c_cflags) +# print("binary_c_libs: ",binary_c_libs) +# print("API_h:",API_h) +# print("macros:",binary_c_define_macros) +# print('\n') @@ -85,9 +93,10 @@ binary_c_python_api_module = Extension( include_dirs=[ os.environ["BINARY_C"] + "/src", os.environ["BINARY_C"] + "/src/API", - "include", + "include", ] - + binary_c_incdirs, + + binary_c_incdirs + + [GSL_DIR] if GSL_DIR else [], libraries=["binary_c"] + binary_c_libs + ["binary_c_api"], library_dirs=[ os.environ["BINARY_C"] + "/src",