diff options
author | Simon Glass <sjg@chromium.org> | 2023-02-24 04:18:12 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-03-08 22:40:49 +0300 |
commit | d85f7909f8fed1e06fe56e03c52d5ff6d8dfbdcf (patch) | |
tree | 0ce2c0d28b72b37f83600a8edf3b7bbde1065c85 | |
parent | 8dd7be7e28cbee524e32f294c366403f2585f0b1 (diff) | |
download | u-boot-d85f7909f8fed1e06fe56e03c52d5ff6d8dfbdcf.tar.xz |
buildman: Use importlib to find the help
Use this function so that the help can be found even when buildman is
running from a package.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/buildman/control.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index aacfb2fc0d..35f44c0cf3 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -3,6 +3,7 @@ # import multiprocessing +import importlib.resources import os import shutil import subprocess @@ -152,9 +153,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, global builder if options.full_help: - tools.print_full_help( - os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), - 'README.rst')) + with importlib.resources.path('buildman', 'README.rst') as readme: + tools.print_full_help(str(readme)) return 0 gitutil.setup() |