File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11%% PYTHON.HAS_PSUTIL is Python psutil module availble
22
3- function y = has_psutil()
3+ function y = has_psutil(force_old )
4+ arguments
5+ force_old (1 ,1 ) logical = false
6+ end
7+
8+ % For MATLAB versions older than R2022a, skip Python version check unless force_old is true
9+ if isMATLABReleaseOlderThan(' R2022a' ) && ~force_old
10+ return
11+ end
412
513y = pvt_psutil();
614% this is to avoid Matlab < R2022a JIT but with Python in general
Original file line number Diff line number Diff line change 2424 return
2525end
2626
27- v = [];
28-
29- % For MATLAB versions older than R2022a, skip Python version check unless force_old is true
30- if isMATLABReleaseOlderThan(' R2022a' ) && ~force_old
31- return
32- end
33-
3427% we use a separate function because the JIT compiler in Matlab < R2022a
3528% breaks for any py.* command when pyenv() is not correctly configured
3629
37- v = stdlib .python .version();
30+ v = stdlib .python .version(force_old );
3831
3932% cache the result
4033if ~isempty(v )
You can’t perform that action at this time.
0 commit comments