Skip to content

Commit 88d5453

Browse files
committed
R2020b 9.9.1a2
1 parent 2532c1a commit 88d5453

File tree

9 files changed

+843
-80
lines changed

9 files changed

+843
-80
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 R2022b
9+
* MATLAB release R2020b
1010

1111
### Required 3rd Party Products
1212
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
13-
* Python 3.8, 3.9, or 3.10
13+
* Python 3.6, 3.7, or 3.8
1414
* Supported Python versions by MATLAB release can be found [here](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/python-compatibility.pdf).
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==9.13.1a2
24+
$ python -m pip install matlabengine==9.9.1a2
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/R2022b```
32+
```/usr/local/MATLAB/R2020b```
3333

3434
When MATLAB is not installed in the default location, the bin/*architecture* directory within the MATLAB root directory must be added to an environment variable. 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==9.13.1a2
49+
$ python -m pip install matlabengine==9.9.1a2
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_R2022b.app```
56+
```/Applications/MATLAB_R2020b.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 an environment variable. 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==9.13.1a2
73+
$ python -m pip install matlabengine==9.9.1a2
7474
```
7575

7676
---

setup.py

Lines changed: 8 additions & 8 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 = 'R2022b'
24+
MATLAB_REL = 'R2020b'
2525

2626
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
27-
MATLAB_VER = '9.13.1a2'
27+
MATLAB_VER = '9.9.1a2'
2828

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

3232
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3333
VER_TO_REL = {
@@ -309,7 +309,7 @@ def run(self):
309309
setup(
310310
name="matlabengine",
311311
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
312-
version="9.13.1a2",
312+
version="9.9.1a2",
313313
description='A module to call MATLAB from Python',
314314
author='MathWorks',
315315
license="MathWorks XSLA License",
@@ -334,10 +334,10 @@ def run(self):
334334
"Natural Language :: English",
335335
"Intended Audience :: Developers",
336336
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
337-
"Programming Language :: Python :: 3.8",
338-
"Programming Language :: Python :: 3.9",
339-
"Programming Language :: Python :: 3.10"
337+
"Programming Language :: Python :: 3.6",
338+
"Programming Language :: Python :: 3.7",
339+
"Programming Language :: Python :: 3.8"
340340
],
341341
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
342-
python_requires=">=3.8, <3.11"
342+
python_requires=">=3.6, <3.9"
343343
)

src/matlab/__init__.py

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,27 @@
1-
# Copyright 2022 MathWorks, Inc.
1+
# Copyright 2014-2015 MathWorks, Inc.
2+
"""
3+
Array interface between Python and MATLAB.
24
3-
import os
4-
import platform
5-
import sys
6-
import pkgutil
7-
8-
__path__ = pkgutil.extend_path(__path__, __name__)
9-
package_folder = os.path.dirname(os.path.realpath(__file__))
10-
sys.path.append(package_folder)
11-
12-
def add_dirs_to_path(bin_dir, engine_dir, extern_dir):
13-
"""
14-
Adds MATLAB engine and extern/bin directories to sys.path.
15-
"""
16-
path = 'PATH'
17-
18-
if not os.path.isdir(engine_dir):
19-
raise RuntimeError("Could not find directory: {0}".format(engine_dir))
20-
21-
if not os.path.isdir(extern_dir):
22-
raise RuntimeError("Could not find directory: {0}".format(extern_dir))
23-
24-
if platform.system() == 'Windows':
25-
if not os.path.isdir(bin_dir):
26-
raise RuntimeError("Could not find directory: {0}".format(bin_dir))
27-
if path in os.environ:
28-
paths = os.environ[path]
29-
os.environ[path] = bin_dir + os.pathsep + paths
30-
else:
31-
os.environ[path] = bin_dir
32-
if sys.version_info.major >= 3 and sys.version_info.minor >= 8:
33-
os.add_dll_directory(bin_dir)
5+
This package defines classes and exceptions that create and manage
6+
multidimensional arrays in Python that are passed between Python and MATLAB.
7+
The arrays, while similar to Python sequences, have different behaviors.
348
35-
sys.path.insert(0, engine_dir)
36-
sys.path.insert(0, extern_dir)
37-
38-
arch_file = os.path.join(package_folder, 'engine', '_arch.txt')
39-
if not os.path.isfile(arch_file):
40-
raise RuntimeError("The MATLAB Engine for Python install is corrupted, please try to re-install.")
41-
42-
with open(arch_file, 'r') as root:
43-
[arch, bin_folder, engine_folder, extern_bin] = [line.strip() for line in root.readlines()]
9+
Modules
10+
-------
11+
* mlarray - type-specific multidimensional array classes for working
12+
with MATLAB
13+
* mlexceptions - exceptions raised manipulating mlarray objects
14+
"""
4415

16+
import os
17+
import sys
18+
from pkgutil import extend_path
19+
__path__ = extend_path(__path__, '__name__')
4520

46-
add_dirs_to_path(bin_folder, engine_folder, extern_bin)
21+
_package_folder = os.path.dirname(os.path.realpath(__file__))
22+
sys.path.append(_package_folder)
4723

48-
from matlabmultidimarrayforpython import double, single, uint8, int8, uint16, \
49-
int16, uint32, int32, uint64, int64, logical, ShapeError, SizeError
24+
from mlarray import double, single, uint8, int8, uint16, \
25+
int16, uint32, int32, uint64, int64, logical
26+
from mlexceptions import ShapeError as ShapeError
27+
from mlexceptions import SizeError as SizeError

src/matlab/_internal/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Copyright 2014 MathWorks, Inc.

0 commit comments

Comments
 (0)