From 907b6f38e3c3f74366de0213a90323739324e261 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Tue, 3 Nov 2020 12:41:04 +0000
Subject: [PATCH] use new API function to output JSON

clean up loading of .h files

fix setup.py to not define macros that break .h file loading
---
 .gitignore                | 1 +
 include/binary_c_python.h | 9 ++++-----
 setup.py                  | 9 ++++-----
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index 01bbdec15..4462aabb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@ output/*
 *.nfs*
 *.swp
 .python-version
+\#*
 
 __pycache__/
 .ipynb_checkpoints/
diff --git a/include/binary_c_python.h b/include/binary_c_python.h
index f539ca9f3..7568bfcfe 100644
--- a/include/binary_c_python.h
+++ b/include/binary_c_python.h
@@ -5,17 +5,16 @@
 /*
  * Include binary_C's API
  */
-
-#include "binary_c_API.h"
 #include "binary_c.h"
-#include "binary_c_API_prototypes.h"
+//#include "binary_c_API.h"
+//#include "binary_c_API_prototypes.h"
 
 /* Binary_c's python API prototypes */
 int run_system(char * argstring,
                long int custom_logging_func_memaddr,
                long int store_memaddr,
                long int persistent_data_memaddr,
-               int write_logfile, 
+               int write_logfile,
                int population,
                char ** const buffer,
                char ** const error_buffer,
@@ -26,7 +25,7 @@ int run_system(char * argstring,
 /* =================================================================== */
 
 int return_arglines(char ** const outstring,
-                char ** const errorstring,  
+                char ** const errorstring,
                 size_t * const nbytes);
 
 int return_help_info(char * argstring,
diff --git a/setup.py b/setup.py
index 6d1e39302..188756bcd 100644
--- a/setup.py
+++ b/setup.py
@@ -26,8 +26,8 @@ def license():
 def check_version(installed_binary_c_version, required_binary_c_versions):
     """Function to check the installed version and compare it to the required version"""
     message = """
-    The binary_c version that is installed ({}) does not match the binary_c versions ({}) 
-    that this release of the binary_c python module requires. 
+    The binary_c version that is installed ({}) does not match the binary_c versions ({})
+    that this release of the binary_c python module requires.
     """.format(
         installed_binary_c_version, required_binary_c_versions
     )
@@ -115,7 +115,6 @@ for x in DEFINES:
 
 # add API header file
 API_h = os.path.join(BINARY_C_DIR, "src", "API", "binary_c_API.h")
-BINARY_C_DEFINE_MACROS.extend([("BINARY_C_API_H", API_h)])
 
 ############################################################
 # Setting all directories and LIBRARIES to their final values
@@ -188,9 +187,9 @@ setup(
     version="0.2",
     description="""
     This is a python API for binary_c (versions {}) by David Hendriks, Rob Izzard and collaborators.
-    Based on the initial set up by Jeff andrews. 
+    Based on the initial set up by Jeff andrews.
     It is tested and designed to work for versions {}, we can't guarantee proper functioning for other versions
-    
+
     If you want to use a different version of binary_c, download and install a different version of this package
     """.format(
         str(REQUIRED_BINARY_C_VERSIONS), str(REQUIRED_BINARY_C_VERSIONS)
-- 
GitLab