2 # -*- coding: utf-8 -*-
4 from __future__
import (absolute_import
, division
, print_function
,
9 # Try to detect where it is run from and set prefix and the search path.
10 # It is assumed that the user installed StGIT using the --prefix= option
11 prefix
, bin
= os
.path
.split(sys
.path
[0])
13 if bin
== 'bin' and prefix
!= sys
.prefix
:
15 sys
.exec_prefix
= prefix
17 major
, minor
= sys
.version_info
[0:2]
18 local_path
= [os
.path
.join(prefix
, 'lib', 'python'),
19 os
.path
.join(prefix
, 'lib', 'python%s.%s' % (major
, minor
)),
20 os
.path
.join(prefix
, 'lib', 'python%s.%s' % (major
, minor
),
22 sys
.path
= local_path
+ sys
.path
24 from stgit
.main
import main
27 Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com>
29 This program is free software; you can redistribute it and/or modify
30 it under the terms of the GNU General Public License version 2 as
31 published by the Free Software Foundation.
33 This program is distributed in the hope that it will be useful,
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 GNU General Public License for more details.
38 You should have received a copy of the GNU General Public License
39 along with this program; if not, see http://www.gnu.org/licenses/.
42 if __name__
== '__main__':
43 if os
.environ
.get('COVERAGE_PROCESS_START'):
45 coverage
.process_startup()