16 |
EnsurePythonVersion(2,3) |
EnsurePythonVersion(2,3) |
17 |
|
|
18 |
import sys, os, re, socket, platform, stat |
import sys, os, re, socket, platform, stat |
19 |
|
# For copy() |
20 |
|
import shutil |
21 |
|
|
22 |
# Add our extensions |
# Add our extensions |
23 |
if os.path.isdir('scons'): sys.path.append('scons') |
if os.path.isdir('scons'): sys.path.append('scons') |
169 |
('env_export','Environment variables to be passed to children',[]) |
('env_export','Environment variables to be passed to children',[]) |
170 |
) |
) |
171 |
|
|
172 |
|
|
173 |
|
|
174 |
############ Specify which compilers to use #################### |
############ Specify which compilers to use #################### |
175 |
|
|
176 |
# intelc uses regular expressions improperly and emits a warning about |
# intelc uses regular expressions improperly and emits a warning about |
191 |
env = Environment(tools = ['default'], options = opts) |
env = Environment(tools = ['default'], options = opts) |
192 |
Help(opts.GenerateHelpText(env)) |
Help(opts.GenerateHelpText(env)) |
193 |
|
|
194 |
|
|
195 |
|
############ Make sure target directories exist ################ |
196 |
|
|
197 |
|
if not os.path.isdir(env['bininstall']): |
198 |
|
os.makedirs(env['bininstall']) |
199 |
|
if not os.path.isdir(env['libinstall']): |
200 |
|
os.makedirs(env['libinstall']) |
201 |
|
if not os.path.isdir(env['pyinstall']): |
202 |
|
os.makedirs(env['pyinstall']) |
203 |
|
|
204 |
########## Copy required environment vars ###################### |
########## Copy required environment vars ###################### |
205 |
|
|
206 |
for i in env['env_export']: |
for i in env['env_export']: |
899 |
print "Error attempting to write unittests file." |
print "Error attempting to write unittests file." |
900 |
sys.exit(1) |
sys.exit(1) |
901 |
|
|
902 |
|
#Make sure that the escript wrapper is in place |
903 |
|
if not os.path.isfile(os.path.join(env['bininstall'],'escript')): |
904 |
|
print "Copying escript wrapper" |
905 |
|
shutil.copy("bin/escript",os.path.join(env['bininstall'],'escript')) |