sb: Update code base to support Python3 and Python2.

Fix Windows support to allow MSYS2 Python to be used.

Updates #2619.
This commit is contained in:
Chris Johns
2016-03-07 11:56:02 +11:00
parent b537e55364
commit 3a972f6102
29 changed files with 412 additions and 314 deletions

View File

@@ -1,7 +1,7 @@
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2014 Chris Johns (chrisj@rtems.org)
# Copyright 2014-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -34,6 +34,8 @@
# provided by the full pkg-config so packages can configure and build.
#
from __future__ import print_function
import copy
import os
import os.path
@@ -196,7 +198,7 @@ class package(object):
@staticmethod
def dump_loaded():
for n in sorted(package.loaded):
print package.loaded[n]._str()
print(package.loaded[n]._str())
def __init__(self, name = None, prefix = None,
libs_scan = False, output = None, src = None):
@@ -458,7 +460,7 @@ class package(object):
lhs = l[:d].lower()
rhs = l[d + 1:]
if tm:
print('define: ' + str(define) + ', lhs: ' + lhs + ', ' + rhs)
print(('define: ' + str(define) + ', lhs: ' + lhs + ', ' + rhs))
if define:
self.defines[lhs] = rhs
else: