Skip to content

Commit df91bd2

Browse files
committed
26.2.2
1 parent 93c46a5 commit df91bd2

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Supported Python versions by MATLAB release can be found [here](https://www.math
1818
MATLAB Engine API for Python can be installed directly from the Python Package Index.
1919
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
2020
```bash
21-
$ python -m pip install matlabengine==26.2.1
21+
$ python -m pip install matlabengine==26.2.2
2222
```
2323

2424

@@ -43,14 +43,14 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:<matlabroot>/bin/glnxa64
4343
MATLAB Engine API for Python can be installed directly from the Python Package Index.
4444
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
4545
```bash
46-
$ python -m pip install matlabengine==26.2.1
46+
$ python -m pip install matlabengine==26.2.2
4747
```
4848

4949
### macOS
5050
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, macOS installs MATLAB at:<br>
5151

5252
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
53-
```/Applications/MATLAB_R2026a.app```
53+
```/Applications/MATLAB_R2026b.app```
5454

5555
When MATLAB is not installed in the default location, the bin/*architecture* directory within the MATLAB root directory must be added to the environment variable DYLD_LIBRARY_PATH. The path can be added to the environment variable within the shell startup configuration file (for example, .bashrc for bash shell or .tcshrc for tcsh).
5656

@@ -67,7 +67,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:<matlabroot>/bin/maci64
6767
MATLAB Engine API for Python can be installed directly from the Python Package Index.
6868
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
6969
```bash
70-
$ python -m pip install matlabengine==26.2.1
70+
$ python -m pip install matlabengine==26.2.2
7171
```
7272

7373
---

setup.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import re
77
import sys
88
import platform
9+
import warnings
910
import xml.etree.ElementTree as xml
1011
if platform.system() == 'Windows':
1112
import winreg
@@ -24,8 +25,11 @@ class _MatlabFinder(build_py):
2425
MATLAB_REL = 'R2026b'
2526

2627
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
27-
MATLAB_VER = '26.2.1'
28+
MATLAB_VER = '26.2.2'
2829

30+
# MUST_BE_CHECKED_EACH_RELEASE (Search repo for this string)
31+
MAX_VALIDATED_MINOR_PY_VER = 14
32+
2933
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3034
SUPPORTED_PYTHON_VERSIONS = set(['3.10', '3.11', '3.12', '3.13', '3.14'])
3135

@@ -68,6 +72,7 @@ class _MatlabFinder(build_py):
6872
no_windows_install = "MATLAB installation not found in Windows Registry:"
6973
unsupported_platform = "{platform:s} is not a supported platform."
7074
unsupported_python = "{python:s} is not supported. The supported Python versions are {supported:s}."
75+
unvalidated_python = "Detected Python version {python:s} has not been validated with MATLAB Engine API for Python. To avoid unexpected behavior, use one of the validated Python versions: {supported:s}."
7176
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."
7277
install_or_set_path = "MATLAB {ver:s} installation not found. Install to default location, or add <matlabroot>/bin/{arch:s} to {path:s}, where <matlabroot> is the root of a MATLAB {ver:s} installation."
7378
no_compatible_matlab = "No compatible MATLAB installation found in Windows Registry. This release of " + \
@@ -117,7 +122,10 @@ def set_python_version(self):
117122
self.python_ver = f"{ver.major}.{ver.minor}"
118123

119124
if self.python_ver not in self.SUPPORTED_PYTHON_VERSIONS:
120-
raise RuntimeError(self.unsupported_python.format(python=self.python_ver, supported=str(self.SUPPORTED_PYTHON_VERSIONS)))
125+
if ver.minor > self.MAX_VALIDATED_MINOR_PY_VER:
126+
warnings.warn(self.unvalidated_python.format(python=self.python_ver, supported=str(self.SUPPORTED_PYTHON_VERSIONS)))
127+
else:
128+
raise RuntimeError(self.unsupported_python.format(python=self.python_ver, supported=str(self.SUPPORTED_PYTHON_VERSIONS)))
121129

122130
self._print_if_verbose(f'{self.python_ver=}')
123131

@@ -435,7 +443,7 @@ def run(self):
435443
setup(
436444
name="matlabengine",
437445
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
438-
version="26.2.1",
446+
version="26.2.2",
439447
description='A module to call MATLAB from Python',
440448
author='MathWorks',
441449
license="LICENSE.txt, located in this repository",
@@ -460,12 +468,12 @@ def run(self):
460468
"Natural Language :: English",
461469
"Intended Audience :: Developers",
462470
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
463-
"Programming Language :: Python :: 3.9",
464471
"Programming Language :: Python :: 3.10",
465472
"Programming Language :: Python :: 3.11",
466473
"Programming Language :: Python :: 3.12",
467-
"Programming Language :: Python :: 3.13"
474+
"Programming Language :: Python :: 3.13",
475+
"Programming Language :: Python :: 3.14"
468476
],
469477
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
470-
python_requires=">=3.9, <3.14"
478+
python_requires=">=3.10"
471479
)

0 commit comments

Comments
 (0)