support both python 2 and 3.
This commit is contained in:
parent
cf6b88f8da
commit
8cd2ae322e
1 changed files with 4 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
from __future__ import print_function # support python2
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -146,13 +147,13 @@ def color_print(color,text,newline=True):
|
||||||
# 4 - blue
|
# 4 - blue
|
||||||
text = "\033[9%sm%s\033[0m" % (color,text)
|
text = "\033[9%sm%s\033[0m" % (color,text)
|
||||||
if not newline:
|
if not newline:
|
||||||
print(text, end=" ")
|
print (text, end='')
|
||||||
else:
|
else:
|
||||||
print (text)
|
print (text)
|
||||||
|
|
||||||
def regular_print(color,text,newline=True):
|
def regular_print(color,text,newline=True):
|
||||||
if not newline:
|
if not newline:
|
||||||
print (text, end = " ")
|
print (text, end = '')
|
||||||
else:
|
else:
|
||||||
print (text)
|
print (text)
|
||||||
|
|
||||||
|
@ -1793,7 +1794,7 @@ if not preconfigured:
|
||||||
env['HAS_CAIRO'] = False
|
env['HAS_CAIRO'] = False
|
||||||
env['SKIPPED_DEPS'].append('cairo')
|
env['SKIPPED_DEPS'].append('cairo')
|
||||||
else:
|
else:
|
||||||
print ('Checking for cairo lib and include paths... ', end=" ")
|
print ('Checking for cairo lib and include paths... ', end = '')
|
||||||
cmd = 'pkg-config --libs --cflags cairo'
|
cmd = 'pkg-config --libs --cflags cairo'
|
||||||
if env['RUNTIME_LINK'] == 'static':
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
cmd += ' --static'
|
cmd += ' --static'
|
||||||
|
|
Loading…
Reference in a new issue