Ticket #2244 defect closed fixed
Patch to setup.py to work with python installs in directories containing a space
| Reported by: | Sandra24 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description
If Python is isntalled in a directory containing a space (like C:\Program Files) os.spawnv will try passing python C:\program files... as an argument, and of course it breaks arguments on spaces, and it rather takes exception to C:\program as it's first argument.
Change:
if sumoMode:
result = runInDir(os.path.dirname(setupPy), os.spawnv,
os.P_WAIT, sys.executable, [sys.executable, 'setup.py'] + args)
else:
result = os.spawnv(os.P_WAIT, sys.executable,
[sys.executable, setupPy] + args)
To:
if sumoMode:
result = runInDir(os.path.dirname(setupPy), os.spawnv,
os.P_WAIT, sys.executable, ['"' + sys.executable + '"', 'setup.py'] + args)
else:
result = os.spawnv(os.P_WAIT, sys.executable,
['"' + sys.executable + '"', setupPy] + args)
