Mercurial > hg > ltpdarepo
diff setup.py @ 232:4b5f83e5a2fb
Fix setup.py for the case where executing 'hg' fails.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Wed, 30 Nov 2011 10:18:07 +0100 |
parents | 5c5f6d93d9d4 |
children | 48adc0d70d22 |
line wrap: on
line diff
--- a/setup.py Wed Nov 30 09:54:23 2011 +0100 +++ b/setup.py Wed Nov 30 10:18:07 2011 +0100 @@ -26,12 +26,15 @@ if version.endswith('dev') and os.path.isdir('.hg'): # add hg revision id to version string - p = subprocess.Popen(['hg', 'id', '--id'], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = p.communicate() - if not p.returncode: - rev = out.strip().replace('+', '') - version += '-' + rev + try: + p = subprocess.Popen(['hg', 'id', '--id'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + if not p.returncode: + rev = out.strip().replace('+', '') + version += '-' + rev + except OSError: + pass setup(name='ltpdarepo',