If Python is installed to a location that contains spaces (e.g. "C:\Program Files\Python3") then the build fails while attempting to run the modify-python-lldb.py script because the path to the Python executable is not double-quoted before being passed to the shell. The fix consists of letting Python handle the formatting of the command line, since subprocess.Popen() is perfectly capable of handling paths containing spaces if it's given the command and arguments as a list instead of a single pre-formatted string.
This fixed the build for me on Windows 10, and didn't seem to break the build on Ubuntu 14.10.
Seeing as we're logging a failure to call our command here, perhaps using the repr format string type:
logging.error("failed to run %r: %s", command, script_stderr) would give the exact invocation of the failed command, and means we're not precomputing a "pretty" - possibly false representation of the command line.
We can the get rid of command_line = " ".join(command) as it's no longer needed