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,2008,2009 Fluendo, S.L. 
 6  # Copyright (C) 2010,2011 Flumotion Services, S.A. 
 7  # All rights reserved. 
 8  # 
 9  # This file may be distributed and/or modified under the terms of 
10  # the GNU Lesser General Public License version 2.1 as published by 
11  # the Free Software Foundation. 
12  # This file is distributed without any warranty; without even the implied 
13  # warranty of merchantability or fitness for a particular purpose. 
14  # See "LICENSE.LGPL" in the source distribution for more information. 
15  # 
16  # Headers in this file shall remain intact. 
17   
18   
19  import os 
20  from flumotion.common.log import safeprintf 
21   
22   
23 -def get():
24 bindir = '/usr/bin' 25 datadir = '/usr/share' 26 localstatedir = '/var' 27 libdir = '/usr/lib' 28 sbindir = '/usr/sbin' 29 sysconfdir = '/etc' 30 31 if 'FLU_CACHE_DIR' in os.environ: 32 cachedir = os.path.realpath(os.environ['FLU_CACHE_DIR']) 33 daemondir = cachedir 34 elif 'HOME' in os.environ: 35 homedir = os.environ['HOME'] 36 cachedir = os.path.join(homedir, '.flumotion') 37 daemondir = homedir 38 else: 39 cachedir = os.path.join( 40 localstatedir, 'cache', 'flumotion', 41 '.flumotion') 42 daemondir = os.path.join( 43 localstatedir, 'cache', 'flumotion') 44 45 return { 46 'isinstalled': True, 47 'bindir': bindir, 48 'cachedir': cachedir, 49 'configdir': os.path.join(sysconfdir, 'flumotion'), 50 'daemondir': daemondir, 51 'datadir': os.path.join(datadir, 'flumotion'), 52 'gladedir': os.path.join(datadir, 'flumotion', 'glade'), 53 'imagedir': os.path.join(datadir, 'flumotion', 'image'), 54 'localedatadir': os.path.join(datadir), 55 'logdir': os.path.join(localstatedir, 'log', 'flumotion'), 56 'pythondir': os.path.join(libdir, 'flumotion', 'python'), 57 'registrydir': cachedir, 58 'rundir': os.path.join(localstatedir, 'run', 'flumotion'), 59 'sbindir': sbindir, 60 'version': '0.10.0', 61 }
62