diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-03-20 15:13:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-25 12:39:50 +0000 |
commit | 4e186596338af52bf720dcbbdd3a07b722cf9575 (patch) | |
tree | c33f0531fb59f5a7ed34adf0e4b82edbab4b7f6f /bitbake/lib/bb/cookerdata.py | |
parent | f2ca8bc297007e410e9803e915d321b1ba445760 (diff) | |
download | poky-4e186596338af52bf720dcbbdd3a07b722cf9575.tar.gz |
bitbake: bin/bitbake: Create bitbake_main API
Moved most of functionality of bin/bitbake to lib/bb/main.py
to be able to call bitbake from python code.
(Bitbake rev: d377f7f88d73f4e5d2dffef03d6acee809827ac6)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 7eae761d59..6c11a60e0f 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -33,8 +33,8 @@ logger = logging.getLogger("BitBake") | |||
33 | parselog = logging.getLogger("BitBake.Parsing") | 33 | parselog = logging.getLogger("BitBake.Parsing") |
34 | 34 | ||
35 | class ConfigParameters(object): | 35 | class ConfigParameters(object): |
36 | def __init__(self): | 36 | def __init__(self, argv=sys.argv): |
37 | self.options, targets = self.parseCommandLine() | 37 | self.options, targets = self.parseCommandLine(argv) |
38 | self.environment = self.parseEnvironment() | 38 | self.environment = self.parseEnvironment() |
39 | 39 | ||
40 | self.options.pkgs_to_build = targets or [] | 40 | self.options.pkgs_to_build = targets or [] |
@@ -46,7 +46,7 @@ class ConfigParameters(object): | |||
46 | for key, val in self.options.__dict__.items(): | 46 | for key, val in self.options.__dict__.items(): |
47 | setattr(self, key, val) | 47 | setattr(self, key, val) |
48 | 48 | ||
49 | def parseCommandLine(self): | 49 | def parseCommandLine(self, argv=sys.argv): |
50 | raise Exception("Caller must implement commandline option parsing") | 50 | raise Exception("Caller must implement commandline option parsing") |
51 | 51 | ||
52 | def parseEnvironment(self): | 52 | def parseEnvironment(self): |