How can I find the user-specified version of a Python package generated by MATLAB Compiler SDK?

2 Ansichten (letzte 30 Tage)
I created a Python package using MATLAB Compiler SDK. I would like to require a certain version of the package, so other people who are using it know when to install the new version to their Python environment. In the library compiler, there is a specific field called "Version". However, I can't find the specified version when using the package in Python. Runnning
pip show myPackage
returns version 9.14, although I specified the version to be 1.1. Furthermore, MathWorks is listed as the author, even though I specified myself to be the author in the library compiler.
Can anyone help me find my user-specified version of the generated Python package?

Antworten (1)

Rushikesh
Rushikesh am 27 Sep. 2024
Hello @Patrick,
When you generate a Python package using MATLAB Compiler SDK, a ‘setup.py’ file is created. By editing this file, you can view and modify metadata such as the library name, version number, and author name.
It is important to note that the version number specified in the Library Compiler app may not be reflected in the package metadata used by pip. Instead, the version number displayed (such as 9.14) typically corresponds to the MATLAB Runtime version with which the package is built, rather than the version you specified.
To ensure the desired version number and other metadata are accurately represented, you must manually edit the ‘setup.py’ file to change the respective name and version number. After making these changes, rebuild and install the updated package to see the desired modifications.

Kategorien

Mehr zu MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by