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
2528This script does the following:
7376NO_RUN_EXAMPLES = False
7477NO_REBUILD = False
7578NO_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
150154def 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 )))
0 commit comments