From 4e186596338af52bf720dcbbdd3a07b722cf9575 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Fri, 20 Mar 2015 15:13:05 +0200 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cookerdata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/cookerdata.py') 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") 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): -- cgit 1.2.3-korg