File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313from cefpython3 import cefpython as cef
1414import platform
15- from packaging .version import Version as parse_version
1615
1716
1817def main ():
@@ -34,7 +33,7 @@ def check_versions():
3433 print ("[hello_world.py] Python {ver} {arch}" .format (
3534 ver = platform .python_version (),
3635 arch = platform .architecture ()[0 ]))
37- assert parse_version ( cef .__version__ ) >= parse_version ( "57.0" ), \
36+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 57 , 0 ), \
3837 "CEF Python v57.0+ required to run this"
3938
4039
Original file line number Diff line number Diff line change 1616from cefpython3 import cefpython as cef
1717
1818import distutils .sysconfig
19- from packaging .version import Version as parse_version
2019import math
2120import os
2221import platform
@@ -109,7 +108,7 @@ def check_versions():
109108 pywin32_version = fp .read ().strip ()
110109 print ("[pywin32.py] pywin32 {ver}" .format (ver = pywin32_version ))
111110
112- assert parse_version ( cef .__version__ ) >= parse_version ( "57.0" ), "CEF Python v57.0+ required to run this"
111+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 57 , 0 ), "CEF Python v57.0+ required to run this"
113112
114113
115114def create_browser (window_info , settings , url ):
Original file line number Diff line number Diff line change 1212import platform
1313import subprocess
1414import sys
15- from packaging .version import Version as parse_version
1615
1716# GLOBALS
1817PYQT5 = False
@@ -140,7 +139,7 @@ def check_versions():
140139 print ("[qt.py] PySide6 {v1} (qt {v2})" .format (
141140 v1 = PySide6 .__version__ , v2 = QtCore .__version__ ))
142141 # CEF Python version requirement
143- assert parse_version ( cef .__version__ ) >= parse_version ( "55.4" ), "CEF Python v55.4+ required to run this"
142+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 55 , 4 ), "CEF Python v55.4+ required to run this"
144143
145144
146145class MainWindow (QMainWindow ):
Original file line number Diff line number Diff line change 3636"""
3737
3838from cefpython3 import cefpython as cef
39- from packaging .version import Version as parse_version
4039import os
4140import platform
4241import subprocess
@@ -115,7 +114,7 @@ def check_versions():
115114 ver = platform .python_version (),
116115 arch = platform .architecture ()[0 ]))
117116 print ("[screenshot.py] Pillow {ver}" .format (ver = PILLOW_VERSION ))
118- assert parse_version ( cef .__version__ ) >= parse_version ( "57.0" ), "CEF Python v57.0+ required to run this"
117+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 57 , 0 ), "CEF Python v57.0+ required to run this"
119118
120119
121120def command_line_arguments ():
Original file line number Diff line number Diff line change 2626import os
2727import platform
2828import logging as _logging
29- from packaging .version import Version as parse_version
3029
3130# Fix for PyCharm hints warnings
3231WindowUtils = cef .WindowUtils ()
@@ -54,7 +53,7 @@ def main():
5453 logger .info ("Python {ver} {arch}" .format (
5554 ver = platform .python_version (), arch = platform .architecture ()[0 ]))
5655 logger .info ("Tk {ver}" .format (ver = tk .Tcl ().eval ('info patchlevel' )))
57- assert parse_version ( cef .__version__ ) >= parse_version ( "55.3" ), "CEF Python v55.3+ required to run this"
56+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 55 , 3 ), "CEF Python v55.3+ required to run this"
5857 sys .excepthook = cef .ExceptHook # To shutdown all CEF processes on error
5958 # Tk must be initialized before CEF otherwise fatal error (Issue #306)
6059 root = tk .Tk ()
Original file line number Diff line number Diff line change 66import platform
77import sys
88import threading
9- from packaging .version import Version as parse_version
109
1110# HTML code. Browser will navigate to a Data uri created
1211# from this html code.
@@ -86,7 +85,7 @@ def check_versions():
8685 print ("[tutorial.py] Python {ver} {arch}" .format (
8786 ver = platform .python_version (),
8887 arch = platform .architecture ()[0 ]))
89- assert parse_version ( cef .__version__ ) >= parse_version ( "57.0" ), "CEF Python v57.0+ required to run this"
88+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 57 , 0 ), "CEF Python v57.0+ required to run this"
9089
9190
9291def html_to_data_uri (html , js_callback = None ):
Original file line number Diff line number Diff line change 1212import platform
1313import sys
1414import os
15- from packaging .version import Version as parse_version
1615
1716# Platforms
1817WINDOWS = (platform .system () == "Windows" )
@@ -63,7 +62,7 @@ def check_versions():
6362 ver = platform .python_version (), arch = platform .architecture ()[0 ]))
6463 print ("[wxpython.py] wxPython {ver}" .format (ver = wx .version ()))
6564 # CEF Python version requirement
66- assert parse_version ( cef .__version__ ) >= parse_version ( "66.0" ), "CEF Python v66.0+ required to run this"
65+ assert tuple ( int ( x ) for x in cef .__version__ . split ( "." )) >= ( 66 , 0 ), "CEF Python v66.0+ required to run this"
6766
6867
6968def scale_window_size_for_high_dpi (width , height ):
You can’t perform that action at this time.
0 commit comments