Fix compiling C client when using Python-2.6

`shlex.split` is inadequate when it receives Unicode strings: `u'-O3'` is split 
into a single argument that looks like `'-\x00O\x003\x00'`.
This commit is contained in:
ZyX 2015-02-15 01:19:06 +03:00
parent c1bcaaad9e
commit e233ca7a54
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def compile_client():
else:
from distutils.ccompiler import new_compiler
compiler = new_compiler().compiler
cflags = os.environ.get('CFLAGS', '-O3')
cflags = os.environ.get('CFLAGS', str('-O3'))
# A normal split would do a split on each space which might be incorrect. The
# shlex will not split if a space occurs in an arguments value.
subprocess.check_call(compiler + shlex.split(cflags) + ['client/powerline.c', '-o', 'scripts/powerline'])