diff options
author | Simon Glass <sjg@chromium.org> | 2020-04-17 18:09:03 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-04-26 14:25:21 -0600 |
commit | 16287933a852bab2ac4985a770e08c9aa69d21b1 (patch) | |
tree | e907492e72c279b64ac971c916de8078a48e8157 /tools/patman/main.py | |
parent | 0ede00fdaf1d2162350631294f57645675737d89 (diff) |
binman: Move to absolute imports
At present binman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.
Move binman to use absolute imports. This enables removable of the path
adjusting in Entry also.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/main.py')
-rwxr-xr-x | tools/patman/main.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/patman/main.py b/tools/patman/main.py index f3d9c0c4348..b642c2ed03e 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -13,19 +13,19 @@ import sys import unittest if __name__ == "__main__": - # Allow 'from patman import xxx to work' + # Allow 'import xxx to work' our_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(our_path, '..')) # Our modules -from patman import checkpatch -from patman import command -from patman import gitutil -from patman import patchstream -from patman import project -from patman import settings -from patman import terminal -from patman import test +import checkpatch +import command +import gitutil +import patchstream +import project +import settings +import terminal +import test parser = OptionParser() @@ -86,7 +86,7 @@ if __name__ != "__main__": # Run our meagre tests elif options.test: import doctest - from patman import func_test + import func_test sys.argv = [sys.argv[0]] result = unittest.TestResult() |