diff --git a/setup.py b/setup.py index 35df602..298e894 100755 --- a/setup.py +++ b/setup.py @@ -29,18 +29,21 @@ VERSION_NUM = '1.6.0a1' REVISION_NUM = 'unknown' CURSES_REVNO = 'uimod' +# change to the directory setup.py is contained in +os.chdir(os.path.abspath(__file)) + try: - try: - os.system('bzr version-info --python > vcsinfo.py') - except: - pass + if os.path.exists('.bzr') and os.system('bzr') == 0: + try: + os.system('bzr version-info --python > vcsinfo.py') + except: + pass import vcsinfo REVISION_NUM = vcsinfo.version_info['revno'] except Exception, e: print 'failed to find revision number:' print e - class configure(Command): description = "configure the paths that Wicd will be installed to"