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   
26 -def get():
27 bindir = '/usr/bin' 28 datadir = '/usr/share' 29 localstatedir = '/var' 30 libdir = '/usr/lib' 31 sbindir = '/usr/sbin' 32 sysconfdir = '/etc' 33 34 if 'FLU_CACHE_DIR' in os.environ: 35 cachedir = os.path.realpath(os.environ['FLU_CACHE_DIR']) 36 daemondir = cachedir 37 elif 'HOME' in os.environ: 38 homedir = os.environ['HOME'] 39 cachedir = os.path.join(homedir, '.flumotion') 40 daemondir = homedir 41 else: 42 cachedir = os.path.join( 43 localstatedir, 'cache', 'flumotion', 44 '.flumotion') 45 daemondir = os.path.join( 46 localstatedir, 'cache', 'flumotion') 47 48 return { 49 'isinstalled': True, 50 'bindir': bindir, 51 'cachedir': cachedir, 52 'configdir': os.path.join(sysconfdir, 'flumotion'), 53 'daemondir': daemondir, 54 'datadir': os.path.join(datadir, 'flumotion'), 55 'gladedir': os.path.join(datadir, 'flumotion', 'glade'), 56 'imagedir': os.path.join(datadir, 'flumotion', 'image'), 57 'localedatadir': os.path.join(datadir), 58 'logdir': os.path.join(localstatedir, 'log', 'flumotion'), 59 'pythondir': os.path.join(libdir, 'flumotion', 'python'), 60 'registrydir': cachedir, 61 'rundir': os.path.join(localstatedir, 'run', 'flumotion'), 62 'sbindir': sbindir, 63 'version': '0.6.1', 64 }
65