Skip to content

Commit 69ca144

Browse files
committed
version: Fix setuptools_scm runtime error
`setuptools_scm` is used to retrieve version during runtime. However, the folder where a package gets installed is not a git repository which leads to `setuptools_scm` failure. Use `get_distribution` instead of `setuptools_scm` to get version during runtime.
1 parent bb7f07f commit 69ca144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mbed_os_tools/test/host_tests_runner/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
2121
"""
2222

23-
from setuptools_scm import get_version
23+
from pkg_resources import get_distribution
2424

25-
__version__ = get_version(root='../../../..', relative_to=__file__)
25+
__version__ = get_distribution("mbed-os-tools").version

0 commit comments

Comments
 (0)