Skip to content

Commit

Permalink
Improved handling of how to call Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
fe-wickham committed Oct 20, 2020
1 parent 93e5272 commit ced8355
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions vgen_process_simulink_model.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
% this is where hdlworkflow puts the vhdl files
hdlpath = [mp.modelPath filesep 'hdlsrc' filesep mp.modelAbbreviation];

if ispc
python = "python ";
else
if system("python3 --version") == 0
python = "python3 ";
else
[status, output] = system("python --version");
if status == 0 && contains(output, "Python 3.")
python = "python ";
else
disp('Python 3 was not found on the path. This must be fixed before continuing')
return;
end
end

%% Generate the Avalon VHDL wrapper for the VHDL code generated by the HDL Coder
Expand Down

0 comments on commit ced8355

Please sign in to comment.