mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user