Files
whipper-gui/morituri/configure/configure.py
Thomas Vander Stichele f3696f22d1 * morituri/configure/configure.py (svn:keywords):
Expand revision.
	* morituri/configure/configure.py:
	  Set it on the revision local.
2011-05-18 23:56:27 +00:00

37 lines
896 B
Python

# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
'''
configure-time variables for installed or uninstalled operation
Code should run
>>> from morituri.configure import configure
and then access the variables from the configure module. For example:
>>> print configure.version
@var isinstalled: whether an installed version is being run
@type isinstalled: boolean
@var version: morituri version number
@type version: string
'''
import os
# where am I on the disk ?
__thisdir = os.path.dirname(os.path.abspath(__file__))
revision = "$Revision$"
if os.path.exists(os.path.join(__thisdir, 'uninstalled.py')):
from morituri.configure import uninstalled
config_dict = uninstalled.get()
else:
from morituri.configure import installed
config_dict = installed.get()
for key, value in config_dict.items():
dictionary = locals()
dictionary[key] = value