diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index ccc122b..d871d11 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -18,6 +18,7 @@ current = os.path.dirname(os.path.realpath(__file__)) + '/' # All directory paths *MUST* end in a / version = '%VERSION%' +revision = '%REVNO%' # DIRECTORIES diff --git a/setup.py b/setup.py index 6e37f32..fd89429 100755 --- a/setup.py +++ b/setup.py @@ -24,6 +24,18 @@ import sys # Be sure to keep this updated! # VERSIONNUMBER VERSION_NUM = '1.6.0' +REVISON_NUM = 'unknown' + +try: + if not os.exists('vcsinfo.py'): + try: + os.system('bzr version-info --python > vcsinfo.py') + except: + pass + import vcsinfo + REVISION_NUM = vcsinfo.version_info['revno'] +except: + print 'failed to find revision number' class configure(Command): description = "configure the paths that Wicd will be installed to" @@ -214,7 +226,9 @@ class configure(Command): for item, value in values: line = line.replace('%' + str(item.upper().replace('-','_')) + '%', str(value)) + # other things to replace that aren't arguments line = line.replace('%VERSION%', str(VERSION_NUM)) + line = line.replace('%REVNO%', str(REVISION_NUM)) item_out.write(line)