Browse Source

west: v0.14.0 is required now (and soon, v1.1)

Commit ce2a7d9a1a
("scripts: zephyr_module: handle expected west errors")
introduced some better error handling that requires
west version v0.14.0 or later to work.

Bump the west version in requirements-base.txt accordingly.

Due to the way zephyr_module.py is handling imports, this API change
resulted in zephyr_module.py running on older versions of west
reacting as if west was not installed, instead of erroring out.
Fix that so users who are on older west will get a hard error.

(We're about to force everyone to move to west v1.1 as soon as I can
get that release done, but this hotfix should still be helpful in the
interim as well.)

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
pull/58093/head
Martí Bolívar 2 years ago committed by Marti Bolivar
parent
commit
251f269e23
  1. 2
      scripts/requirements-base.txt
  2. 17
      scripts/zephyr_module.py

2
scripts/requirements-base.txt

@ -29,7 +29,7 @@ anytree @@ -29,7 +29,7 @@ anytree
intelhex
# it's west
west>=0.10.1
west>=0.14.0
# used for windows based 'menuconfig'
# "win32" is used for 64-bit Windows as well

17
scripts/zephyr_module.py

@ -521,15 +521,22 @@ def west_projects(manifest = None): @@ -521,15 +521,22 @@ def west_projects(manifest = None):
# (and thus maybe not installed)
# if user is providing a specific modules list.
try:
from west.manifest import Manifest, \
ManifestImportFailed, MalformedManifest, ManifestVersionError
from west.configuration import MalformedConfig
from west.util import WestNotFound
from west.version import __version__ as WestVersion
from west.manifest import Manifest
except ImportError:
# West is not installed, so don't return any projects.
return None
# If west *is* installed, we need all of the following imports to
# work. West versions that are excessively old may fail here:
# west.configuration.MalformedConfig was
# west.manifest.MalformedConfig until west v0.14.0, for example.
# These should be hard errors.
from west.manifest import \
ManifestImportFailed, MalformedManifest, ManifestVersionError
from west.configuration import MalformedConfig
from west.util import WestNotFound
from west.version import __version__ as WestVersion
from packaging import version
try:
if not manifest:

Loading…
Cancel
Save