]> code.ossystems Code Review - openembedded-core.git/commitdiff
3.0 prep
authorChris Larson <chris_larson@mentor.com>
Sun, 20 Jun 2010 19:07:34 +0000 (12:07 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:37 +0000 (15:41 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/fetch/__init__.py
bitbake/lib/bb/fetch/perforce.py
bitbake/lib/bb/parse/ast.py
bitbake/lib/bb/parse/parse_py/BBHandler.py
bitbake/lib/bb/parse/parse_py/__init__.py
bitbake/lib/bb/ui/ncurses.py

index 651fea88735b567f938cf98c1ce62c5113677147..31b9653793f2e231cf25e5ef9b2f7796e9bdbbec 100644 (file)
@@ -24,6 +24,7 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
+from __future__ import absolute_import
 from __future__ import print_function
 import os, re
 import bb
@@ -727,18 +728,18 @@ class Fetch(object):
         key = self._revision_key(url, ud, d)
         return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
 
-import cvs
-import git
-import local
-import svn
-import wget
-import svk
-import ssh
-import perforce
-import bzr
-import hg
-import osc
-import repo
+from . import cvs
+from . import git
+from . import local
+from . import svn
+from . import wget
+from . import svk
+from . import ssh
+from . import perforce
+from . import bzr
+from . import hg
+from . import osc
+from . import repo
 
 methods.append(local.Local())
 methods.append(wget.Wget())
index 5b6c60187608f71720249de45671c8cb6b5904ec..1c74cff349fa67a1a4feaf9978da202760e9c23b 100644 (file)
@@ -25,6 +25,7 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
+from future_builtins import zip
 import os
 import bb
 from   bb import data
index 02d682d88f289cfb3bc00a126ac48d398633e294..dae2e11154921f1a66e05265be2920580afd45b4 100644 (file)
@@ -21,6 +21,8 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+from __future__ import absolute_import
+from future_builtins import filter
 import bb, re, string
 from bb import methodpool
 import itertools
index 9708416a0a9933d7e81c3ad411f422397bc6e0b4..bb561748816f9c4d67b6333b62a69f44141f624a 100644 (file)
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+from __future__ import absolute_import
 import re, bb, os
 import bb.fetch, bb.build, bb.utils
 from bb import data
 
-from ConfHandler import include, init
-from bb.parse import resolve_file, ast
+from . import ConfHandler
+from .. import resolve_file, ast
+from .ConfHandler import include, init
 
 # For compatibility
 bb.deprecate_import(__name__, "bb.parse", ["vars_from_file"])
@@ -231,10 +233,9 @@ def feeder(lineno, s, fn, root, statements):
         ast.handleInherit(statements, m)
         return
 
-    from bb.parse import ConfHandler
     return ConfHandler.feeder(lineno, s, fn, statements)
 
 # Add us to the handlers list
-from bb.parse import handlers
+from .. import handlers
 handlers.append({'supports': supports, 'handle': handle, 'init': init})
 del handlers
index a900101784eab37aee01ef174bf502c1924ab6b2..3e658d0de99f38313459bf9575daa93dc22ab6a4 100644 (file)
@@ -25,7 +25,9 @@ File parsers for the BitBake build tools.
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
-__version__ = '1.0'
 
-import ConfHandler
-import BBHandler
+from __future__ import absolute_import
+from . import ConfHandler
+from . import BBHandler
+
+__version__ = '1.0'
index 81dcb1998c45cc32a9075abeffc8ac76fc9e78a5..3fed4c58a884a9bd16b066de1ee9356fe9b8d917 100644 (file)
@@ -44,6 +44,8 @@
 
 """
 
+from __future__ import division
+
 import os, sys, curses, itertools, time
 import bb
 import xmlrpclib
@@ -199,8 +201,8 @@ class NCursesUI:
 
         main_left = 0
         main_top = 0
-        main_height = ( height / 3 * 2 )
-        main_width = ( width / 3 ) * 2
+        main_height = ( height // 3 * 2 )
+        main_width = ( width // 3 ) * 2
         clo_left = main_left
         clo_top = main_top + main_height
         clo_height = height - main_height - main_top - 1
@@ -266,7 +268,7 @@ class NCursesUI:
                         mw.appendText("Parsing finished. %d cached, %d parsed, %d skipped, %d masked."
                                 % ( event.cached, event.parsed, event.skipped, event.masked ))
                     else:
-                        mw.setStatus("Parsing: %s (%04d/%04d) [%2d %%]" % ( next(parsespin), x, y, x*100/y ) )
+                        mw.setStatus("Parsing: %s (%04d/%04d) [%2d %%]" % ( next(parsespin), x, y, x*100//y ) )
 #                if isinstance(event, bb.build.TaskFailed):
 #                    if event.logfile:
 #                        if data.getVar("BBINCLUDELOGS", d):