3 """Takes care of starting the main function
7 Copyright (C) 2007-2012 David Aguilar <davvid@gmail.com> and contributors
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 2 as
11 published by the Free Software Foundation.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
24 """Provides access to the cola modules"""
25 # Try to detect where it is run from and set prefix and the search path.
26 # It is assumed that the user installed Cola using the --prefix= option
27 prefix
= os
.path
.dirname(os
.path
.dirname(
28 os
.path
.realpath(os
.path
.abspath(__file__
))))
30 # Look for modules in the source or install trees
31 cola_mod
= os
.path
.join(prefix
, 'cola', '__init__.py')
32 if os
.path
.exists(cola_mod
):
34 sys
.path
.insert(1, prefix
)
37 install_lib
= os
.path
.join(prefix
, 'share', 'git-cola', 'lib')
38 sys
.path
.insert(1, install_lib
)
41 if __name__
== '__main__':
42 # lights, cameras, action
44 from cola
.app
import main