-
Notifications
You must be signed in to change notification settings - Fork 2
/
environment.py
90 lines (76 loc) · 2.96 KB
/
environment.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import os
import sys
import socket
import getpass
import platform
this_module_dir_path = os.path.abspath ( os.path.dirname( sys.modules[__name__].__file__) )
class indexing_suite:
include = os.path.join( this_module_dir_path, 'indexing_suite_v2' )
class boost:
libs = ''
include = ''
class python:
libs = ''
include = ''
class gccxml:
gccxml_path = os.path.join( this_module_dir_path, '..', 'gccxml_bin', 'v09', platform.system(), platform.machine(), 'bin' )
if not os.path.exists( gccxml_path ):
gccxml_path = os.path.join( this_module_dir_path, '..', 'gccxml_bin', 'v09', sys.platform, 'bin' )
gccxml_version = '__GCCXML_09__'
executable = gccxml_path
class scons:
suffix = ''
cmd_build = 'scons'
cmd_clean = 'scons --clean'
ccflags = []
if 'roman' in getpass.getuser():
if os.name == 'nt':
scons.suffix = '.pyd'
scons.ccflags = ['/MD', '/EHsc', '/GR', '/Zc:wchar_t', '/Zc:forScope' ]
boost.libs = [ r'e:\dev\boost_svn\bin.v2\libs\python\build\msvc-9.0\release\threading-multi' ]
boost.include = 'e:/dev/boost_svn'
python.libs = 'c:/program files/python26/libs'
python.include = 'c:/program files/python26/include'
else:
if 'kubunu-vbox' == socket.gethostname():
os.nice( 20 )
print 'test process niceness: 20'
scons.suffix = '.so'
scons.ccflags = []
boost.libs = ['/usr/lib'] #'/home/roman/include/libs', '/home/roman/include/lib' ]
boost.include = '/usr/include/boost'
python.include = '/usr/include/python2.6'
else:
os.nice( 20 )
print 'test process niceness: 20'
scons.suffix = '.so'
scons.ccflags = []
boost.libs = ['/home/roman/include/libs', '/home/roman/include/lib' ]
boost.include = '/home/roman/boost_svn'
python.include = '/usr/include/python2.6'
elif 'root' == getpass.getuser():
if os.name == 'nt':
scons.suffix = '.pyd'
scons.ccflags = ['/MD', '/EHsc', '/GR', '/Zc:wchar_t', '/Zc:forScope' ]
boost.libs = [ 'd:/dev/boost_svn/bin.v2/libs/python/build/msvc-7.1/release/threading-multi' ]
boost.include = 'd:/dev/boost_svn'
python.libs = 'e:/python25/libs'
python.include = 'e:/python25/include'
_my_path = None
try:
import environment_path_helper
environment_path_helper.raise_error()
except Exception, error:
_my_path = os.path.abspath( os.path.split( sys.exc_traceback.tb_frame.f_code.co_filename )[0] )
if not os.path.exists( os.path.join( _my_path, 'environment.py' ) ):
#try another guess
if sys.modules.has_key('environment'):
_my_path = os.path.split( sys.modules['environment'].__file__ )[0]
try:
import pygccxml
print 'pygccxml INSTALLED version will be used'
except ImportError:
sys.path.append( os.path.join( _my_path, '../pygccxml_dev' ) )
import pygccxml
print 'pygccxml DEVELOPMENT version will be used'
import pyplusplus