@@ -406,13 +406,15 @@ def host_arch_win():
406
406
407
407
def compiler_version ():
408
408
try :
409
- proc = subprocess .Popen (shlex .split (CC ) + ['--version' ], stdout = subprocess .PIPE )
409
+ proc = subprocess .Popen (shlex .split (CC ) + ['--version' ],
410
+ stdout = subprocess .PIPE )
410
411
except WindowsError :
411
412
return (0 , False )
412
413
413
414
is_clang = 'clang' in proc .communicate ()[0 ].split ('\n ' )[0 ]
414
415
415
- proc = subprocess .Popen (shlex .split (CC ) + ['-dumpversion' ], stdout = subprocess .PIPE )
416
+ proc = subprocess .Popen (shlex .split (CC ) + ['-dumpversion' ],
417
+ stdout = subprocess .PIPE )
416
418
version = tuple (map (int , proc .communicate ()[0 ].split ('.' )))
417
419
418
420
return (version , is_clang )
@@ -432,7 +434,7 @@ def configure_arm(o):
432
434
433
435
def configure_node (o ):
434
436
if options .dest_os == 'android' :
435
- o ['variables' ]['OS' ] = " android"
437
+ o ['variables' ]['OS' ] = ' android'
436
438
o ['variables' ]['v8_enable_gdbjit' ] = 1 if options .gdb else 0
437
439
o ['variables' ]['v8_no_strict_aliasing' ] = 1 # work around compiler bugs
438
440
o ['variables' ]['node_prefix' ] = os .path .expanduser (options .prefix or '' )
@@ -488,15 +490,15 @@ def configure_node(o):
488
490
489
491
# By default, enable ETW on Windows.
490
492
if flavor == 'win' :
491
- o ['variables' ]['node_use_etw' ] = b (not options .without_etw );
493
+ o ['variables' ]['node_use_etw' ] = b (not options .without_etw )
492
494
elif options .with_etw :
493
495
raise Exception ('ETW is only supported on Windows.' )
494
496
else :
495
497
o ['variables' ]['node_use_etw' ] = 'false'
496
498
497
499
# By default, enable Performance counters on Windows.
498
500
if flavor == 'win' :
499
- o ['variables' ]['node_use_perfctr' ] = b (not options .without_perfctr );
501
+ o ['variables' ]['node_use_perfctr' ] = b (not options .without_perfctr )
500
502
elif options .with_perfctr :
501
503
raise Exception ('Performance counter is only supported on Windows.' )
502
504
else :
@@ -611,22 +613,24 @@ def configure_winsdk(o):
611
613
if flavor != 'win' :
612
614
return
613
615
614
- winsdk_dir = os .environ .get (" WindowsSdkDir" )
616
+ winsdk_dir = os .environ .get (' WindowsSdkDir' )
615
617
616
618
if winsdk_dir and os .path .isfile (winsdk_dir + '\\ bin\\ ctrpp.exe' ):
617
- print "Found ctrpp in WinSDK--will build generated files into tools/msvs/genfiles."
619
+ print ('Found ctrpp in WinSDK--will build generated files '
620
+ 'into tools/msvs/genfiles.' )
618
621
o ['variables' ]['node_has_winsdk' ] = 'true'
619
622
return
620
623
621
- print "ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles."
624
+ print ('ctrpp not found in WinSDK path--using pre-gen files '
625
+ 'from tools/msvs/genfiles.' )
622
626
623
627
624
628
# determine the "flavor" (operating system) we're building for,
625
629
# leveraging gyp's GetFlavor function
626
- flavor_params = {};
630
+ flavor_params = {}
627
631
if (options .dest_os ):
628
- flavor_params ['flavor' ] = options .dest_os ;
629
- flavor = GetFlavor (flavor_params );
632
+ flavor_params ['flavor' ] = options .dest_os
633
+ flavor = GetFlavor (flavor_params )
630
634
631
635
output = {
632
636
'variables' : { 'python' : sys .executable },
@@ -658,12 +662,12 @@ pprint.pprint(output, indent=2)
658
662
659
663
def write (filename , data ):
660
664
filename = os .path .join (root_dir , filename )
661
- print " creating " , filename
665
+ print ' creating ' , filename
662
666
f = open (filename , 'w+' )
663
667
f .write (data )
664
668
665
- write ('config.gypi' , " # Do not edit. Generated by the configure script.\n " +
666
- pprint .pformat (output , indent = 2 ) + " \n " )
669
+ write ('config.gypi' , ' # Do not edit. Generated by the configure script.\n ' +
670
+ pprint .pformat (output , indent = 2 ) + ' \n ' )
667
671
668
672
config = {
669
673
'BUILDTYPE' : 'Debug' if options .debug else 'Release' ,
0 commit comments