mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
build-userland-in-tree is now a Python command
./build calls it, we did this to allow --download-dependencies to work perfectly.
This commit is contained in:
21
common.py
21
common.py
@@ -128,7 +128,13 @@ class LkmcCliFunction(cli_function.CliFunction):
|
||||
* command timing
|
||||
* some common flags, e.g.: --arch, --dry-run, --quiet, --verbose
|
||||
'''
|
||||
def __init__(self, *args, defaults=None, supported_archs=None, **kwargs):
|
||||
def __init__(
|
||||
self,
|
||||
*args,
|
||||
defaults=None,
|
||||
supported_archs=None,
|
||||
**kwargs
|
||||
):
|
||||
'''
|
||||
:ptype defaults: Dict[str,Any]
|
||||
:param defaults: override the default value of an argument
|
||||
@@ -958,7 +964,10 @@ lunch aosp_{}-eng
|
||||
https://stackoverflow.com/questions/2601047/import-a-python-module-without-the-py-extension
|
||||
https://stackoverflow.com/questions/31773310/what-does-the-first-argument-of-the-imp-load-source-method-do
|
||||
'''
|
||||
return imp.load_source(basename.replace('-', '_'), os.path.join(self.env['root_dir'], basename))
|
||||
return imp.load_source(
|
||||
basename.replace('-', '_'),
|
||||
os.path.join(self.env['root_dir'], basename)
|
||||
)
|
||||
|
||||
def import_path_main(self, path):
|
||||
'''
|
||||
@@ -1112,14 +1121,6 @@ lunch aosp_{}-eng
|
||||
]
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def resolve_args(defaults, args, extra_args):
|
||||
if extra_args is None:
|
||||
extra_args = {}
|
||||
argcopy = copy.copy(args)
|
||||
argcopy.__dict__ = dict(list(defaults.items()) + list(argcopy.__dict__.items()) + list(extra_args.items()))
|
||||
return argcopy
|
||||
|
||||
def resolve_source(self, in_path, magic_in_dir, in_exts):
|
||||
'''
|
||||
Convert a path-like string to a source file to the full source path,
|
||||
|
||||
Reference in New Issue
Block a user