Skip to content

Commit 1c61629

Browse files
committed
Support for Python 3.7 (cztomczak#433). Still needs testing.
1 parent 1ff4514 commit 1c61629

File tree

8 files changed

+32
-22
lines changed

8 files changed

+32
-22
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ support old operating systems then choose the v31 release.
218218

219219
OS | Py2 | Py3 | 32bit | 64bit | Requirements
220220
--- | --- | --- | --- | --- | ---
221-
Windows | 2.7 | 3.4 / 3.5 / 3.6 | Yes | Yes | Windows 7+
222-
Linux | 2.7 | 3.4 / 3.5 / 3.6 | Yes | Yes | Debian 7+ / Ubuntu 12.04+
223-
Mac | 2.7 | 3.4 / 3.5 / 3.6 | No | Yes | MacOS 10.9+
221+
Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Windows 7+
222+
Linux | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Debian 7+ / Ubuntu 12.04+
223+
Mac | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | No | Yes | MacOS 10.9+
224224

225225
These platforms are not supported yet:
226226
- ARM - see [Issue #267](../../issues/267)

docs/Knowledge-Base.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ ImportError: DLL load failed: The specified module could not be found.
3333
```
3434

3535
Then most probably this is caused, because you are missing
36-
"msvcp140.dll" dependency (for Python 3.5/3.6 for example). This
36+
"msvcp140.dll" dependency (for Python 3.5/3.6/3.7 for example). This
3737
is a dependency for Python C++ extensions (eg. cefpython_py36.pyd
38-
depends on it). For Python 3.5/3.6 to fix this download
38+
depends on it). For Python 3.5/3.6/3.7 to fix this download
3939
[Visual C++ Redistributable for VS2015](https://www.microsoft.com/en-us/download/details.aspx?id=52685)
4040
(13 MB) - this is just a VC++ redistributable, not a Visual Studio
4141
package. For 32-bit download "vc_redist.x86.exe" file and for

src/cef_v59..v66_changes.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,10 @@ internal/cef_types.h
7575
same as LOGSEVERITY_VERBOSE, see code comments in setting.pyx
7676
+ cef_settings_t:
7777
+ background_color: OSR windows can set an ARGB background color
78-
- cef_path_key_t (informational only):
79-
- PK_DIR_RESOURCES new key
80-
- cef_urlrequest_flags_t (expose in cefpython.Request.Flags):
81-
- UR_FLAG_ONLY_FROM_CACHE new flag
82-
- UR_FLAG_STOP_ON_REDIRECT new flag
83-
- enum values have changed due to new key
84-
- cef_thread_id_t:
85-
- TID_FILE_BACKGROUND (deprecated TID_FILE)
86-
- TID_FILE_USER_VISIBLE
87-
- cef_popup_features_t: some keys removed (not exposed, informational only)
88-
- cef_referrer_policy_t changes (not exposed)
78+
+ cef_path_key_t (informational only):
79+
+ PK_DIR_RESOURCES new key
80+
+ cef_popup_features_t: some keys removed (not exposed, informational only)
81+
+ cef_referrer_policy_t changes (not exposed, info only)
8982

9083
cef_accessibility_handler.h
9184
- CefAccessibilityHandler

src/common/cefpython_public_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
#include "../../build/build_cefpython/cefpython_py35_fixed.h"
4545
#elif PY_MINOR_VERSION == 6
4646
#include "../../build/build_cefpython/cefpython_py36_fixed.h"
47+
#elif PY_MINOR_VERSION == 7
48+
#include "../../build/build_cefpython/cefpython_py37_fixed.h"
4749
#endif // PY_MINOR_VERSION
4850
#endif // PY_MAJOR_VERSION
4951

tools/build_distrib.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
allows to use CEF prebuilt binaries and libraries
2121
downloaded from CEF Python's Github releases to
2222
build distribution pacakges.
23+
--allow-partial Do not require all supported Python versions to
24+
be installed. If some are missing they just won't
25+
be included in distribution.
2326
2427
2528
This script does the following:
@@ -73,9 +76,10 @@
7376
NO_RUN_EXAMPLES = False
7477
NO_REBUILD = False
7578
NO_AUTOMATE = False
79+
ALLOW_PARTIAL = False
7680

7781
# Python versions
78-
SUPPORTED_PYTHON_VERSIONS = [(2, 7), (3, 4), (3, 5), (3, 6)]
82+
SUPPORTED_PYTHON_VERSIONS = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7)]
7983

8084
# Python search paths. It will use first Python found for specific version.
8185
# Supports replacement of one environment variable in path eg.: %ENV_KEY%.
@@ -148,7 +152,7 @@ def main():
148152

149153

150154
def command_line_args():
151-
global VERSION, NO_RUN_EXAMPLES, NO_REBUILD, NO_AUTOMATE
155+
global VERSION, NO_RUN_EXAMPLES, NO_REBUILD, NO_AUTOMATE, ALLOW_PARTIAL
152156
version = get_version_from_command_line_args(__file__)
153157
if not version or "--help" in sys.argv:
154158
print(__doc__)
@@ -163,6 +167,9 @@ def command_line_args():
163167
if "--no-automate" in sys.argv:
164168
NO_AUTOMATE = True
165169
sys.argv.remove("--no-automate")
170+
if "--allow-partial" in sys.argv:
171+
ALLOW_PARTIAL = True
172+
sys.argv.remove("--allow-partial")
166173
args = sys.argv[1:]
167174
for arg in args:
168175
if arg == version:
@@ -295,15 +302,17 @@ def check_pythons(pythons_32bit, pythons_64bit):
295302
if pythons_32bit:
296303
print("[build_distrib.py] Pythons 32-bit found:")
297304
pp.pprint(pythons_32bit)
298-
if check_32bit and len(pythons_32bit) != len(SUPPORTED_PYTHON_VERSIONS):
305+
if check_32bit and len(pythons_32bit) != len(SUPPORTED_PYTHON_VERSIONS) \
306+
and not ALLOW_PARTIAL:
299307
print("[build_distrib.py] ERROR: Couldn't find all supported"
300308
" python 32-bit installations. Found: {found}."
301309
.format(found=len(pythons_32bit)))
302310
sys.exit(1)
303311
if pythons_64bit:
304312
print("[build_distrib.py] Pythons 64-bit found:")
305313
pp.pprint(pythons_64bit)
306-
if check_64bit and len(pythons_64bit) != len(SUPPORTED_PYTHON_VERSIONS):
314+
if check_64bit and len(pythons_64bit) != len(SUPPORTED_PYTHON_VERSIONS) \
315+
and not ALLOW_PARTIAL:
307316
print("[build_distrib.py] ERROR: Couldn't find all supported"
308317
" python 64-bit installations. Found: {found}."
309318
.format(found=len(pythons_64bit)))

tools/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ def get_msvs_for_python(vs_prefix=False):
424424
return "VS2015" if vs_prefix else "2015"
425425
elif sys.version_info[:2] == (3, 6):
426426
return "VS2015" if vs_prefix else "2015"
427+
elif sys.version_info[:2] == (3, 7):
428+
return "VS2015" if vs_prefix else "2015"
427429
else:
428430
print("ERROR: This version of Python is not supported")
429431
sys.exit(1)

tools/installer/cefpython3.__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
libcef = os.path.join(package_dir, "libcef.so")
4545
ctypes.CDLL(libcef, ctypes.RTLD_GLOBAL)
4646

47-
# Load the cefpython module for proper Python version
47+
# Load the cefpython module for given Python version
4848
if sys.version_info[:2] == (2, 7):
4949
# noinspection PyUnresolvedReferences
5050
from . import cefpython_py27 as cefpython
@@ -57,5 +57,8 @@
5757
elif sys.version_info[:2] == (3, 6):
5858
# noinspection PyUnresolvedReferences
5959
from . import cefpython_py36 as cefpython
60+
elif sys.version_info[:2] == (3, 7):
61+
# noinspection PyUnresolvedReferences
62+
from . import cefpython_py37 as cefpython
6063
else:
6164
raise Exception("Python version not supported: " + sys.version)

tools/installer/cefpython3.setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def main():
129129
"https://github.com/cztomczak/cefpython",
130130
license="BSD 3-clause",
131131
author="Czarek Tomczak",
132-
author_email="czarek.tomczak@@gmail.com",
132+
author_email="czarek.tomczak2@@gmail.com",
133133
url="https://github.com/cztomczak/cefpython",
134134
download_url="https://github.com/cztomczak/cefpython/releases",
135135
platforms=["{{SYSCONFIG_PLATFORM}}"],
@@ -147,6 +147,7 @@ def main():
147147
"Programming Language :: Python :: 3.4",
148148
"Programming Language :: Python :: 3.5",
149149
"Programming Language :: Python :: 3.6",
150+
"Programming Language :: Python :: 3.7",
150151
"Topic :: Desktop Environment",
151152
"Topic :: Internet",
152153
"Topic :: Internet :: WWW/HTTP",

0 commit comments

Comments
 (0)