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

Source Code for Module flumotion.configure.uninstalled

 1  # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- 
 2  # vi:si:et:sw=4:sts=4:ts=4 
 3   
 4  # -*- Mode: Python -*- 
 5  # vi:si:et:sw=4:sts=4:ts=4 
 6   
 7  # Flumotion - a streaming media server 
 8  # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. 
 9  # Copyright (C) 2010,2011 Flumotion Services, S.A. 
10  # All rights reserved. 
11  # 
12  # This file may be distributed and/or modified under the terms of 
13  # the GNU Lesser General Public License version 2.1 as published by 
14  # the Free Software Foundation. 
15  # This file is distributed without any warranty; without even the implied 
16  # warranty of merchantability or fitness for a particular purpose. 
17  # See "LICENSE.LGPL" in the source distribution for more information. 
18  # 
19  # Headers in this file shall remain intact. 
20   
21   
22  import os 
23  from flumotion.common.log import safeprintf 
24   
25   
26 -def get():
27 # where am I on the disk ? 28 __thisdir = os.path.dirname(os.path.abspath(__file__)) 29 # toplevel dir 30 __toplevel = os.path.normpath(os.path.join(__thisdir, '..', '..')) 31 32 __toplevelwrite = __toplevel 33 34 # distcheck hack: if our __toplevel contains a directory _build, it means 35 # it was generated in distcheck mode and we should write everything 36 # under the writable builddir 37 # Don't change this without testing distcheck on an add-on project! 38 if os.path.exists(os.path.join(__toplevel, '_build')): 39 __toplevelwrite = os.path.join(__toplevel, '_build') 40 41 __cachedir = os.environ.get('FLU_CACHE_DIR', 42 os.path.join(__toplevelwrite, 'cache')) 43 44 ret = { 45 'isinstalled': False, 46 'cachedir': os.path.join(__cachedir), 47 'configdir': os.path.join(__toplevel, 'conf'), 48 'daemondir': os.path.join(__toplevelwrite), 49 'datadir': os.path.join(__toplevel, 'data'), 50 'gladedir': os.path.join(__toplevel, 'data', 'glade'), 51 'imagedir': os.path.join(__toplevel, 'data', 'image'), 52 'logdir': os.path.join(__toplevelwrite, 'log'), 53 'localedatadir': os.path.join(__toplevelwrite), 54 'pythondir': os.path.join(__toplevel), 55 'registrydir': os.path.join(__cachedir, 'registry'), 56 'rundir': os.path.join(__toplevelwrite, 'run'), 57 'bindir': os.path.join(__toplevelwrite, 'bin'), 58 'sbindir': os.path.join(__toplevelwrite, 'bin'), 59 'version': '0.10.0', 60 } 61 62 return ret
63