From 906f329724f7819ad24ad59fe2aed36cfdca5c24 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 23 Nov 2013 20:07:29 +0000 Subject: Change lldb from building against a Python framework out of the installed SDK to using the current OS installed headers/libraries. This change is to address the removal of the Python framework from the Mac OS X 10.9 (Mavericks) SDK, and is the recommended workaround via https://developer.apple.com/library/mac/technotes/tn2328/_index.html llvm-svn: 195557 --- .../Python/edit-swig-python-wrapper-file.py | 53 ---------------------- 1 file changed, 53 deletions(-) delete mode 100644 lldb/scripts/Python/edit-swig-python-wrapper-file.py (limited to 'lldb/scripts/Python/edit-swig-python-wrapper-file.py') diff --git a/lldb/scripts/Python/edit-swig-python-wrapper-file.py b/lldb/scripts/Python/edit-swig-python-wrapper-file.py deleted file mode 100644 index d64c0b4..0000000 --- a/lldb/scripts/Python/edit-swig-python-wrapper-file.py +++ /dev/null @@ -1,53 +0,0 @@ -# -# edit-swig-python-wrapper-file.py -# -# This script performs some post-processing editing on the C++ file that -# SWIG generates for python, after running on 'lldb.swig'. In -# particular, on Apple systems we want to include the Python.h file that -# is used in the /System/Library/Frameworks/Python.framework, but on other -# systems we want to include plain . So we need to replace: -# -# #include -# -# with: -# -# #if defined (__APPLE__) -# #include -# #else -# #include -# #endif -# -# That's what this python script does. -# - -import os, sys - -include_python = '#include ' -include_python_ifdef = '''#if defined (__APPLE__) -#include -#else -#include -#endif -''' - -if len (sys.argv) > 1: - input_dir_name = sys.argv[1] - full_input_name = input_dir_name + "/LLDBWrapPython.cpp" -else: - input_dir_name = os.environ["SRCROOT"] - full_input_name = input_dir_name + "/source/LLDBWrapPython.cpp" -full_output_name = full_input_name + ".edited" - -with open(full_input_name, 'r') as f_in: - with open(full_output_name, 'w') as f_out: - include_python_found = False - for line in f_in: - if not include_python_found: - if line.startswith(include_python): - # Write out the modified lines. - f_out.write(include_python_ifdef) - include_python_found = True - continue - - # Otherwise, copy the line verbatim to the output file. - f_out.write(line) -- cgit v1.1