@@ -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