Skip to content

Commit 175a58a

Browse files
committed
Update tools
1 parent 3e6f421 commit 175a58a

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

src/browser.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ cdef class PyBrowser:
576576
# On Windows with empty window_info structure the devtools
577577
# window doesn't appear.
578578
window_info.SetAsPopup(
579+
# TODO:
580+
# According to docs this returns NULL for non-popup
581+
# windows, so looks like we shouldn't use that and
582+
# either pass NULL or GetWindowHandle().
579583
<CefWindowHandle>self.GetOpenerWindowHandle(),
580584
PyToCefStringValue("DevTools"))
581585
cdef CefBrowserSettings settings

tools/build_distrib.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,28 @@ def clean_build_directories():
199199

200200
# Delete cef binaries and libraries dirs
201201
if not NO_AUTOMATE:
202+
# Delete cef binlib dir only if cef_binary dir exists,
203+
# otherwise you will end up with cef binlib directory
204+
# deleted and script failing further when calling
205+
# automate.py --prebuilt-cef.
206+
version = get_cefpython_version()
207+
# 32-bit
208+
if not MAC:
209+
postfix2 = get_cef_postfix2_for_arch("32bit")
210+
cef_binary_dir = "cef_binary_{cef_version}_{postfix2}"\
211+
.format(cef_version=version["CEF_VERSION"],
212+
postfix2=postfix2)
213+
if len(glob.glob(cef_binary_dir)) != 1:
214+
raise Exception("Directory not found: "+cef_binary_dir)
215+
# 64-bit
216+
postfix2 = get_cef_postfix2_for_arch("64bit")
217+
cef_binary_dir = "cef_binary_{cef_version}_windows64"\
218+
.format(cef_version=version["CEF_VERSION"],
219+
postfix2=postfix2)
220+
if len(glob.glob(cef_binary_dir)) != 1:
221+
raise Exception("Directory not found: "+cef_binary_dir)
222+
223+
# Delete
202224
delete_cef_binaries_libraries_dir("32bit")
203225
delete_cef_binaries_libraries_dir("64bit")
204226

tools/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ def get_python_include_path():
289289
return results[0]
290290
return ".\\" if WINDOWS else "./"
291291

292+
292293
g_deleted_sample_apps = []
293294

294295

tools/requirements.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Installs Python dependencies using the pip tool.
33
See the requirements.txt file.
4-
pip install --upgrade -r ../tools/requirements.txt
4+
python -m pip install --upgrade -r ../tools/requirements.txt
55
"""
66

77
from common import *
@@ -13,7 +13,8 @@ def main():
1313
if sys.executable.startswith("/usr/"):
1414
args.append("sudo")
1515
requirements = os.path.join(TOOLS_DIR, "requirements.txt")
16-
args.extend(["pip", "install", "--upgrade", "-r", requirements])
16+
args.extend([sys.executable, "-m", "pip", "install", "--upgrade",
17+
"-r", requirements])
1718
retcode = subprocess.call(args)
1819
sys.exit(retcode)
1920

0 commit comments

Comments
 (0)