diff --git a/config.py b/config.py index 4b2d7c5ac..f64262b85 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,13 @@ import os import sys -# Turns off debug mode +# Load variable overrides specific to distribution type +try: + import configforced +except ImportError: + configforced = None + +# Turns on debug mode debug = False # Version data @@ -14,10 +20,14 @@ expansionVersion = "1.1.0" # The main pyfa directory which contains run.py # Python 2.X uses ANSI by default, so we need to convert the character encoding -pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding()) +pyfaPath = getattr(configforced, "pyfaPath", None) +if pyfaPath is None: + pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding()) # Where we store the saved fits etc, default is the current users home directory -savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding()) +savePath = getattr(configforced, "savePath", None) +if savePath is None: + savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding()) # Static EVE Data from the staticdata repository, should be in the staticdata directory in our pyfa directory staticPath = os.path.join(pyfaPath, "staticdata") @@ -30,7 +40,7 @@ saveDB = os.path.join(savePath, "saveddata.db") # maintenance script gameDB = os.path.join(staticPath, "eve.db") -## Eos setting overrides ## +## DON'T MODIFY ANYTHING BELOW ## import eos.config #Caching modifiers, disable all gamedata caching, its unneeded. @@ -38,9 +48,3 @@ eos.config.gamedataCache = None # saveddata db location modifier, shouldn't ever need to touch this eos.config.saveddata_connectionstring = "sqlite:///" + saveDB + "?check_same_thread=False" eos.config.gamedata_connectionstring = "sqlite:///" + gameDB + "?check_same_thread=False" - -# Load variable overrides specific to distribution type -try: - from configforced import * -except ImportError: - pass