decode included filenames as we can't handle byte encoded filenames in Py3
authorStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 11:12:27 +0000 (13:12 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 11:12:27 +0000 (13:12 +0200)
Cython/Compiler/Parsing.py

index f4083995223171eab31d364a1eab3c48e30594ba..7245c6d255a4760cd891dd7399828a5e4edb81c2 100644 (file)
@@ -1430,6 +1430,7 @@ def p_include_statement(s, ctx):
     _, include_file_name = p_string_literal(s)
     s.expect_newline("Syntax error in include statement")
     if s.compile_time_eval:
+        include_file_name = include_file_name.decode(s.source_encoding)
         include_file_path = s.context.find_include_file(include_file_name, pos)
         if include_file_path:
             s.included_files.append(include_file_name)