Python 3 compat.

Try to keep our Python sources compatible with both Python 2.7 and 3.

Check with 'pylint --py3k' and 'python -3'.
This commit is contained in:
Jakob Stoklund Olesen
2016-08-23 15:16:40 -07:00
parent c0a9a4fe46
commit 9da6847805
20 changed files with 40 additions and 34 deletions

View File

@@ -12,7 +12,7 @@ If the build script outputs lines of the form:
cargo will rerun the build script when those files have changed since the last
build.
"""
from __future__ import absolute_import, print_function
import os
from os.path import dirname, abspath, join
@@ -30,7 +30,7 @@ def source_files(top):
def generate():
print "Dependencies from meta language directory:"
print("Dependencies from meta language directory:")
meta = dirname(abspath(__file__))
for path in source_files(meta):
print "cargo:rerun-if-changed=" + path
print("cargo:rerun-if-changed=" + path)