Commits

Lars Yencken committed 54d24f6

Adds version information from mercurial to package version.

  • Participants
  • Parent commits 1605c3a

Comments (0)

Files changed (1)

 
 #----------------------------------------------------------------------------#
 
+import os
 from distutils.core import setup
 
+def get_hg_version():
+    version = None
+    if os.system('which hg >/dev/null 2>/dev/null') == 0:
+        version = os.popen('hg id -n 2>/dev/null').read().strip()
+    return version or 'unknown'
+
 #----------------------------------------------------------------------------#
 
 setup(
         name='smartNotify',
-        version='0.1',
+        version='0.1.%s' % get_hg_version(),
         py_modules=['smartNotify'],
         scripts=['smartNotify.py']
     )