Skip to content

Commit 2eb33a3

Browse files
committed
Fix build.py again
1 parent 33ba751 commit 2eb33a3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tools/build.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
# 6. More commands: http://docs.cython.org/src/userguide/debugging.html
6161

6262
from common import *
63+
import copy
6364
import sys
6465
import os
6566
import glob
@@ -137,7 +138,7 @@ def command_line_args():
137138
print("[build.py] Parse command line arguments")
138139

139140
global SYS_ARGV_ORIGINAL
140-
SYS_ARGV_ORIGINAL = sys.argv
141+
SYS_ARGV_ORIGINAL = copy.copy(sys.argv)
141142

142143
if "--no-run-examples" in sys.argv:
143144
NO_RUN_EXAMPLES = True
@@ -656,8 +657,8 @@ def copy_and_fix_pyx_files():
656657
shutil.copy("../../src/%s" % mainfile_original, "./%s" % mainfile_newname)
657658
with open("./%s" % mainfile_newname, "rb") as fo:
658659
content = fo.read().decode("utf-8")
659-
(content, subs) = re.subn(r"^include \"handlers/",
660-
"include \"",
660+
(content, subs) = re.subn(ur"^include \"handlers/",
661+
u"include \"",
661662
content,
662663
flags=re.MULTILINE)
663664
# Add __version__ variable in cefpython.pyx
@@ -685,8 +686,8 @@ def copy_and_fix_pyx_files():
685686
# Do not remove the newline - so that line numbers
686687
# are exact with originals.
687688
(content, subs) = re.subn(
688-
r"^include[\t ]+[\"'][^\"'\n\r]+[\"'][\t ]*",
689-
"",
689+
ur"^include[\t ]+[\"'][^\"'\n\r]+[\"'][\t ]*",
690+
u"",
690691
content,
691692
flags=re.MULTILINE)
692693
if subs:
@@ -808,6 +809,7 @@ def build_cefpython_module():
808809
assert __file__ in sys.argv[0]
809810
args.extend(SYS_ARGV_ORIGINAL[1:])
810811
command = " ".join(args)
812+
print("[build.py] Running command: %s" % command)
811813
ret = subprocess.call(command, shell=True)
812814
# Always pass fixed value to sys.exit, read note at
813815
# the top of the script about os.system and sys.exit

0 commit comments

Comments
 (0)