setup.py
changeset 7790 1817e45c2212
parent 7722 103127a8cbdb
child 7801 e5627562b9f2
--- 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")