Skip to content

Commit

Permalink
Python 3.7 doesn't work with ur"" strings - syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
cztomczak committed Aug 19, 2018
1 parent 2eb33a3 commit b0e2e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def copy_and_fix_pyx_files():
shutil.copy("../../src/%s" % mainfile_original, "./%s" % mainfile_newname)
with open("./%s" % mainfile_newname, "rb") as fo:
content = fo.read().decode("utf-8")
(content, subs) = re.subn(ur"^include \"handlers/",
(content, subs) = re.subn(u"^include \"handlers/",
u"include \"",
content,
flags=re.MULTILINE)
Expand Down Expand Up @@ -686,7 +686,7 @@ def copy_and_fix_pyx_files():
# Do not remove the newline - so that line numbers
# are exact with originals.
(content, subs) = re.subn(
ur"^include[\t ]+[\"'][^\"'\n\r]+[\"'][\t ]*",
u"^include[\\t ]+[\"'][^\"'\\n\\r]+[\"'][\\t ]*",
u"",
content,
flags=re.MULTILINE)
Expand Down

0 comments on commit b0e2e8a

Please sign in to comment.