Commits

Steve Borho committed 1fa6b2d

move __version__.py from tortoise/ to hggtk/

* In all installations, hggtk/about.py reads this value
* In non-win32 installation, tortoise/ will not be installed

Comments (0)

Files changed (5)

 *.orig
 *.rej
 *.pyc
-tortoise/__version__.py
+hggtk/__version__.py
 build/
 dist/
 Output/
     from mercurial import version
     hgversion = version.get_version()
 
-try:
-    import tortoise.version
-    thgversion = tortoise.version.get_version()
-except ImportError:
-    thgversion = "unknown"
-
 def browse_url(url):
     import threading
     def start_browser():
 
         self.set_website("http://bitbucket.org/tortoisehg/stable/")
         self.set_name("TortoiseHg")
-        self.set_version("(version %s)" % thgversion)
+        self.set_version("(version %s)" % shlib.version())
         if hasattr(self, 'set_wrap_license'):
             self.set_wrap_license(True)
         self.set_copyright("Copyright 2009 TK Soh and others")
         print 'icon not found', icon
         return None
 
+def version():
+    try:
+        import __version__
+        return __version__.version
+    except ImportError:
+        return 'unknown'
+
 if os.name == 'nt':
     def shell_notify(paths):
         try:
 except OSError:
     version = "unknown"
 
-f = file(os.path.join("tortoise", "__version__.py"), "w")
+f = file(os.path.join("hggtk", "__version__.py"), "w")
 f.write('# this file is autogenerated by setup.py\n')
 f.write('version = "%s"\n' % version)
 f.close()

tortoise/version.py

-# Published under the GNU GPL, v2 or later.
-# Copyright (C) 2009 Steve Borho <steve@borho.org>
-
-def get_version():
-    try:
-        import __version__
-        return __version__.version
-    except ImportError:
-        return 'unknown'