commit 4bd6719ce05bd312a62a69019806b7b65848317e Author: Daniel Swanson Date: Thu Jun 3 15:23:13 2021 -0500 get python bindings to compile diff --git a/python/lttoolbox.i.in b/python/lttoolbox.i.in index d7362e1..d3630c0 100644 --- a/python/lttoolbox.i.in +++ b/python/lttoolbox.i.in @@ -54,8 +54,9 @@ public: void lt_proc(int argc, char **argv, char *input_path, char *output_path) { - FILE* input = fopen(input_path, "r"); - FILE* output = fopen(output_path, "w"); + InputFile input; + input.open(input_path); + UFILE* output = u_fopen(output_path, "w", NULL, NULL); int cmd = 0; int c = 0; optind = 1; @@ -103,8 +104,7 @@ public: break; } - fclose(input); - fclose(output); + u_fclose(output); } }; diff --git a/python/setup.py.in b/python/setup.py.in index 14f64ab..7a9e84c 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -29,7 +29,7 @@ lttoolbox_module = Extension( name='_lttoolbox', sources=get_sources(), swig_opts = ["-c++", "-I@top_srcdir@", "-Wall"], - include_dirs=['@top_srcdir@', '/usr/include/libxml2'], + include_dirs=['@top_srcdir@', '/usr/include/libxml2', '@top_srcdir@/utf8'], library_dirs=['/usr/include/libxml2'], extra_compile_args='@CXXFLAGS@'.split(), extra_link_args=['-lxml2'],