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>
#
import multiprocessing
+import importlib.resources
import os
import shutil
import subprocess
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()