diff options
Diffstat (limited to 'lldb/scripts/Python/prepare_binding_Python.py')
-rw-r--r-- | lldb/scripts/Python/prepare_binding_Python.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/lldb/scripts/Python/prepare_binding_Python.py b/lldb/scripts/Python/prepare_binding_Python.py index f9da16fb678..31aef6cf8f0 100644 --- a/lldb/scripts/Python/prepare_binding_Python.py +++ b/lldb/scripts/Python/prepare_binding_Python.py @@ -257,48 +257,6 @@ def do_swig_rebuild(options, dependency_file, config_build_dir, settings): sys.exit(-10) -def run_python_script(script_and_args): - """Runs a python script, logging appropriately. - - If the command returns anything non-zero, it is registered as - an error and exits the program. - - @param script_and_args the python script to execute, along with - the command line arguments to pass to it. - """ - command = [sys.executable] + script_and_args - process = subprocess.Popen(command) - script_stdout, script_stderr = process.communicate() - return_code = process.returncode - if return_code != 0: - logging.error("failed to run %r: %r", command, script_stderr) - sys.exit(return_code) - else: - logging.info("ran script %r'", command) - if script_stdout is not None: - logging.info("output: %s", script_stdout) - - -def do_modify_python_lldb(options, config_build_dir): - """Executes the modify-python-lldb.py script. - - @param options the parsed command line arguments - @param config_build_dir the directory where the Python output was created. - """ - script_path = os.path.normcase( - os.path.join( - options.src_root, - "scripts", - "Python", - "modify-python-lldb.py")) - - if not os.path.exists(script_path): - logging.error("failed to find python script: '%s'", script_path) - sys.exit(-11) - - run_python_script([script_path, config_build_dir]) - - def get_python_module_path(options): """Returns the location where the lldb Python module should be placed. @@ -426,11 +384,6 @@ def main(options): # Generate the Python binding with swig. logging.info("Python binding is out of date, regenerating") do_swig_rebuild(options, dependency_file, config_build_dir, settings) - if options.generate_dependency_file: - return - - # Post process the swig-generated file. - do_modify_python_lldb(options, config_build_dir) # This script can be called by another Python script by calling the main() |