Skip to content

Commit 352908d

Browse files
CzarekCzarek
authored andcommitted
Fix to compile.py - copy Permission bits when copying
the subprocess executable (Mac, Linux).
1 parent 7bfa0f1 commit 352908d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

cefpython/cef3/linux/compile.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@
7777
sys.exit(1)
7878
subprocess_exe = "./../linux/binaries_%s/subprocess" % (BITS)
7979
if os.path.exists("./subprocess"):
80-
shutil.copyfile("./subprocess", subprocess_exe)
81-
st = os.stat(subprocess_exe)
82-
os.chmod(subprocess_exe, st.st_mode | stat.S_IEXEC)
80+
# .copy() will also copy Permission bits
81+
shutil.copy("./subprocess", subprocess_exe)
8382

8483
# os.chdir("./../v8function_handler/")
8584
# ret = subprocess.call("make -f Makefile", shell=True)
@@ -134,7 +133,7 @@
134133
if os.path.exists(pyxfile):
135134
os.remove(pyxfile)
136135

137-
if ret != 0:
136+
if ret != 0:
138137
sys.exit("ERROR")
139138

140139
if DEBUG:

cefpython/cef3/mac/compile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@
9595
sys.exit(1)
9696
subprocess_exe = "./../mac/binaries_%s/subprocess" % (BITS)
9797
if os.path.exists("./subprocess"):
98-
shutil.copyfile("./subprocess", subprocess_exe)
99-
st = os.stat(subprocess_exe)
100-
os.chmod(subprocess_exe, st.st_mode | stat.S_IEXEC)
98+
# .copy() will also copy Permission bits
99+
shutil.copy("./subprocess", subprocess_exe)
101100

102101
# os.chdir("./../v8function_handler/")
103102
# ret = subprocess.call("make -f Makefile", shell=True)

0 commit comments

Comments
 (0)