|
60 | 60 | # 6. More commands: http://docs.cython.org/src/userguide/debugging.html |
61 | 61 |
|
62 | 62 | from common import * |
| 63 | +import copy |
63 | 64 | import sys |
64 | 65 | import os |
65 | 66 | import glob |
@@ -137,7 +138,7 @@ def command_line_args(): |
137 | 138 | print("[build.py] Parse command line arguments") |
138 | 139 |
|
139 | 140 | global SYS_ARGV_ORIGINAL |
140 | | - SYS_ARGV_ORIGINAL = sys.argv |
| 141 | + SYS_ARGV_ORIGINAL = copy.copy(sys.argv) |
141 | 142 |
|
142 | 143 | if "--no-run-examples" in sys.argv: |
143 | 144 | NO_RUN_EXAMPLES = True |
@@ -656,8 +657,8 @@ def copy_and_fix_pyx_files(): |
656 | 657 | shutil.copy("../../src/%s" % mainfile_original, "./%s" % mainfile_newname) |
657 | 658 | with open("./%s" % mainfile_newname, "rb") as fo: |
658 | 659 | 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 \"", |
661 | 662 | content, |
662 | 663 | flags=re.MULTILINE) |
663 | 664 | # Add __version__ variable in cefpython.pyx |
@@ -685,8 +686,8 @@ def copy_and_fix_pyx_files(): |
685 | 686 | # Do not remove the newline - so that line numbers |
686 | 687 | # are exact with originals. |
687 | 688 | (content, subs) = re.subn( |
688 | | - r"^include[\t ]+[\"'][^\"'\n\r]+[\"'][\t ]*", |
689 | | - "", |
| 689 | + ur"^include[\t ]+[\"'][^\"'\n\r]+[\"'][\t ]*", |
| 690 | + u"", |
690 | 691 | content, |
691 | 692 | flags=re.MULTILINE) |
692 | 693 | if subs: |
@@ -808,6 +809,7 @@ def build_cefpython_module(): |
808 | 809 | assert __file__ in sys.argv[0] |
809 | 810 | args.extend(SYS_ARGV_ORIGINAL[1:]) |
810 | 811 | command = " ".join(args) |
| 812 | + print("[build.py] Running command: %s" % command) |
811 | 813 | ret = subprocess.call(command, shell=True) |
812 | 814 | # Always pass fixed value to sys.exit, read note at |
813 | 815 | # the top of the script about os.system and sys.exit |
|
0 commit comments