Skip to content

Commit 413ef89

Browse files
committed
24.2.1
1 parent a8ac30a commit 413ef89

File tree

5 files changed

+34
-20
lines changed

5 files changed

+34
-20
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
66
## Requirements
77
### Required MathWorks Products
88
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
9-
* MATLAB release R2024a
9+
* MATLAB release R2024b
1010

1111
### Required 3rd Party Products
1212
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
13-
* Python 3.9, 3.10, or 3.11
13+
* Python 3.9, 3.10, 3.11, or 3.12
1414
* Supported Python versions by MATLAB release can be found [here](https://www.mathworks.com/support/requirements/python-compatibility.html).
1515

1616
---
@@ -21,15 +21,15 @@ The MATLAB&reg; Engine API for Python&reg; 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==24.1.2
24+
$ python -m pip install matlabengine==24.2.1
2525
```
2626

2727

2828

2929
### Linux&reg;
3030
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, Linux installs MATLAB at:<br>
3131
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
32-
```/usr/local/MATLAB/R2024a```
32+
```/usr/local/MATLAB/R2024b```
3333

3434
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 LD_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).
3535

@@ -46,14 +46,14 @@ 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==24.1.2
49+
$ python -m pip install matlabengine==24.2.1
5050
```
5151

5252
### macOS
5353
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>
5454

5555
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
56-
```/Applications/MATLAB_R2024a.app```
56+
```/Applications/MATLAB_R2024b.app```
5757

5858
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).
5959

@@ -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==24.1.2
73+
$ python -m pip install matlabengine==24.2.1
7474
```
7575

7676
---

setup.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ class _MatlabFinder(build_py):
2121
}
2222

2323
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
24-
MATLAB_REL = 'R2024a'
24+
MATLAB_REL = 'R2024b'
2525

2626
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
27-
MATLAB_VER = '24.1.2'
27+
MATLAB_VER = '24.2.1'
2828

2929
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
30-
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
30+
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11', '3.12'])
3131

3232
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3333
VER_TO_REL = {
@@ -38,7 +38,8 @@ class _MatlabFinder(build_py):
3838
"9.13": "R2022b",
3939
"9.14": "R2023a",
4040
"23.2": "R2023b",
41-
"24.1": "R2024a"
41+
"24.1": "R2024a",
42+
"24.2": "R2024b"
4243
}
4344

4445
DEFAULT_INSTALLS = {
@@ -416,7 +417,7 @@ def run(self):
416417
setup(
417418
name="matlabengine",
418419
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
419-
version="24.1.2",
420+
version="24.2.1",
420421
description='A module to call MATLAB from Python',
421422
author='MathWorks',
422423
license="LICENSE.txt, located in this repository",
@@ -443,8 +444,9 @@ def run(self):
443444
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
444445
"Programming Language :: Python :: 3.9",
445446
"Programming Language :: Python :: 3.10",
446-
"Programming Language :: Python :: 3.11"
447+
"Programming Language :: Python :: 3.11",
448+
"Programming Language :: Python :: 3.12"
447449
],
448450
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
449-
python_requires=">=3.9, <3.12"
451+
python_requires=">=3.9, <3.13"
450452
)

src/matlab/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 MathWorks, Inc.
1+
# Copyright 2024 MathWorks, Inc.
22

33
import os
44
import platform
@@ -37,7 +37,7 @@ def add_dirs_to_path(bin_dir, engine_dir, extern_dir):
3737

3838
arch_file = os.path.join(package_folder, 'engine', '_arch.txt')
3939
if not os.path.isfile(arch_file):
40-
raise RuntimeError("The MATLAB Engine for Python install is corrupted, please try to re-install.")
40+
raise RuntimeError("The MATLAB Engine for Python install is corrupted. Please try to re-install.")
4141

4242
with open(arch_file, 'r') as root:
4343
[arch, bin_folder, engine_folder, extern_bin] = [line.strip() for line in root.readlines()]

src/matlab/engine/__init__.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Copyright 2014-2023 MathWorks, Inc.
1+
#Copyright 2014-2024 MathWorks, Inc.
22

33
"""
44
The MATLAB Engine enables you to call any MATLAB statement either synchronously
@@ -25,18 +25,30 @@
2525
import atexit
2626
import weakref
2727
import threading
28+
import warnings
2829

2930
# UPDATE_IF_PYTHON_VERSION_ADDED_OR_REMOVED : search for this string in codebase
3031
# when support for a Python version must be added or removed
31-
_supported_versions = ['3_9', '3_10', '3_11']
32+
33+
_supported_versions = ['3_9', '3_10', '3_11', '3_12']
3234
_ver = sys.version_info
3335
_version = '{0}_{1}'.format(_ver[0], _ver[1])
36+
_newer_than_supported = _ver[1] > 12
37+
3438
_PYTHONVERSION = None
3539

3640
if _version in _supported_versions:
3741
_PYTHONVERSION = _version
42+
elif _newer_than_supported:
43+
warnings.warn('MATLAB Engine for Python supports Python version'
44+
' 3.9, 3.10, 3.11, and 3.12, but your version of Python '
45+
'is %s' % _version)
46+
_PYTHONVERSION = _version
3847
else:
39-
raise EnvironmentError("Python %s is not supported." % _version)
48+
raise EnvironmentError('MATLAB Engine for Python supports Python version'
49+
' 3.9, 3.10, 3.11, and 3.12, but your version of Python '
50+
'is %s' % _version)
51+
4052

4153
_module_folder = os.path.dirname(os.path.realpath(__file__))
4254
_arch_filename = os.path.join(_module_folder, "_arch.txt")

src/matlab/engine/enginehelper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Copyright 2017-2020 MathWorks, Inc.
1+
#Copyright 2017-2022 MathWorks, Inc.
22
import warnings
33
from matlab.engine import pythonengine
44
import sys

0 commit comments

Comments
 (0)