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:
parent
c1bcaaad9e
commit
e233ca7a54
2
setup.py
2
setup.py
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue