summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-01-29 11:08:21 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-01-29 11:08:21 +0000
commit63f608d7c05095c16d1a8863b13c55634c0cae8b (patch)
treeef79a480487105d28e60b49e96947674355d259f /setup.py
parente97bd4be721834e24c32838c2ecd5149ef7c7101 (diff)
downloadmorph-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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 6e8c4c4b..4acb9a6c 100644
--- a/setup.py
+++ b/setup.py
@@ -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()