Skip to content

Commit 99eeafe

Browse files
committed
Experimental environment variable to override the licmode used during MATLAB startup.
This change contains features that are meant for internal MathWorks development only, and is unsupported and undocumented for general use.
1 parent 1e6be93 commit 99eeafe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

matlab_proxy/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,11 @@ def _get_matlab_cmd(matlab_executable_path, code_to_execute, nlm_conn_str):
684684
return None
685685

686686
matlab_lic_mode = ["-licmode", "file"] if nlm_conn_str else ""
687+
688+
if mwi_env.Experimental.get_licmode_override():
689+
matlab_lic_mode = ["-licmode", mwi_env.Experimental.get_licmode_override()]
690+
logger.info(f"Using MATLAB license mode arguments: {matlab_lic_mode}")
691+
687692
# flag to hide MATLAB Window
688693
flag_to_hide_desktop = ["-nodesktop"]
689694
if system.is_windows():

matlab_proxy/util/mwi/environment_variables.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,8 @@ def get_env_name_use_rich_logging():
223223
def use_rich_logger():
224224
"""Returns true if the cookie jar support is enabled."""
225225
return _is_env_set_to_true(Experimental.get_env_name_use_rich_logging())
226+
227+
@staticmethod
228+
def get_licmode_override():
229+
"""Returns the licmode oveerride if set"""
230+
return os.environ.get("MWI_LICMODE_OVERRIDE", None)

0 commit comments

Comments
 (0)