From 36b4cb513de9dc4b4b5203e38d8d7ecc0de2731a Mon Sep 17 00:00:00 2001
From: AlanF-MW <103284994+alanfmw@users.noreply.github.com>
Date: Thu, 21 Mar 2024 18:17:00 -0400
Subject: [PATCH 1/6] 24.1.1
---
README.md | 12 ++++++------
setup.py | 11 ++++++-----
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index d285a06..db33104 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
## Requirements
### Required MathWorks Products
-* MATLAB release R2023b
+* MATLAB release R2024a
### Required 3rd Party Products
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.1
```
@@ -29,7 +29,7 @@ $ python -m pip install matlabengine==23.2.3
### Linux®
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, Linux installs MATLAB at:
-```/usr/local/MATLAB/R2023b```
+```/usr/local/MATLAB/R2024a```
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).
@@ -46,14 +46,14 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/bin/glnxa64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.1
```
### macOS
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, macOS installs MATLAB at:
-```/Applications/MATLAB_R2023b.app```
+```/Applications/MATLAB_R2024a.app```
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).
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/bin/maci64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.1
```
---
diff --git a/setup.py b/setup.py
index a585e21..1e6f24a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Mathworks, Inc.
+# Copyright 2024 Mathworks, Inc.
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
@@ -21,10 +21,10 @@ class _MatlabFinder(build_py):
}
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_REL = 'R2023b'
+ MATLAB_REL = 'R2024a'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_VER = '23.2.3'
+ MATLAB_VER = '24.1.1'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -37,7 +37,8 @@ class _MatlabFinder(build_py):
"9.12": "R2022a",
"9.13": "R2022b",
"9.14": "R2023a",
- "23.2": "R2023b"
+ "23.2": "R2023b",
+ "24.1": "R2024a"
}
DEFAULT_INSTALLS = {
@@ -415,7 +416,7 @@ def run(self):
setup(
name="matlabengine",
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- version="23.2.3",
+ version="24.1.1",
description='A module to call MATLAB from Python',
author='MathWorks',
license="LICENSE.txt, located in this repository",
From ca63a7f6a97cd62b9a7edec0898caf15d0cdbb7b Mon Sep 17 00:00:00 2001
From: alexj0se
Date: Fri, 22 Mar 2024 14:06:06 -0400
Subject: [PATCH 2/6] Add tests for 24a
---
.github/workflows/{qualify_23b.yml => qualify_24a.yml} | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename .github/workflows/{qualify_23b.yml => qualify_24a.yml} (91%)
diff --git a/.github/workflows/qualify_23b.yml b/.github/workflows/qualify_24a.yml
similarity index 91%
rename from .github/workflows/qualify_23b.yml
rename to .github/workflows/qualify_24a.yml
index daa00d8..832712b 100644
--- a/.github/workflows/qualify_23b.yml
+++ b/.github/workflows/qualify_24a.yml
@@ -1,15 +1,15 @@
# Run tInstall on Ubuntu against python versions 3.11, 3.10 and 3.9
-name: Test R2023b
+name: Test R2024a
on:
push:
branches:
- - R2023b
+ - R2024a
pull_request:
branches:
- - R2023b
+ - R2024a
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -34,7 +34,7 @@ jobs:
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
- release: R2023b
+ release: R2024a
- uses: actions/checkout@v3
From 521d0ca01c78a981a54052fdff984e7ea27f85e3 Mon Sep 17 00:00:00 2001
From: Alex Jose <48287331+alexj0se@users.noreply.github.com>
Date: Fri, 22 Mar 2024 15:44:54 -0400
Subject: [PATCH 3/6] Use latest version of setup-matlab action (#41)
---
.github/workflows/qualify_24a.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/qualify_24a.yml b/.github/workflows/qualify_24a.yml
index 832712b..1f4d2f1 100644
--- a/.github/workflows/qualify_24a.yml
+++ b/.github/workflows/qualify_24a.yml
@@ -32,7 +32,7 @@ jobs:
python-version: ${{ matrix.python }}
- name: Set up MATLAB
- uses: matlab-actions/setup-matlab@v1
+ uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
From afb4816fe5cd62728d26d792d75afc375e3519b9 Mon Sep 17 00:00:00 2001
From: AlanF-MW <103284994+alanfmw@users.noreply.github.com>
Date: Sun, 24 Mar 2024 11:29:32 -0400
Subject: [PATCH 4/6] 24.1.2
---
README.md | 6 +++---
setup.py | 4 ++--
src/matlab/engine/__init__.py | 17 +++++++++++------
src/matlab/engine/fevalfuture.py | 6 ------
src/matlab/engine/futureresult.py | 7 +------
5 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/README.md b/README.md
index db33104..7469d49 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.1
+$ python -m pip install matlabengine==24.1.2
```
@@ -46,7 +46,7 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/bin/glnxa64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.1
+$ python -m pip install matlabengine==24.1.2
```
### macOS
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/bin/maci64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.1
+$ python -m pip install matlabengine==24.1.2
```
---
diff --git a/setup.py b/setup.py
index 1e6f24a..286746c 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ class _MatlabFinder(build_py):
MATLAB_REL = 'R2024a'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_VER = '24.1.1'
+ MATLAB_VER = '24.1.2'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -416,7 +416,7 @@ def run(self):
setup(
name="matlabengine",
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- version="24.1.1",
+ version="24.1.2",
description='A module to call MATLAB from Python',
author='MathWorks',
license="LICENSE.txt, located in this repository",
diff --git a/src/matlab/engine/__init__.py b/src/matlab/engine/__init__.py
index c3c9710..244205e 100644
--- a/src/matlab/engine/__init__.py
+++ b/src/matlab/engine/__init__.py
@@ -1,4 +1,4 @@
-#Copyright 2014-2022 MathWorks, Inc.
+#Copyright 2014-2023 MathWorks, Inc.
"""
The MATLAB Engine enables you to call any MATLAB statement either synchronously
@@ -44,7 +44,10 @@
firstExceptionMessage = ''
secondExceptionMessage = ''
try:
- pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
+ if _PYTHONVERSION != '3_9' and _PYTHONVERSION != '3_10':
+ pythonengine = importlib.import_module("matlabengineforpython_abi3")
+ else:
+ pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
except Exception as firstE:
firstExceptionMessage = str(firstE)
@@ -65,7 +68,10 @@
else:
os.environ[_envs[_arch]] = _bin_dir
os.add_dll_directory(_bin_dir)
- pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
+ if _PYTHONVERSION != '3_9' or _PYTHONVERSION != '3_10':
+ pythonengine = importlib.import_module("matlabengineforpython_abi3")
+ else:
+ pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
except Exception as secondE:
str1 = 'Please reinstall MATLAB Engine for Python or contact '
str2 = 'MathWorks Technical Support for assistance:\nFirst issue: {}\nSecond issue: {}'.format(
@@ -106,9 +112,8 @@ def start_matlab(option="-nodesktop", **kwargs):
Parameters
option - MATLAB startup option.
- async, background: bool - start MATLAB asynchronously or not. This parameter
- is optional and false by default. "async" is a synonym for "background"
- that will be removed in a future release.
+ background: bool - start MATLAB asynchronously or not. This parameter
+ is optional and false by default.
Returns
MatlabEngine - if aync or background is false. This object can be used to evaluate
diff --git a/src/matlab/engine/fevalfuture.py b/src/matlab/engine/fevalfuture.py
index ede123a..33a4501 100644
--- a/src/matlab/engine/fevalfuture.py
+++ b/src/matlab/engine/fevalfuture.py
@@ -19,12 +19,6 @@
import time
import weakref
-try:
- long
-except NameError:
- long = int
-
-
class FevalFuture(BaseFuture):
"""
A FevalFuture object is used to hold the future result of a MATLAB
diff --git a/src/matlab/engine/futureresult.py b/src/matlab/engine/futureresult.py
index 3bcdf9d..591d4b1 100644
--- a/src/matlab/engine/futureresult.py
+++ b/src/matlab/engine/futureresult.py
@@ -16,11 +16,6 @@
from matlab.engine import MatlabFuture
from matlab.engine import FevalFuture
-try:
- long
-except NameError:
- long = int
-
class FutureResult():
"""
A FutureResult object is used to hold the future result of a function call.
@@ -58,7 +53,7 @@ def result(self, timeout=None):
RejectedExecutionError - an error occurs if the engine is terminated.
"""
if timeout is not None:
- if not isinstance(timeout, (int, long, float)):
+ if not isinstance(timeout, (int, float)):
raise TypeError(pythonengine.getMessage('TimeoutMustBeNumeric', type(timeout).__name__))
if timeout < 0:
From c8c1af03e4e44d9037fc06b35648928477af9368 Mon Sep 17 00:00:00 2001
From: AlanF-MW <103284994+alanfmw@users.noreply.github.com>
Date: Thu, 26 Dec 2024 13:56:40 -0500
Subject: [PATCH 5/6] removed patch number from suggested commands in readme
---
README.md | 6 +++---
setup.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 7469d49..a547b06 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.2
+$ python -m pip install matlabengine==24.1
```
@@ -46,7 +46,7 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/bin/glnxa64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.2
+$ python -m pip install matlabengine==24.1
```
### macOS
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/bin/maci64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1.2
+$ python -m pip install matlabengine==24.1
```
---
diff --git a/setup.py b/setup.py
index 286746c..7e4a0da 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ class _MatlabFinder(build_py):
MATLAB_REL = 'R2024a'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_VER = '24.1.2'
+ MATLAB_VER = '24.1.3'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -416,7 +416,7 @@ def run(self):
setup(
name="matlabengine",
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- version="24.1.2",
+ version="24.1.3",
description='A module to call MATLAB from Python',
author='MathWorks',
license="LICENSE.txt, located in this repository",
From e8d80df715310a3b0cf7f7dabe69625058588157 Mon Sep 17 00:00:00 2001
From: AlanF-MW <103284994+alanfmw@users.noreply.github.com>
Date: Fri, 3 Jan 2025 11:04:06 -0500
Subject: [PATCH 6/6] returned to listing three-part version number in
documentation
---
README.md | 6 +++---
setup.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index a547b06..198cb1f 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1
+$ python -m pip install matlabengine==24.1.4
```
@@ -46,7 +46,7 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/bin/glnxa64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1
+$ python -m pip install matlabengine==24.1.4
```
### macOS
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/bin/maci64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==24.1
+$ python -m pip install matlabengine==24.1.4
```
---
diff --git a/setup.py b/setup.py
index 7e4a0da..a4df27c 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ class _MatlabFinder(build_py):
MATLAB_REL = 'R2024a'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_VER = '24.1.3'
+ MATLAB_VER = '24.1.4'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -416,7 +416,7 @@ def run(self):
setup(
name="matlabengine",
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- version="24.1.3",
+ version="24.1.4",
description='A module to call MATLAB from Python',
author='MathWorks',
license="LICENSE.txt, located in this repository",