Mercurial > hg
changeset 7790:1817e45c2212
setup: use sys.executable to call hg
Executing ".\hg" does not work on Windows, but we can instead ask
Python to execute hg.
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Wed, 18 Feb 2009 00:44:38 +0100 |
parents | e8d62d6133c2 |
children | 089cb73f8ecc |
files | setup.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Tue Feb 17 23:58:56 2009 +0100 +++ b/setup.py Wed Feb 18 00:44:38 2009 +0100 @@ -103,7 +103,7 @@ pypath = os.environ.get('PYTHONPATH', '') purepath = os.path.join('mercurial', 'pure') os.environ['PYTHONPATH'] = os.pathsep.join(['mercurial', purepath, pypath]) - cmd = '%s id -it' % os.path.join('.', 'hg') + cmd = '%s hg id -it' % sys.executable l = os.popen(cmd).read().split() os.environ['PYTHONPATH'] = pypath while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags @@ -112,7 +112,8 @@ if version.endswith('+'): version += time.strftime('%Y%m%d') -except OSError: +except OSError, e: + print "warning: could not establish Mercurial version: %s" % e version = "unknown" f = file("mercurial/__version__.py", "w")