Package flumotion :: Package configure :: Module installed
[hide private]

Source Code for Module flumotion.configure.installed

 1  # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- 
 2  # vi:si:et:sw=4:sts=4:ts=4 
 3  # 
 4  # Flumotion - a streaming media server 
 5  # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). 
 6  # All rights reserved. 
 7   
 8  # This file may be distributed and/or modified under the terms of 
 9  # the GNU General Public License version 2 as published by 
10  # the Free Software Foundation. 
11  # This file is distributed without any warranty; without even the implied 
12  # warranty of merchantability or fitness for a particular purpose. 
13  # See "LICENSE.GPL" in the source distribution for more information. 
14   
15  # Licensees having purchased or holding a valid Flumotion Advanced 
16  # Streaming Server license may use this file in accordance with the 
17  # Flumotion Advanced Streaming Server Commercial License Agreement. 
18  # See "LICENSE.Flumotion" in the source distribution for more information. 
19   
20  # Headers in this file shall remain intact. 
21   
22  import os 
23  from flumotion.common.log import safeprintf 
24   
25 -def get():
26 if 'FLU_CACHE_DIR' in os.environ: 27 cachedir = os.path.realpath(os.environ['FLU_CACHE_DIR']) 28 daemondir = cachedir 29 elif 'HOME' in os.environ: 30 homedir = os.environ['HOME'] 31 cachedir = os.path.join(homedir, '.flumotion') 32 daemondir = homedir 33 else: 34 cachedir = os.path.join('/usr/local/var', 'cache', 'flumotion', 35 '.flumotion') 36 daemondir = os.path.join('/usr/local/var', 'cache', 'flumotion') 37 38 registrydir = cachedir 39 40 return { 41 'isinstalled': True, 42 'cachedir': cachedir, 43 'configdir': os.path.join('/usr/local/etc', 'flumotion'), 44 'daemondir': daemondir, 45 'datadir': os.path.join('/usr/local/share', 'flumotion'), 46 'gladedir': os.path.join('/usr/local/share', 'flumotion', 'glade'), 47 'imagedir': os.path.join('/usr/local/share', 'flumotion', 'image'), 48 'localedatadir': os.path.join('/usr/local/share'), 49 'logdir': os.path.join('/usr/local/var', 'log', 'flumotion'), 50 'pythondir': os.path.join('/usr/local/lib', 'flumotion', 'python'), 51 'registrydir': registrydir, 52 'rundir': os.path.join('/usr/local/var', 'run', 'flumotion'), 53 'bindir': '/usr/local/bin', 54 'sbindir': '/usr/local/sbin', 55 'version': '0.5.2.1', 56 }
57