Skip to content

Commit be40b91

Browse files
committed
R2021b 9.11.19a4 better error messages
1 parent 1517cb3 commit be40b91

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
2121
MATLAB Engine API for Python can be installed directly from the Python Package Index.
2222
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
2323
```bash
24-
$ python -m pip install matlabengine==9.11.19a3
24+
$ python -m pip install matlabengine==9.11.19a4
2525
```
2626

2727

@@ -35,18 +35,18 @@ When MATLAB is not installed in the default location, the bin/*architecture* dir
3535

3636
```bash
3737
# in .bashrc
38-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:matlabroot/bin/glnxa64
38+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<matlabroot>/bin/glnxa64
3939
```
4040

4141
```bash
4242
# in .tcshrc
43-
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:matlabroot/bin/glnxa64
43+
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:<matlabroot>/bin/glnxa64
4444
```
4545

4646
MATLAB Engine API for Python can be installed directly from the Python Package Index.
4747
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
4848
```bash
49-
$ python -m pip install matlabengine==9.11.19a3
49+
$ python -m pip install matlabengine==9.11.19a4
5050
```
5151

5252
### macOS
@@ -59,18 +59,18 @@ When MATLAB is not installed in the default location, the bin/*architecture* dir
5959

6060
```bash
6161
# in .bashrc
62-
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:matlabroot/bin/maci64
62+
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:<matlabroot>/bin/maci64
6363
```
6464

6565
```bash
6666
# in .tcshrc
67-
setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:matlabroot/bin/maci64
67+
setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:<matlabroot>/bin/maci64
6868
```
6969

7070
MATLAB Engine API for Python can be installed directly from the Python Package Index.
7171
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
7272
```bash
73-
$ python -m pip install matlabengine==9.11.19a3
73+
$ python -m pip install matlabengine==9.11.19a4
7474
```
7575

7676
---

setup.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class _MatlabFinder(build_py):
2424
MATLAB_REL = 'R2021b'
2525

2626
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
27-
MATLAB_VER = '9.11.19a3'
27+
MATLAB_VER = '9.11.19a4'
2828

2929
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3030
SUPPORTED_PYTHON_VERSIONS = set(['3.7', '3.8', '3.9'])
@@ -57,7 +57,8 @@ class _MatlabFinder(build_py):
5757
no_windows_install = "MATLAB installation not found in Windows Registry:"
5858
unsupported_platform = "{platform:s} is not a supported platform."
5959
unsupported_python = "{python:s} is not supported. The supported Python versions are {supported:s}."
60-
set_path = "MATLAB installation not found in {path1:s}. Add matlabroot/bin/{arch:s} to {path2:s}."
60+
unset_env = "Environment variable {path1:s} has not been set. Add <matlabroot>/bin/{arch:s} to {path2:s}, where <matlabroot> is the root of a valid MATLAB installation."
61+
set_path = "MATLAB installation not found in {path1:s}. Add <matlabroot>/bin/{arch:s} to {path2:s}, where <matlabroot> is the root of a valid MATLAB installation."
6162
no_compatible_matlab = "No compatible MATLAB installation found in Windows Registry. This release of " + \
6263
"MATLAB Engine API for Python is compatible with version {ver:s}. The found versions were"
6364
no_matlab = "No compatible MATLAB installation found in Windows Registry."
@@ -116,7 +117,7 @@ def _create_path_list(self):
116117
path_dirs.extend(path_string.split(os.pathsep))
117118

118119
if not path_dirs:
119-
raise RuntimeError(self.set_path.format(path1=self.path_name, arch=self.arch, path2=self.path_name))
120+
raise RuntimeError(self.unset_env.format(path1=self.path_name, arch=self.arch, path2=self.path_name))
120121

121122
return path_dirs
122123

@@ -172,7 +173,7 @@ def _find_matlab_key_from_windows_registry(self, key):
172173
sub_key = winreg.EnumKey(key, idx)
173174
if sub_key in self.VER_TO_REL:
174175
found_vers.append(sub_key)
175-
# Example: the version in the registry could be "9.12" whereas the version in this file is "9.12.1".
176+
# Example: the version in the registry could be "9.X" whereas the version in this file could be "9.X.Y".
176177
# We want to allow this.
177178
if self._check_matlab_ver_against_engine(sub_key):
178179
key_value = sub_key
@@ -309,7 +310,7 @@ def run(self):
309310
setup(
310311
name="matlabengine",
311312
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
312-
version="9.11.19a3",
313+
version="9.11.19a4",
313314
description='A module to call MATLAB from Python',
314315
author='MathWorks',
315316
license="MathWorks XSLA License",

0 commit comments

Comments
 (0)