west icon indicating copy to clipboard operation
west copied to clipboard

add `west.check_version()` or so utility function

Open mbolivar opened this issue 5 years ago • 2 comments

Add a utility routine that can be used to check if west is a minimum version, or make west's version accessible as a named tuple like sys.version_info so that it can be compared against more easily.

mbolivar avatar Jan 17 '20 16:01 mbolivar

Specifying the version required in the call allows for a common error message across all modules / extension commands that requires a specific version. Also each user of west does not need to parse the version themselves.

Thus I favor this over a sys.version_info style feature.

tejlmand avatar Jan 20 '20 09:01 tejlmand

In that case I would argue for a WestCommand.ensure_version() method.

mbolivar avatar Jan 27 '20 16:01 mbolivar