Permalink
Browse files

Get rid of defs.py file (except for Windows?)

  • Loading branch information...
takluyver committed Sep 26, 2012
1 parent 92b20da commit 77cc76b0a5e109090c0bd7984c55e225fa8d33c1
Showing with 4 additions and 20 deletions.
  1. +1 −1 labyrinth
  2. +2 −1 labyrinth_lib/Browser.py
  3. +1 −1 labyrinth_lib/__init__.py
  4. +0 −5 labyrinth_lib/defs.py
  5. +0 −12 labyrinth_lib/utils.py
View
@@ -38,7 +38,7 @@ try:
from labyrinth_lib import defs
localedir = osp.abspath(osp.join(defs.DATA_DIR, "locale"))
except:
- localedir = ""
+ localedir = "/usr/share/locale"
gettext.bindtextdomain('labyrinth', localedir)
if hasattr(gettext, 'bind_textdomain_codeset'):
View
@@ -39,6 +39,7 @@
import MainWindow
from MapList import MapList
import TrayIcon
+from . import __version__
AUTHORS = ['Don Scorgie <Don@Scorgie.org>',
'Martin Schaaf <mascha@ma-scha.de>',
@@ -194,7 +195,7 @@ def show_help_clicked(self, arg):
def about_clicked (self, arg):
about_dialog = gtk.AboutDialog ()
about_dialog.set_name ("Labyrinth")
- about_dialog.set_version (utils.get_version())
+ about_dialog.set_version (__version__)
if os.name != 'nt':
try:
about_dialog.set_logo_icon_name("labyrinth")
@@ -1 +1 @@
-from defs import VERSION as __version__
+__version__ = "0.6a1"
View
@@ -1,5 +0,0 @@
-import sys
-from os.path import join
-
-pkgdatadir = join(sys.prefix, "share/labyrinth")
-VERSION="0.6a1"
View
@@ -83,18 +83,6 @@ def parse_coords (string):
__data_dir = None
-_version = None
-
-def get_version ():
- global _version
- if not _version:
- try:
- import defs
- _version = defs.VERSION
- except:
- _version = "Uninstalled"
- return _version
-
def get_data_dir():
'''returns the data dir. Tries to find it the first time its called'''
global __data_dir

0 comments on commit 77cc76b

Please sign in to comment.