summaryrefslogtreecommitdiffstats
path: root/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-03-20 15:13:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-24 22:54:36 +0000
commitd377f7f88d73f4e5d2dffef03d6acee809827ac6 (patch)
tree424db8b7af601b3db728b424fccc1b26693c984e /lib/bb/cookerdata.py
parentfc0cec1f38aa6f2d09434cc008a429d350a5706f (diff)
downloadbitbake-d377f7f88d73f4e5d2dffef03d6acee809827ac6.tar.gz
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cookerdata.py')
-rw-r--r--lib/bb/cookerdata.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 7eae761d5..6c11a60e0 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -33,8 +33,8 @@ logger = logging.getLogger("BitBake")
parselog = logging.getLogger("BitBake.Parsing")
class ConfigParameters(object):
- def __init__(self):
- self.options, targets = self.parseCommandLine()
+ def __init__(self, argv=sys.argv):
+ self.options, targets = self.parseCommandLine(argv)
self.environment = self.parseEnvironment()
self.options.pkgs_to_build = targets or []
@@ -46,7 +46,7 @@ class ConfigParameters(object):
for key, val in self.options.__dict__.items():
setattr(self, key, val)
- def parseCommandLine(self):
+ def parseCommandLine(self, argv=sys.argv):
raise Exception("Caller must implement commandline option parsing")
def parseEnvironment(self):