diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-01-29 11:08:21 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-01-29 11:08:21 +0000 |
commit | 63f608d7c05095c16d1a8863b13c55634c0cae8b (patch) | |
tree | ef79a480487105d28e60b49e96947674355d259f | |
parent | e97bd4be721834e24c32838c2ecd5149ef7c7101 (diff) | |
download | morph-63f608d7c05095c16d1a8863b13c55634c0cae8b.tar.gz |
Fix cwd parsing in setup.py
If __file__ has no directory in it, dirname will return the empty
string, which in turn will break subprocess.Popen. The fix is to
use '.' instead of the empty string.
-rw-r--r-- | setup.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -61,8 +61,9 @@ class GenerateResources(build): (path, ' '.join(command))) with open(os.path.join(target_dir, filename), 'w') as f: + cwd = os.path.dirname(__file__) or '.' p = subprocess.Popen(command, - cwd=os.path.dirname(__file__), + cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) o = p.communicate() |