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

2 ビュー (過去 30 日間)
Patrick
Patrick 2023 年 10 月 20 日
回答済み: Rushikesh 2024 年 9 月 27 日
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?

回答 (1 件)

Rushikesh
Rushikesh 2024 年 9 月 27 日
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.

カテゴリ

Help Center および File ExchangeMATLAB Compiler SDK についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by