Commit 269f12ef authored by agronholm's avatar agronholm

Fix python_cmd return value

--HG--
branch : distribute
extra : rebase_source : 09f20b70ead91373507168c66a1f709a4eaba4f5
parent 2e5e7b75
...@@ -43,17 +43,9 @@ Description: xxx ...@@ -43,17 +43,9 @@ Description: xxx
""" """
def quote(c): def python_cmd(*args):
if sys.platform == 'win32': args = (sys.executable,) + args
if ' ' in c: return subprocess.call(args) == 0
return '"%s"' % c
return c
def python_cmd(cmd):
python = quote(sys.executable)
cmd = quote(cmd)
return subprocess.call([python, cmd])
def _install(tarball): def _install(tarball):
...@@ -74,7 +66,7 @@ def _install(tarball): ...@@ -74,7 +66,7 @@ def _install(tarball):
# installing # installing
log.warn('Installing Distribute') log.warn('Installing Distribute')
assert python_cmd('setup.py install') assert python_cmd('setup.py', 'install')
finally: finally:
os.chdir(old_wd) os.chdir(old_wd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment