# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import array
import bisect
import distutils.spawn
import imp
import os
import re
-import six
import sys
import zlib
super(SourceMeta, cls).__init__(name, bases, dict)
cls.all = SourceList()
-@six.add_metaclass(SourceMeta)
-class SourceFile(object):
+class SourceFile(object, metaclass=SourceMeta):
'''Base object that encapsulates the notion of a source file.
This includes, the source node, target node, various manipulations
of those. A source file also specifies a set of tags which
def __init__(self, source, tags=None, add_tags=None, append=None):
if tags is None:
tags='gem5 lib'
- if isinstance(tags, six.string_types):
+ if isinstance(tags, str):
tags = set([tags])
if not isinstance(tags, set):
tags = set(tags)
self.tags = tags
if add_tags:
- if isinstance(add_tags, six.string_types):
+ if isinstance(add_tags, str):
add_tags = set([add_tags])
if not isinstance(add_tags, set):
add_tags = set(add_tags)
cpp_code(symbol_declaration + ' = {')
cpp_code.indent()
step = 16
- for i in six.moves.range(0, len(data), step):
+ for i in range(0, len(data), step):
x = array.array('B', data[i:i+step])
cpp_code(''.join('%d,' % d for d in x))
cpp_code.dedent()
cls.all = []
-@six.add_metaclass(ExecutableMeta)
-class Executable(object):
+class Executable(object, metaclass=ExecutableMeta):
'''Base class for creating an executable from sources.'''
abstract = True