4 import os.path, platform
6 def set_env(env, prereq_dir, version, forBuild=None):
7 version = '.'.join(version.replace('-', '.').split('.')[:2])
8 env.set('URANIE_VERSION', version)
10 if platform.system()=="Windows" :
11 env.set('URANIE_ROOT_DIR', prereq_dir)
12 uranie = env.get('URANIE_ROOT_DIR')
14 env.set('URANIESYS', prereq_dir)
16 env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python'))
18 env.prepend('PATH', os.path.join(uranie, 'lib'))
19 env.prepend('ROOT_INCLUDE_PATH',os.path.join(uranie, 'include'))
21 root_env = env.get('ROOTSYS')
22 root_lib_env = os.path.join(root_env,'lib','root')
23 if os.path.isdir(root_lib_env):
24 env.prepend('ROOTSYSLIB', root_lib_env)
26 env.prepend('ROOTSYSLIB', os.path.join(root_env,'lib'))
29 env.prepend('PATH', os.path.join(uranie,'bin'))
30 env.prepend('PATH', os.path.join(root_env,'bin'))
32 opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib')
33 env.prepend('PATH', opt_env)
36 env.set('URANIE_ROOT_DIR', prereq_dir)
37 uranie = env.get('URANIE_ROOT_DIR')
39 env.set('URANIESYS', prereq_dir)
41 env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python'))
43 env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib'))
45 root_env = env.get('ROOTSYS')
46 root_lib_env = os.path.join(root_env,'lib','root')
47 if os.path.isdir(root_lib_env):
48 env.prepend('ROOTSYSLIB', root_lib_env)
50 env.prepend('ROOTSYSLIB', os.path.join(root_env,'lib'))
53 env.prepend('PATH', os.path.join(uranie,'bin'))
54 env.prepend('PATH', os.path.join(root_env,'bin'))
56 env.prepend('ROOT_INCLUDE_PATH',os.path.join(uranie, 'include'))
58 opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib')
59 env.prepend('LD_LIBRARY_PATH', opt_env)
61 jsoncpp_env = os.path.join(uranie,'JSONCPP','jsoncpp-0.10.5','lib')
62 env.prepend('LD_LIBRARY_PATH', jsoncpp_env)
64 def set_nativ_env(env):