From ef085adb53978cbf8e18cb17db567f1c64058b49 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Mon, 27 Jan 2020 20:36:28 +0000 Subject: [PATCH] updated setup --- setup.py | 73 +++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/setup.py b/setup.py index 92f583e58..c0cde9879 100644 --- a/setup.py +++ b/setup.py @@ -63,62 +63,55 @@ for x in defines: API_h = os.environ["BINARY_C"] + "/src/API/binary_c_API.h" binary_c_define_macros.extend([("BINARY_C_API_H", API_h)]) - - -# 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') - - - - - - - - - - - -binary_c_python_api_module = Extension( - # name="binarycpython.core.binary_c", - name="binary_c_python_api", - sources=["src/binary_c_python.c"], - include_dirs=[ +# +include_dirs = [ os.environ["BINARY_C"] + "/src", os.environ["BINARY_C"] + "/src/API", - "include", - ] - + binary_c_incdirs - + [os.path.join(GSL_DIR,'include')] if GSL_DIR else [], - libraries=["binary_c"] + binary_c_libs + ["binary_c_api"], - library_dirs=[ + "include", ] + binary_c_incdirs + [os.path.join(GSL_DIR,'include')] if GSL_DIR else [] + +libraries = ["binary_c"] + binary_c_libs + ["binary_c_api"] + +library_dirs = [ os.environ["BINARY_C"] + "/src", "./", os.path.join(CWD, "lib/"), # os.path.join(CWD, "binarycpython/core/"), - ] - + binary_c_libdirs, - runtime_library_dirs=[ + ] + binary_c_libdirs + +runtime_library_dirs = [ os.environ["BINARY_C"] + "/src", "./", os.path.join(CWD, "lib/"), # os.path.join(CWD, "binarycpython/core/"), - ] - + binary_c_libdirs, + ] + binary_c_libdirs + +# TODO: move the creeation of all the include stuff to here so its easier to print everything +print('\n') +print("binary_c_config: ", str(binary_c_config) + "\n") +print("incdirs: ", str(include_dirs) + "\n") +print("binary_c_libs: ", str(binary_c_libs) + "\n") +print("libraries: ", str(libraries) + "\n") +print("library_dirs: ", str(library_dirs) + "\n") +print("runtime_library_dirs: ", str(runtime_library_dirs) + "\n") +print("binary_c_cflags: ", str(binary_c_cflags) + "\n") +print("API_h: ", str(API_h) + "\n") +print("macros: ", str(binary_c_define_macros) + "\n") +print('\n') + +binary_c_python_api_module = Extension( + # name="binarycpython.core.binary_c", + name="binary_c_python_api", + sources=["src/binary_c_python.c"], + include_dirs= include_dirs, + libraries=libraries, + library_dirs=library_dirs, + runtime_library_dirs=runtime_library_dirs, define_macros=[] + binary_c_define_macros, extra_objects=[], extra_compile_args=[], language="C", ) - def readme(): with open("README.md") as f: return f.read() -- GitLab