File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -571,10 +571,17 @@ def collect_cc(info_add):
571
571
except ImportError :
572
572
args = CC .split ()
573
573
args .append ('--version' )
574
- proc = subprocess .Popen (args ,
575
- stdout = subprocess .PIPE ,
576
- stderr = subprocess .STDOUT ,
577
- universal_newlines = True )
574
+ try :
575
+ proc = subprocess .Popen (args ,
576
+ stdout = subprocess .PIPE ,
577
+ stderr = subprocess .STDOUT ,
578
+ universal_newlines = True )
579
+ except OSError :
580
+ # Cannot run the compiler, for example when Python has been
581
+ # cross-compiled and installed on the target platform where the
582
+ # compiler is missing.
583
+ return
584
+
578
585
stdout = proc .communicate ()[0 ]
579
586
if proc .returncode :
580
587
# CC --version failed: ignore error
Original file line number Diff line number Diff line change
1
+ Fix pythoninfo when the compiler is missing.
You can’t perform that action at this time.
0 commit comments