Skip to content

Commit 510d603

Browse files
committed
Python 3 support on Mac (cztomczak#121, cztomczak#295)
1 parent c23bc2d commit 510d603

5 files changed

Lines changed: 12 additions & 14 deletions

File tree

docs/Knowledge-Base.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,12 @@ as of now.
112112
To see if some feature is working or a bug is fixed in newer CEF
113113
release perform the following steps:
114114

115-
1. Download and install [CMake](https://cmake.org/download/) and
116-
[Ninja](https://github.com/ninja-build/ninja/releases)
117-
2. Go to [Spotify Automated Builds]
115+
1. Go to [Spotify Automated Builds]
118116
(http://opensource.spotify.com/cefbuilds/index.html)
119-
and download latest CEF for your platform. Choose "Standard
120-
Distribution" binaries.
121-
3. Follow the instructions in `CMakeLists.txt` file, choose steps
122-
for building using Ninja
123-
4. Run either cefclient or cefsimple to test features
117+
to download latest CEF for your platform. Choose "Sample
118+
Application" binaries.
119+
2. Extract the archive and run sample application from the
120+
Release/ directory.
124121

125122

126123
## How to capture Audio and Video in HTML5?

examples/qt4.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Issues on Mac (tested with PySide):
1010
# - Keyboard focus issues when switching between controls (Issue #284)
1111
# - Mouse cursor never changes when hovering over links (Issue #311)
12+
# - Sometimes process hangs when quitting app
1213

1314
from cefpython3 import cefpython as cef
1415
import ctypes

tools/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@ def clear_cache():
459459
# Cache in CEFPYTHON_BINARY directory (eg. cefpython_linux64/)
460460
os.chdir(CEFPYTHON_BINARY)
461461
delete_files_by_pattern("./"+MODULE_NAME_TEMPLATE
462-
.format(pyversion="*", ext=MODULE_EXT))
462+
.format(pyversion=PYVERSION, ext=MODULE_EXT))
463463

464464
# Cache in build_cefpython/ directory
465465
os.chdir(BUILD_CEFPYTHON)
466466

467467
delete_files_by_pattern("./"+MODULE_NAME_TEMPLATE
468-
.format(pyversion="*", ext=MODULE_EXT))
468+
.format(pyversion=PYVERSION, ext=MODULE_EXT))
469469
delete_files_by_pattern("./*.pyx")
470470

471471
try:

tools/make_installer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def copy_template_file(src, dst, variables):
126126
print("[make_installer.py] Copy_t: {src} ==> {dst}"
127127
.format(src=short_src_path(src), dst=short_dst_path(dst)))
128128
with open(src, "rb") as fo:
129-
contents = fo.read()
129+
contents = fo.read().decode("utf-8")
130130
contents = replace_template_vars(contents, variables)
131131
with open(dst, "wb") as fo:
132-
fo.write(contents)
132+
fo.write(contents.encode("utf-8"))
133133
return contents
134134

135135

@@ -280,7 +280,7 @@ def create_empty_log_file(log_file):
280280
print("[make_installer.py] Create: {file}"
281281
.format(file=short_dst_path(log_file)))
282282
with open(log_file, "wb") as fo:
283-
fo.write("")
283+
fo.write("".encode("utf-8"))
284284
# On Linux and Mac chmod so that for cases when package is
285285
# installed using sudo. When wheel package is created it
286286
# will remember file permissions set.

tools/run_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def main():
7171
# tkinter
7272
if MAC:
7373
# This example often crashes on Mac (Issue #309)
74-
print(["run_examples.py] PASS: tkinter_.py (Issue #309)"])
74+
print("[run_examples.py] PASS: tkinter_.py (Issue #309)")
7575
passed.append("tkinter_.py (Issue #309)")
7676
elif packages["tkinter"] or packages["Tkinter"]:
7777
examples.append("tkinter_.py")

0 commit comments

Comments
 (0)