Skip to content

Commit

Permalink
Python 3 support on Mac (#121, #295)
Browse files Browse the repository at this point in the history
  • Loading branch information
cztomczak committed Mar 3, 2017
1 parent c23bc2d commit 510d603
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
13 changes: 5 additions & 8 deletions docs/Knowledge-Base.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,12 @@ as of now.
To see if some feature is working or a bug is fixed in newer CEF
release perform the following steps:

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


## How to capture Audio and Video in HTML5?
Expand Down
1 change: 1 addition & 0 deletions examples/qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Issues on Mac (tested with PySide):
# - Keyboard focus issues when switching between controls (Issue #284)
# - Mouse cursor never changes when hovering over links (Issue #311)
# - Sometimes process hangs when quitting app

from cefpython3 import cefpython as cef
import ctypes
Expand Down
4 changes: 2 additions & 2 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,13 @@ def clear_cache():
# Cache in CEFPYTHON_BINARY directory (eg. cefpython_linux64/)
os.chdir(CEFPYTHON_BINARY)
delete_files_by_pattern("./"+MODULE_NAME_TEMPLATE
.format(pyversion="*", ext=MODULE_EXT))
.format(pyversion=PYVERSION, ext=MODULE_EXT))

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

delete_files_by_pattern("./"+MODULE_NAME_TEMPLATE
.format(pyversion="*", ext=MODULE_EXT))
.format(pyversion=PYVERSION, ext=MODULE_EXT))
delete_files_by_pattern("./*.pyx")

try:
Expand Down
6 changes: 3 additions & 3 deletions tools/make_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def copy_template_file(src, dst, variables):
print("[make_installer.py] Copy_t: {src} ==> {dst}"
.format(src=short_src_path(src), dst=short_dst_path(dst)))
with open(src, "rb") as fo:
contents = fo.read()
contents = fo.read().decode("utf-8")
contents = replace_template_vars(contents, variables)
with open(dst, "wb") as fo:
fo.write(contents)
fo.write(contents.encode("utf-8"))
return contents


Expand Down Expand Up @@ -280,7 +280,7 @@ def create_empty_log_file(log_file):
print("[make_installer.py] Create: {file}"
.format(file=short_dst_path(log_file)))
with open(log_file, "wb") as fo:
fo.write("")
fo.write("".encode("utf-8"))
# On Linux and Mac chmod so that for cases when package is
# installed using sudo. When wheel package is created it
# will remember file permissions set.
Expand Down
2 changes: 1 addition & 1 deletion tools/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def main():
# tkinter
if MAC:
# This example often crashes on Mac (Issue #309)
print(["run_examples.py] PASS: tkinter_.py (Issue #309)"])
print("[run_examples.py] PASS: tkinter_.py (Issue #309)")
passed.append("tkinter_.py (Issue #309)")
elif packages["tkinter"] or packages["Tkinter"]:
examples.append("tkinter_.py")
Expand Down

0 comments on commit 510d603

Please sign in to comment.