Skip to content

Commit 7d35f6f

Browse files
committed
changed version to 9.11.13; rel -> ver
1 parent 0bb4b5b commit 7d35f6f

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
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.12
24+
$ python -m pip install matlabengine==9.11.13
2525
```
2626

2727

@@ -46,7 +46,7 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:matlabroot/bin/glnxa64
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.12
49+
$ python -m pip install matlabengine==9.11.13
5050
```
5151

5252
### macOS
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:matlabroot/bin/maci64
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.12
73+
$ python -m pip install matlabengine==9.11.13
7474
```
7575

7676
---

setup.py

Lines changed: 12 additions & 14 deletions
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.12'
27+
MATLAB_VER = '9.11.13'
2828

2929
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3030
SUPPORTED_PYTHON_VERSIONS = set(['3.7', '3.8', '3.9'])
@@ -64,7 +64,7 @@ class _MatlabFinder(build_py):
6464
no_matlab = "No MATLAB installation found in Windows Registry."
6565
incompatible_ver = "MATLAB version {ver:s} was found, but MATLAB Engine API for Python is not compatible with it. " + \
6666
"To install a compatible version, call python -m pip install matlabengine=={found:s}."
67-
invalid_version_from_matlab_release = "Format of MATLAB version '{ver:s}' is invalid."
67+
invalid_version_from_matlab_ver = "Format of MATLAB version '{ver:s}' is invalid."
6868
invalid_version_from_eng = "Format of MATLAB Engine API version '{ver:s}' is invalid."
6969

7070
def set_platform_and_arch(self):
@@ -174,7 +174,7 @@ def _find_matlab_key_from_windows_registry(self, key):
174174
found_vers.append(sub_key)
175175
# Example: the version in the registry could be "9.13.1" whereas our version is "9.13"
176176
# we still want to allow this
177-
if self._check_matlab_release_against_engine(sub_key):
177+
if self._check_matlab_ver_against_engine(sub_key):
178178
key_value = sub_key
179179
break
180180

@@ -187,21 +187,19 @@ def _find_matlab_key_from_windows_registry(self, key):
187187

188188
return key_value
189189

190-
def _check_matlab_release_against_engine(self, matlab_release):
190+
def _check_matlab_ver_against_engine(self, matlab_ver):
191191
re_major_minor = "^(\d+)\.(\d+)"
192-
matlab_release_match = re.match(re_major_minor, matlab_release)
193-
if not matlab_release_match:
194-
raise RuntimeError(f"{self.invalid_version_from_matlab_release.format(ver=matlab_release)}")
195-
eng_match = re.match(re_major_minor, self.MATLAB_REL)
192+
matlab_ver_match = re.match(re_major_minor, matlab_ver)
193+
if not matlab_ver_match:
194+
raise RuntimeError(f"{self.invalid_version_from_matlab_ver.format(ver=matlab_ver)}")
195+
eng_match = re.match(re_major_minor, self.MATLAB_VER)
196196
if not eng_match:
197-
raise RuntimeError(f"{self.invalid_version_from_eng.format(ver=self.MATLAB_REL)}")
197+
raise RuntimeError(f"{self.invalid_version_from_eng.format(ver=self.MATLAB_VER)}")
198198

199-
matlab_release_major_minor = (matlab_release_match.group(1), matlab_release_match.group(2))
199+
matlab_ver_major_minor = (matlab_ver_match.group(1), matlab_ver_match.group(2))
200200
eng_major_minor = (eng_match.group(1), eng_match.group(2))
201201

202-
if matlab_release_major_minor != eng_major_minor:
203-
return False
204-
return True
202+
return (matlab_ver_major_minor == eng_major_minor)
205203

206204
def verify_matlab_release(self, root):
207205
"""
@@ -301,7 +299,7 @@ def run(self):
301299
setup(
302300
name="matlabengine",
303301
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
304-
version="9.11.12",
302+
version="9.11.13",
305303
description='A module to call MATLAB from Python',
306304
author='MathWorks',
307305
license="MathWorks XSLA License",

0 commit comments

Comments
 (0)