2
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
4
# This file is in the public domain
10
from gettext import gettext as _
13
gettext.textdomain('trophyinfo')
14
# Add project root directory (enable symlink and trunk execution)
15
PROJECT_ROOT_DIRECTORY = os.path.abspath(
16
os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
19
if os.path.abspath(__file__).startswith('/opt'):
20
syspath = sys.path[:] # copy to avoid infinite loop in pending objects
22
opt_path = path.replace('/usr', '/opt/extras.ubuntu.com/trophyinfo')
23
python_path.insert(0, opt_path)
24
sys.path.insert(0, opt_path)
25
if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'accomplishments'))
26
and PROJECT_ROOT_DIRECTORY not in sys.path):
27
python_path.insert(0, PROJECT_ROOT_DIRECTORY)
28
sys.path.insert(0, PROJECT_ROOT_DIRECTORY)
32
"%s:%s" % (os.getenv('PYTHONPATH', ''),
33
':'.join(python_path))) # for subprocesses
36
from accomplishments.main import main