From edfe1062efef61aade9fe636872c5d4a4a684455 Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Thu, 11 Oct 2012 07:57:21 -0500 Subject: [PATCH] py3k: Get setup.py to run under python3 First real fix: open the temp file in text mode. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c9b69573a..5608b0dd0 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +from __future__ import print_function import glob import os import platform @@ -433,7 +434,7 @@ class pil_build_ext(build_ext): tmpfile) try: if ret >> 8 == 0: - fp = open(tmpfile, 'rb') + fp = open(tmpfile, 'r') multiarch_path_component = fp.readline().strip() _add_directory(self.compiler.library_dirs, '/usr/lib/' + multiarch_path_component)