From 4f6a256f050878323559c0d2fc05df7d5cdc338c Mon Sep 17 00:00:00 2001 From: zebrapurring <> Date: Thu, 3 Aug 2023 18:19:35 +0200 Subject: [PATCH] Support non-default MATLAB installations via MATLAB_HOME envvar --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 44bce7e..6d7540c 100644 --- a/setup.py +++ b/setup.py @@ -40,8 +40,8 @@ class _MatlabFinder(build_py): } DEFAULT_INSTALLS = { - 'Darwin': f"/Applications/MATLAB_{MATLAB_REL}.app", - 'Linux': f"/usr/local/MATLAB/{MATLAB_REL}" + 'Darwin': f"{os.getenv('MATLAB_HOME', '/Applications')}/MATLAB_{MATLAB_REL}.app", + 'Linux': f"{os.getenv('MATLAB_HOME', '/usr/local')}/MATLAB/{MATLAB_REL}" } arch = ''