Currently it is possible to feed cmake options to setup.py and subsequently to the cmake build command by running a command, such as the following where we are specifying the specific version of Matlab to use.
This currently works fine, however in the future when we may wish to transition to using python -m build or similar, this functionality will need to be revisited, providing we still require it. I have been unable to work out a solution to this so far with python -m build -DMatlab_ROOT_DIR="path/to/matlab/" not being possible currently.
Context
The current method utilised to produce the .whl file of
python setup.py bdist_weel
is considered deprecated and is discouraged (https://setuptools.pypa.io/en/latest/userguide/quickstart.html) in favour of usingpython -m build
.Issue
Currently it is possible to feed cmake options to setup.py and subsequently to the cmake build command by running a command, such as the following where we are specifying the specific version of Matlab to use.
python setup.py bdist_wheel -DMatlab_ROOT_DIR="path/to/matlab/"
This currently works fine, however in the future when we may wish to transition to using
python -m build
or similar, this functionality will need to be revisited, providing we still require it. I have been unable to work out a solution to this so far withpython -m build -DMatlab_ROOT_DIR="path/to/matlab/"
not being possible currently.