1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-25 18:57:02 +00:00

bitbake: bitbake: Convert to python 3

Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.

(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2016-05-12 08:30:35 +01:00
parent ef1df51651
commit 0f2c59367a
63 changed files with 390 additions and 400 deletions
+5 -10
View File
@@ -1,22 +1,17 @@
import ast
import sys
import codegen
import logging
import pickle
import bb.pysh as pysh
import os.path
import bb.utils, bb.data
from itertools import chain
from pysh import pyshyacc, pyshlex, sherrors
from bb.pysh import pyshyacc, pyshlex, sherrors
from bb.cache import MultiProcessCache
logger = logging.getLogger('BitBake.CodeParser')
try:
import cPickle as pickle
except ImportError:
import pickle
logger.info('Importing cPickle failed. Falling back to a very slow implementation.')
def check_indent(codestr):
"""If the code is indented, add a top level piece of code to 'remove' the indentation"""
@@ -68,7 +63,7 @@ class SetCache(object):
new = []
for i in items:
new.append(intern(i))
new.append(sys.intern(i))
s = frozenset(new)
if hash(s) in self.setcache:
return self.setcache[hash(s)]